Note

You are not reading the most up to date version of Gammapy documentation.
Access the latest stable version v1.3 or the list of Gammapy releases.

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