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