BatseEnergyCalib

class gdt.missions.cgro.batse.phaii.BatseEnergyCalib[source]

Bases: object

BATSE Energy Calibration data, which is stored in PHAII and event list files. There may be multiple detectors in the energy calibration, and there may be multiple calibrations with associated time ranges.

This class is not intended to be instantiated by the user, but is rather instantiated when reading a data file.

Attributes Summary

detectors

The detectors in the calibration

num_dets

Number of detectors in the calibration

num_times

Number of calibration times

Methods Summary

combine_detectors(calib_list)

Combines the calibrations from different detectors.

edges_at_time(det, time)

The energy edges for a given detector at a given time.

edges_over_timespan(det, t0, t1)

The energy edges for a given detector covering a timespan.

from_hdu(hdu_data)

Create a BatseEnergyCalib object from a FITS HDU data table

get_detector(det)

Return a new BatseEnergyCalib containing only the requested detector calibration.

Attributes Documentation

detectors

The detectors in the calibration

Type:

(list)

num_dets

Number of detectors in the calibration

Type:

(int)

num_times

Number of calibration times

Type:

(int)

Methods Documentation

classmethod combine_detectors(calib_list)[source]

Combines the calibrations from different detectors. This assumes the number of calibrations are the same and made at the same times between all of the detectors. The output is a calibration with edges that are the geometric mean of the edges from the input detectors.

Parameters:

calib_list (list) – List of BatseEnergyCalib

Returns:

(BatseEnergyCalib)

edges_at_time(det, time)[source]

The energy edges for a given detector at a given time.

Parameters:
  • det (int) – The detector number

  • time (float) – The CGRO MET

Returns:

(np.array)

edges_over_timespan(det, t0, t1)[source]

The energy edges for a given detector covering a timespan. The timespan may cover multiple energy calibrations, so the energy calibrations are weighted by the amount of time spanned until the next calibration.

Parameters:
  • det (int) – The detector number

  • tstart (float) – The start time in CGRO MET

  • tstop (float) – The stop time in CGRO MET

Returns:

(np.array)

classmethod from_hdu(hdu_data)[source]

Create a BatseEnergyCalib object from a FITS HDU data table

Parameters:

hdu_data (astropy.io.FITS_rec) –

Returns:

(BatseEnergyCalib)

get_detector(det)[source]

Return a new BatseEnergyCalib containing only the requested detector calibration.

Parameters:

det (int) – Detector number

Returns:

(BatseEnergyCalib)