pyspi.utils.function_utils module

pyspi.utils.function_utils.ISDC_MJD(time_object)[source]

Get INTEGRAL MJD time from a given time object

Parameters

time_object – Astropy time object of grb time

Returns

Time in Integral MJD time

pyspi.utils.function_utils.ISDC_MJD_to_cxcsec(ISDC_MJD_time)[source]

Convert ISDC_MJD to UTC

Parameters

ISDC_MJD_time – time in ISDC_MJD time format

Returns

time in cxcsec format (seconds since 1998-01-01 00:00:00)

pyspi.utils.function_utils.find_needed_ids(time)[source]

Get the pointing id of the needed data to cover the GRB time

Returns

Needed pointing id

pyspi.utils.function_utils.find_response_version(time)[source]

Find the correct response version number for a given time

Parameters

time – time of interest

Returns

response version number

pyspi.utils.function_utils.get_time_object(time)[source]

Transform the input into a time object. Input can either be a time object or a string with the format “YYMMDD HHMMSS”

Parameters

time – time object or a string with the format “YYMMDD HHMMSS”

Returns

time object

pyspi.utils.function_utils.leapseconds(time_object)[source]

Hard coded leap seconds from start of INTEGRAL to time of time_object

Parameters

time_object – Time object to which the number of

leapseconds should be detemined

Returns

TimeDelta object of the needed leap seconds