def convert_nustar_time(t, leap=5):
    ' \n    \n    Converts MET seconds to a datetime object.\n    \n    Default is to subtract off 5 leap seconds.\n\n    '
    import astropy.units as u
    mjdref = (55197 * u.d)
    met = (((t - leap) * u.s) + mjdref)
    met_datetime = Time(met.to(u.d), format='mjd').datetime
    return met_datetime
Converts MET seconds to a datetime object.

Default is to subtract off 5 leap seconds.
def convert_nustar_time(t, leap=5):
    ' \n    \n    Converts MET seconds to a datetime object.\n    \n    Default is to subtract off 5 leap seconds.\n\n    '
    import astropy.units as u
    mjdref = (55197 * u.d)
    met = (((t - leap) * u.s) + mjdref)
    met_datetime = Time(met.to(u.d), format='mjd').datetime
    return met_datetime