stix2xspec.livetime module

stix2xspec.livetime.livetime_fraction(triggergram, det_used, adg_file='adg_table.json')

Calculate the livetime fraction. Equivalent to _stx_livetime_fraction.pro_. Pileup correction parameter is set to beta = 0.940591 rather than calculating directly via an equivalent to _stx_pileup_corr_parameter.pro_.

Parameters
  • triggergram (stix2xspec.Triggergram) – Triggers associated with input data

  • det_used (np.array) – Array of detectors used in observation

  • adg_file (str, optional) – Name of the ADG file to use

Returns

livetime fraction

Return type

np.array

stix2xspec.livetime.spectrogram_livetime(spectrogram, level=4)

Perform livetime correction to spectrogram counts. Equivalent to _stx_spectrogram_livetime.pro_.

Parameters
  • spectrogram (stix2xspec.Spectrogram) – Input spectrogram from FITS file, with ELUT applied

  • level (int, optional) – Data level of spectrogram. Defaults to 4.

Returns

Livetime-corrected counts corrected_error (np.array): Livetime-corrected error livetime_frac (np.array): Livetime fraction

Return type

corrected_counts (np.array)