Say you have a time 2022-01-01T00:01:02 and we want to put it into the DRMS time string request style.
Here’s a function that does that:
def time_to_aia_tai(t: atime.Time) → str:
‘’‘Generate a DRMS AIA string from an astropy time’‘’
parse_str = “{year}-{month}-{day}T{hh}:{mm}:{ss}”
parsed_aia = parse.parse(parse_str, str(t.tai)).named
fmt_str = “{year}.{month}.{day}_{hh}:{mm}:{ss}_TAI”
return fmt_str.format(**parsed_aia)
Does something like this exist in DRMS already? Could be useful. Thanks