nectarchain.makers.component.preflatfield_component.PreFlatFieldComponent#

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

Bases: NectarCAMComponent

Component that computes flat field coefficients from raw data.

Parameters:
window_shift: int

time in ns before the peak to integrate charge (default value = 5)

window_width: int

duration of the extraction window in ns (default value = 12)

gain: list

array of gain value

bad_pix: list

list of bad pixels (default value = [])

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.

make_masked_array

Define an array that will be used as a mask on the waveforms for the calculation of the integrated amplitude of the signal

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

subtract_pedestal

Subtract the pedestal defined as the average of the first samples of each trace

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.

bad_pix

list of bad pixels

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.

gain

default gain value

npixels

parent

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

pixels_id

run_number

subarray

window_shift

the time in ns before the peak to integrate charge

window_width

the duration of the extraction window in ns

bad_pix#

list of bad pixels

gain#

default gain value

static make_masked_array(t_peak, window_shift, window_width)[source]#

Define an array that will be used as a mask on the waveforms for the calculation of the integrated amplitude of the signal

Args:

t_peak: sample corresponding the the highest peak of the trace window_shift: number of samples before the peak to integrate charge window_width: duration of the extraction window in samples

Returns:

masked_wfs: a mask array

static subtract_pedestal(wfs, window=20)[source]#

Subtract the pedestal defined as the average of the first samples of each trace

Args:

wfs: raw wavefroms window: number of samples n to calculate the pedestal (default value is 20)

Returns:

wfs_pedsub: wavefroms subtracted from the pedestal

window_shift#

the time in ns before the peak to integrate charge

window_width#

the duration of the extraction window in ns