Data class structure#

Spectral & response data#

Data#

class pyspex.spex.data.Data#

Main data class used to set and get observed data.

Variables:
  • ninst (int) – Number of instruments loaded.

  • inst (list of objects) – Python list of instrument objects.

update()#

Update the number of instruments.

Instrument#

class pyspex.spex.data.Instrument#

Properties of an instrument.

Variables:
  • nsector (int) – Number of sectors in instrument.

  • nregion – Number of data regions in response.

  • nreg (int) – Number of regions in data.

  • ncomp (int) – Number of response components.

  • index (int) – Index number of this instrument.

  • sponame (str) – Filename of .spo file.

  • resname (str) – Filename of .res file

  • reg (list of objects) – List of regions for this instrument.

update(iins)#

Update the instrument information.

Parameters:

iins (int) – Instrument number to update.

Region#

class pyspex.spex.data.Region#

Properties of one region.

Variables:
  • index (int) – Region number.

  • emin (float) – Min data energy range (keV).

  • emax (float) – Max data energy range (keV).

  • srccount (float) – Net source counts.

  • srccerr (float) – Net source count error.

  • bkgcount (float) – Subtracted background counts.

  • bkgcerr (float) – Error subtracted background counts.

  • srcrate (float) – Net source count rate (counts/s).

  • srcrerr (float) – Net source count rate error (counts/s).

  • bkgrate (float) – Background count rate subtracted.

  • bkgrerr (float) – Error background count rate subtracted.

  • mbkgrate (float) – Model background count rate.

  • tintmin (float) – Minimum integration time per channel.

  • tintmax (float) – Maximum integration time per channel.

  • tintaver (float) – Average integration time per channel.

update(iins, ireg)#

Update the region properties.

Parameters:
  • iins (int) – Instrument number.

  • ireg (int) – Region number to update.

Counts#

class pyspex.spex.data.Counts#

Counts statistics in a band for a region.

Variables:
  • nchan (int) – Number of used channels.

  • eband (float) – Energy band (keV)

  • elow (float) – Lower limit of energy range (keV)

  • ehigh (float) – Upper limit of energy range (keV)

  • src_count (float) – Number of source counts in energy band (background subtracted)

  • src_count_err (float) – Error on the number of source counts (background subtracted)

  • src_count_rate (float) – Count rate in energy band (counts/s)

  • src_crate_err (float) – Count rate error

  • bkg_count (float) – Number of background counts in energy band

  • bkg_count_err (float) – Error on the number of background counts

  • bkg_count_rate (float) – Background count rate in energy band

  • bkg_crate_err (float) – Background count rate error

update(iins, ireg, r1, r2, unit)#

Update the counts statistics for an instrument and region.

Parameters:
  • iins (int) – Instrument number.

  • ireg (int) – Region number to update.

  • r1 (float) – Lower energy range

  • r2 (float) – Upper energy range

  • unit (str) – Units of energy range