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:
time : Time

time to be converted

meta : dict

dictionary with the keywords MJDREFI and MJDREFF

Returns:
time_delta : TimeDelta

time in seconds after the reference