nectarchain.trr_test_suite.tools_components.ToMComp#

class ToMComp(**kwargs: Any)[source]#

Bases: NectarCAMComponent

This class, ToMComp, is a component of the NectarCAM system that is responsible for processing waveform data. It has several configurable parameters, including the width and shift before the peak of the time window for charge extraction, the peak height threshold.

The __init__ method initializes some important component members, such as timestamps, event type, event ids, pedestal and charge values for both gain channels.

The __call__ method is the main entry point for processing an event. It extracts the waveform data, calculates the pedestal, charge, and time of maximum (ToM) for each pixel, and filters out events that do not meet the peak height threshold. The results are stored in various member variables, which are then returned in the finish method.

The finish method collects the processed data from the member variables and returns a ToMContainer object, which contains the run number, number of pixels, pixel IDs, UCTS timestamps, event types, event IDs, high-gain charge, ToM without fitting, and IDs of good (non-cosmic ray) events.

Methods

add_traits

Dynamically add trait attributes to the HasTraits instance.

class_config_rst_doc

Generate rST documentation for this class' config options.

class_config_section

Get the config section for this class.

class_get_help

Get the help string for this class in ReST format.

class_get_trait_help

Get the helptext string for a single trait.

class_own_trait_events

Get a dict of all event handlers defined on this class, not a parent.

class_own_traits

Get a dict of all the traitlets defined on this class, not a parent.

class_print_help

Get the help string for a single trait and print it.

class_trait_names

Get a list of all the names of this class' traits.

class_traits

Get a dict of all the traits of this class.

finish

from_name

Obtain an instance of a subclass via its name

get_current_config

return the current configuration as a dict (e.g. the values of all traits, even if they were not set during configuration).

has_trait

Returns True if the object has a trait with the specified name.

hold_trait_notifications

Context manager for bundling trait change notifications and cross validation.

non_abstract_subclasses

Get a dict of all non-abstract subclasses of this class.

notify_change

Notify observers of a change event

observe

Setup a handler to be called when a trait changes.

on_trait_change

DEPRECATED: Setup a handler to be called when a trait changes.

section_names

return section names as a list

set_trait

Forcibly sets trait attribute, including read-only attributes.

setup_instance

trait_defaults

Return a trait's default value or a dictionary of them

trait_events

Get a dict of all the event handlers of this class.

trait_has_value

Returns True if the specified trait has a value.

trait_metadata

Get metadata values for trait by key.

trait_names

Get a list of all the names of this class' traits.

trait_values

A dict of trait names and their values.

traits

Get a dict of all the traits of this class.

unobserve

Remove a trait change handler.

unobserve_all

Remove trait change handlers of any type for the specified name.

update_config

Update config and load the new values

Attributes

SubComponents

List of Component names that are used inside current component, this is used to resolve recursively the configurable traits defined in sub-components.

camera

camera_name

config

A trait whose value must be an instance of a specified class.

cross_validation_lock

A contextmanager for running a block with our cross validation lock set to True.

npixels

parent

A trait whose value must be an instance of a specified class.

peak_height

height of peak to consider event not to be just pedestal (ADC counts)

pixels_id

run_number

subarray

tel_id

window_shift

the time in ns before the peak to extract charge

window_width

the duration of the extraction window in ns

peak_height#

height of peak to consider event not to be just pedestal (ADC counts)

window_shift#

the time in ns before the peak to extract charge

window_width#

the duration of the extraction window in ns