BackRates

class gdt.missions.gifts.trigdat.BackRates[source]

Bases: BackRates

GIFTS background rates data in Trigdat.

Attributes Summary

all_rates

An array (num_chans, num_dets) of the background rates

num_chans

The number of energy channels

num_dets

The number of detectors

quality

The quality flags for the background

time_range

The time range of the background rates

Methods Summary

create([tstart, tstop, quality, rates])

Create a BackRates object from keywords.

from_recarray(rec_array)

Create from a FITS or numpy record array.

get_detector(det)

Retrieve the background rates for a detector

to_recarray()

Convert contents of the object to a numpy record array

Attributes Documentation

all_rates

An array (num_chans, num_dets) of the background rates

Type:

(np.array)

num_chans

The number of energy channels

Type:

(int)

num_dets

The number of detectors

Type:

(int)

quality

The quality flags for the background

Type:

(int, int)

time_range

The time range of the background rates

Type:

(float, float)

Methods Documentation

classmethod create(tstart=None, tstop=None, quality=None, rates=None)[source]

Create a BackRates object from keywords.

Parameters:
  • tstart (float, optional) – The start time of the MaxRates interval

  • tstop (float, optional) – The stop time of the MaxRates interval

  • quality (int, int) – Quality flags

  • rates (np.array) – The (num channels, num detectors) rates array

Returns:

(BackRates)

classmethod from_recarray(rec_array)[source]

Create from a FITS or numpy record array.

Parameters:

rec_array (np.recarray) – The FITS BCKRATES record array from the trigdat file

Returns:

(BackRates)

get_detector(det)[source]

Retrieve the background rates for a detector

Parameters:

det (str) – The detector

Returns:

np.array

An array of size (num_chans,) of background rates

for the detector

to_recarray()[source]

Convert contents of the object to a numpy record array

Returns:

(np.recarray)