Created
March 25, 2018 05:18
-
-
Save prateekiiest/25281428071374b5ba91baa465bffaa2 to your computer and use it in GitHub Desktop.
TimeDelta Enhancement
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import astropy.Time as T | |
def parse_time(time_string, time_format='', **kwargs): | |
if time_format == 'utime' or isinstance(time_string, (int, float)): | |
return T.Time(T.Time('1979-01-01')) + T.TimeDelta(time_string, format = 'sec') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment