def get_nustar_location(checktime, line1, line2):
    ' \n    \n    Code to determine the spacecraft location from the TLE.\n    \n    Inputs are a datetime object and the two lines of the TLE you want to use.\n    \n    Returns a tuple that has the X, Y, and Z geocentric coordinates (in km).\n    \n    '
    from sgp4.earth_gravity import wgs72
    from sgp4.io import twoline2rv
    from astropy.coordinates import EarthLocation
    satellite = twoline2rv(line1, line2, wgs72)
    (position, velocity) = satellite.propagate(checktime.year, checktime.month, checktime.day, checktime.hour, checktime.minute, checktime.second)
    return position
Code to determine the spacecraft location from the TLE.

Inputs are a datetime object and the two lines of the TLE you want to use.

Returns a tuple that has the X, Y, and Z geocentric coordinates (in km).
def get_nustar_location(checktime, line1, line2):
    ' \n    \n    Code to determine the spacecraft location from the TLE.\n    \n    Inputs are a datetime object and the two lines of the TLE you want to use.\n    \n    Returns a tuple that has the X, Y, and Z geocentric coordinates (in km).\n    \n    '
    from sgp4.earth_gravity import wgs72
    from sgp4.io import twoline2rv
    from astropy.coordinates import EarthLocation
    satellite = twoline2rv(line1, line2, wgs72)
    (position, velocity) = satellite.propagate(checktime.year, checktime.month, checktime.day, checktime.hour, checktime.minute, checktime.second)
    return position