nectarchain.utils.stats.CameraSampleStats#
- class CameraSampleStats(shape=(2, 1855, 60), *args, **kwargs)[source]#
Bases:
Statsclass CameraSampleStats Accumulator object for Welfords online / parallel variance algorithm, specialized for trace info
Examples
Cumulating the rawdata from a run to get the average waveform:
>>> from nectarchain.utils.stats import CameraSampleStats >>> from ctapipe_io_nectarcam import NectarCAMEventSource >>> reader = NectarCAMEventSource(input_url='NectarCAM.Run4560.00??.fits.fz') >>> s = CameraSampleStats() >>> for event in reader: >>> s.add(event.r0.tel[0].waveform, >>> validmask=~evt.mon.tel[0].pixel_status.hardware_failing_pixels ) >>> print(s.mean)
Methods
addAdd entry.
copyget_lowcount_maskmergeMerge this accumulator with another one.
Attributes
countmaxmeanminshapestdstddevvariance