MaxRates

class gdt.missions.fermi.gbm.trigdat.MaxRates[source]

Bases: object

Class for the MAXRATES and TRIGRATE data in Trigdat.

Attributes Summary

all_rates

An array (num_chans, num_dets) of the maxrates

eic

The position of Fermi in Earth inertial coordinates

num_chans

The number of energy channels

num_dets

The number of detectors

quaternion

The quaternions at the maxrates time

time_range

The time range of the maxrates

timescale

The timescale of the maxrates

Methods Summary

create([tstart, tstop, quaternion, eic, rates])

Create a MaxRates object from keywords.

from_recarray(rec_array)

Create from a FITS or numpy record array.

get_detector(det)

Retrieve the 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 maxrates

Type:

(np.array)

eic

The position of Fermi in Earth inertial coordinates

Type:

(np.array)

num_chans

The number of energy channels

Type:

(int)

num_dets

The number of detectors

Type:

(int)

quaternion

The quaternions at the maxrates time

Type:

(np.array)

time_range

The time range of the maxrates

Type:

(float, float)

timescale

The timescale of the maxrates

Type:

(float)

Methods Documentation

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

Create a MaxRates object from keywords.

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

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

  • quaternion (np.array, optional) – The attitude quaternion

  • eic (np.array, optional) – The position in earth inertial coordinates

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

Returns:

(MaxRates)

classmethod from_recarray(rec_array)[source]

Create from a FITS or numpy record array.

Parameters:

rec_array (np.recarray) – The FITS TRIGRATE or MAXRATES record array from the trigdat file

Returns:

(MaxRates)

get_detector(det)[source]

Retrieve the rates for a detector

Parameters:

det (str) – The detector

Returns:

(np.array)

to_recarray()[source]

Convert contents of the object to a numpy record array.

Returns:

(np.recarray)