time_relative_to_ref#

gammapy.utils.time.time_relative_to_ref(time, meta)[source]#

Convert a time using an existing reference.

The time reference is built as MJDREFI + MJDREFF in units of MJD. The time will be converted to seconds after the reference.

Parameters
timeTime

Time to be converted.

metadict

Dictionary with the keywords MJDREFI and MJDREFF.

Returns
time_deltaTimeDelta

Time in seconds after the reference.