def eci2el(x, y, z, dt):
    '\n    Convert Earth-Centered Inertial (ECI) cartesian coordinates to ITRS for astropy EarthLocation object.\n\n    Inputs :\n    x = ECI X-coordinate \n    y = ECI Y-coordinate \n    z = ECI Z-coordinate \n    dt = UTC time (datetime object)\n    '
    from astropy.coordinates import GCRS, ITRS, EarthLocation, CartesianRepresentation
    import astropy.units as u
    tt = Time(dt, format='datetime')
    gcrs = GCRS(CartesianRepresentation(x=x, y=y, z=z), obstime=tt)
    itrs = gcrs.transform_to(ITRS(obstime=tt))
    el = EarthLocation.from_geocentric(itrs.x, itrs.y, itrs.z)
    return el
Convert Earth-Centered Inertial (ECI) cartesian coordinates to ITRS for astropy EarthLocation object.

Inputs :
x = ECI X-coordinate 
y = ECI Y-coordinate 
z = ECI Z-coordinate 
dt = UTC time (datetime object)
def eci2el(x, y, z, dt):
    '\n    Convert Earth-Centered Inertial (ECI) cartesian coordinates to ITRS for astropy EarthLocation object.\n\n    Inputs :\n    x = ECI X-coordinate \n    y = ECI Y-coordinate \n    z = ECI Z-coordinate \n    dt = UTC time (datetime object)\n    '
    from astropy.coordinates import GCRS, ITRS, EarthLocation, CartesianRepresentation
    import astropy.units as u
    tt = Time(dt, format='datetime')
    gcrs = GCRS(CartesianRepresentation(x=x, y=y, z=z), obstime=tt)
    itrs = gcrs.transform_to(ITRS(obstime=tt))
    el = EarthLocation.from_geocentric(itrs.x, itrs.y, itrs.z)
    return el