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_dict

Convert the Container into a dictionary

from_hdf5

Reads a container from an HDF5 file.

items

Generator over (key, value) pairs for the items

keys

Get the keys of the container

reset

Reset all values back to their default values

update

update more than one parameter at once (e.g. update(x=3,y=4) or update(**dict_of_values)).

validate

Check that all fields in the Container have the expected characteristics (as defined by the Field metadata).

values

Get the keys of the container

Attributes

run_number

npixels

pixels_id

ucts_timestamp

event_type

event_id

charge_hg

charge_lg

meta

prefix

default_prefix

fields