FregateLightCurve

class gdt.missions.hete2.fregate.lightcurve.FregateLightCurve[source]

Bases: FitsFileContextManager

FREGATE lightcurve file containing PHAII from multiple detectors.

Attributes Summary

detectors

The detectors in the file

filename

The filename

gti

Retrieve the GTI extension data.

hdulist

The list of Header Data Units

headers

The headers

num_dets

Number of detectors in the file

num_hdus

The number of HDUs

Methods Summary

close()

Close the file

column(hdu_num, col_name)

Return a column from an HDU as an array.

columns_as_array(hdu_num, col_names[, dtype])

Return a list of columns from an HDU as an array.

energy_bands(detector)

get_column_names(hdu_num)

Get the column names in a HDU.

num_energy_bands(detector)

open(file_path, **kwargs)

Open a FREGATE file containing PHA time series from multiple detectors.

phaii(detector, energy_band)

Retrieve the Phaii object for the given detector.

time_bins(detector, energy_band)

time_energy_bins(detector, energy_band)

Retrieve the TimeEnergyBins object for the given detector.

write(directory[, filename])

Write the file to disk.

Attributes Documentation

detectors

The detectors in the file

Type:

(list)

filename

The filename

Type:

(str)

gti

Retrieve the GTI extension data.

Returns:

(Gti)

hdulist

The list of Header Data Units

Type:

(astropy.io.fits.hdu.HDUList)

headers

The headers

Type:

(FileHeaders)

num_dets

Number of detectors in the file

Type:

(int)

num_hdus

The number of HDUs

Type:

(int)

Methods Documentation

close()

Close the file

column(hdu_num: int, col_name: str) array

Return a column from an HDU as an array.

Parameters:
  • hdu_num (int) – The HDU number

  • col_name (str) – The name of the column

Returns:

(np.array)

columns_as_array(hdu_num: int, col_names: List[str], dtype: dtype = None) array

Return a list of columns from an HDU as an array.

Parameters:
  • hdu_num (int) – The HDU number

  • col_names (list of str) – The names of the columns

  • dtype (np.dtype, optional) – The custom dtype of the output array

Returns:

(np.array)

energy_bands(detector: FregateDetectors | str | int)[source]
get_column_names(hdu_num: int)

Get the column names in a HDU. Returns empty if there is no data extension in the HDU.

Parameters:

hdu_num (int) – The HDU number

Returns:

(tuple)

num_energy_bands(detector: FregateDetectors | str | int)[source]
classmethod open(file_path, **kwargs)[source]

Open a FREGATE file containing PHA time series from multiple detectors.

Parameters:

file_path (str) – The file path

Returns:

(FregateLightCurve)

phaii(detector: str | int | FregateDetectors, energy_band: int) Phaii[source]

Retrieve the Phaii object for the given detector.

Parameters:
  • detector (str, int, or FregateDetectors) –

  • energy_band (int) –

Returns:

(Phaii)

time_bins(detector: FregateDetectors | str | int, energy_band: int) TimeBins[source]
time_energy_bins(detector: str | int | FregateDetectors, energy_band: int) TimeEnergyBins[source]

Retrieve the TimeEnergyBins object for the given detector.

Parameters:
  • detector (str, int, or FregateDetectors) –

  • energy_band (int) –

Returns:

(TimeEnergyBins)

write(directory: str | Path, filename: str = None, **kwargs)

Write the file to disk.

Parameters:
  • directory (str) – The directory to write the file.

  • filename (str, optional) – The filename. If omitted, attempts to use the filename if set.