padre_meddea.spectrum.spectrum.PhotonList#

class padre_meddea.spectrum.spectrum.PhotonList(pkt_list: TimeSeries, event_list: TimeSeries)[source]#

Data container for MeDDEA photon or event list data

Parameters:
  • pkt_list (TimeSeries) – The time series of photon packet header data.

  • event_list (TimeSeries) – The time series of event data

Examples

>>> from padre_meddea.io import read_file
>>> from padre_meddea.util.pixels import PixelList
>>> ph_list = read_file("padre_meddea_l0test_photons_20250504T070411_v0.1.0.fits")
>>> this_spectrum = ph_list.spectrum(pixel_list=ph_list.pixel_list)
_slice_event_list_pixels(pixel_list: PixelList) TimeSeries[source]#

Slice the event list to only contain events from asic_num and pixel_num

_slice_event_list_sr(sr: SpectralRegion)[source]#

Slice the envt list to only contain events inside the spectral region.

_text_summary()[source]#
property calibrated#
data_rate() BinnedTimeSeries[source]#

Return a BinnedTimeseries of the data rate.

Returns:

data_rate (BinnedTimeSeries)

lightcurve(pixel_list: PixelList, int_time: Annotated[Quantity, Unit('s')], sr: SpectralRegion, step: int = 10) TimeSeries[source]#

Create a light curve

Parameters:
  • pixel_list (PixelList) – The pixels to integrate over

  • int_time (u.Quantity[u.s]) – The integration time for each time step

  • sr (SpectralRegion) – The spectral region(s) to integrate over

  • step (int) – To speed up processing, skip every step photons. Default is ten. The light curve count rate is corrected by multiplying by step.

Returns:

lc (TimeSeries)

property pixel_list: PixelList#

Return the set of pixels that have events

spectrum(pixel_list: PixelList, bins=None, baseline_sub: bool = False, calibrate: bool = False) Spectrum1D[source]#

Create a spectrum

Parameters:
  • pixel_list (PixelList) – A list of one or more pixels

  • bins (np.array) – The bin edges for the spectrum (see ~np.histogram). If None, then uses np.arange(0, 2**12 - 1)

  • baseline_sub (bool) – If True, then baseline measurements are subtracted if they exist Note: not yet implemented.

  • calibrate (bool) – If True, provide the calibrated spectrum

Returns:

spectrum (Spectrum1D)