nectarchain.trr_test_suite.tools_components.ChargeContainer#
- class ChargeContainer(prefix=None, **fields)[source]#
Bases:
NectarCAMContainer- This class contains fields that store various properties and data related to
NectarCAM events, including:
run_number: The run number associated with the waveforms.npixels: The number of effective pixels.pixels_id: An array of pixel IDs.ucts_timestamp: An array of UCTS timestamps for the events.event_type: An array of trigger event types.event_id: An array of event IDs.charge_hg: A 2D array of high gain charge values.charge_lg: A 2D array of low gain charge values.
- Attributes:
- run_numberField(default=None, type=uint16)
run number associated to the waveforms
- npixelsField(default=None, type=uint16)
number of effective pixels
- pixels_idField(default=None, dtype=uint16, ndim=1, type=ndarray)
pixel ids
- ucts_timestampField(default=None, dtype=uint64, ndim=1, type=ndarray)
events ucts timestamp
- event_typeField(default=None, dtype=uint8, ndim=1, type=ndarray)
trigger event type
- event_idField(default=None, dtype=uint32, ndim=1, type=ndarray)
event ids
- charge_hgField(default=None, dtype=float64, ndim=2, type=ndarray)
The high gain charge
- charge_lgField(default=None, dtype=float64, ndim=2, type=ndarray)
The low gain charge
- metadict
dict of attached metadata
- prefixstr
Prefix attached to column names when saved to a table or file
Methods
as_dictConvert the
Containerinto a dictionaryfrom_hdf5Reads a container from an HDF5 file.
itemsGenerator over (key, value) pairs for the items
keysGet the keys of the container
resetReset all values back to their default values
updateupdate more than one parameter at once (e.g.
update(x=3,y=4)orupdate(**dict_of_values)).validateCheck that all fields in the Container have the expected characteristics (as defined by the Field metadata).
valuesGet the keys of the container
Attributes
run_numbernpixelspixels_iducts_timestampevent_typeevent_idcharge_hgcharge_lgmetaprefixdefault_prefixfields