nectarchain.dqm.dqm_summary_processor.DQMSummary#
- class DQMSummary(r0=False)[source]#
Bases:
objectBase class for DQM summary processors.
Provides the interface for per-run initialisation, per-event processing, result aggregation, plotting, and FITS serialisation of DQM outputs.
Initialise the summary processor.
- Parameters:
- r0bool, optional
Whether to use R0 waveforms (skip R1 corrections).
Methods
Configure the processor for a new run.
Extract camera geometry from the first event of a run.
Finalise per-run accumulations.
Return aggregated results as a dictionary.
Generate and save summary plots.
Process a single event.
Write all DQM results to a multi-extension FITS file.
- configure_for_run()[source]#
Configure the processor for a new run.
Subclasses may override this to perform additional setup.
- define_for_run(reader1)[source]#
Extract camera geometry from the first event of a run.
- Parameters:
- reader1ctapipe_io_nectarcam.LightNectarCAMEventSource
Event source whose first event is used to retrieve the number of pixels and samples.
- Returns:
- tuple of (int, int)
Number of pixels and number of samples.
- finish_run(M, M_ped, counter_evt, counter_ped)[source]#
Finalise per-run accumulations.
- Parameters:
- Mnp.ndarray
Accumulated physics-event data.
- M_pednp.ndarray
Accumulated pedestal-event data.
- counter_evtint
Number of physics events processed.
- counter_pedint
Number of pedestal events processed.
- get_results()[source]#
Return aggregated results as a dictionary.
- Returns:
- dict
Dictionary of result names to computed arrays or tables.
- plot_results(name, fig_path, k, M, M_ped, Mean_M_overPix, Mean_M_ped_overPix)[source]#
Generate and save summary plots.
- Parameters:
- namestr
Base name for the plot files.
- fig_pathstr
Directory where plots should be saved.
- kint
Gain channel index.
- Mnp.ndarray
Physics-event accumulations.
- M_pednp.ndarray
Pedestal-event accumulations.
- Mean_M_overPixnp.ndarray
Physics mean over pixels.
- Mean_M_ped_overPixnp.ndarray
Pedestal mean over pixels.