straxen.plugins.led_cal package

Submodules

straxen.plugins.led_cal.led_calibration module

Dear nT analyser, if you want to complain please contact:

class straxen.plugins.led_cal.led_calibration.LEDCalibration[source]

Bases: Plugin

LEDCalibration Plugin for PMT LED signal analysis.

This plugin processes raw PMT data and extracts various calibration parameters related to LED signals and noise. It is used during PMT calibration runs to measure LED pulse amplitudes, noise characteristics, and other relevant metrics. The analysis assumes a fixed LED window and computes parameters for both LED-on and LED-off runs.

Key Features:
  • Extracts LED and noise amplitudes.

  • Computes the area of LED pulses using multiple integration windows for noise mitigation.

  • Identifies triggered intervals based on hits.

Returned Variables:
  • area: Area under the LED pulse, averaged over multiple integration windows.

  • area_noise: Area in a noise window far from the LED signal.

  • amplitude_led: Peak amplitude of the LED signal.

  • amplitude_noise: Peak amplitude in a noise window.

  • channel: PMT channel identifier.

  • time: Start time of the interval (ns since UNIX epoch).

  • dt: Time resolution in nanoseconds.

  • length: Length of the interval in samples.

  • triggered: Boolean indicating if a hit was found in the record.

  • hit_position: Sample index of the hit defining the window position.

  • integration_window: Integration window used for area calculations.

  • baseline: Baseline of the record.

area_averaging_length

Dispatch on URL protocol.

unrecognized protocol returns identity inspired by dasks Dispatch and fsspec fs protocols.

area_averaging_step

Dispatch on URL protocol.

unrecognized protocol returns identity inspired by dasks Dispatch and fsspec fs protocols.

baseline_window

Dispatch on URL protocol.

unrecognized protocol returns identity inspired by dasks Dispatch and fsspec fs protocols.

channel_list

Dispatch on URL protocol.

unrecognized protocol returns identity inspired by dasks Dispatch and fsspec fs protocols.

compressor = 'zstd'
compute(raw_records)[source]

The data for LED calibration are build for those PMT which belongs to channel list.

This is used for the different ligh levels. As default value all the PMTs are considered.

data_kind: Union[str, immutabledict, dict] = 'led_cal'
default_run_comments

Dispatch on URL protocol.

unrecognized protocol returns identity inspired by dasks Dispatch and fsspec fs protocols.

depends_on: Union[str, tuple, list] = 'raw_records'
dtype: Union[tuple, np.dtype, immutabledict, dict] = [(('Start time since unix epoch [ns]', 'time'), <class 'numpy.int64'>), (('Length of the interval in samples', 'length'), <class 'numpy.int32'>), (('Width of one sample [ns]', 'dt'), <class 'numpy.int16'>), (('Channel/PMT number', 'channel'), <class 'numpy.int16'>), (('Area averaged in integration windows', 'area'), <class 'numpy.float32'>), (('Area averaged in noise integration windows', 'area_noise'), <class 'numpy.float32'>), (('Amplitude in LED window', 'amplitude_led'), <class 'numpy.float32'>), (('Amplitude in off LED window', 'amplitude_noise'), <class 'numpy.float32'>), (('Whether there was a hit found in the record', 'triggered'), <class 'bool'>), (('Sample index of the hit that defines the window position', 'hit_position'), <class 'numpy.uint8'>), (('Window used for integration', 'integration_window'), <class 'numpy.uint8'>, (2,)), (('Baseline from the record', 'baseline'), <class 'numpy.float32'>)]
fixed_led_window

Dispatch on URL protocol.

unrecognized protocol returns identity inspired by dasks Dispatch and fsspec fs protocols.

fixed_position

Dispatch on URL protocol.

unrecognized protocol returns identity inspired by dasks Dispatch and fsspec fs protocols.

led_cal_hit_min_height_over_noise

Dispatch on URL protocol.

unrecognized protocol returns identity inspired by dasks Dispatch and fsspec fs protocols.

led_cal_record_length

Dispatch on URL protocol.

unrecognized protocol returns identity inspired by dasks Dispatch and fsspec fs protocols.

led_hit_extension

Dispatch on URL protocol.

unrecognized protocol returns identity inspired by dasks Dispatch and fsspec fs protocols.

minimum_led_position

Dispatch on URL protocol.

unrecognized protocol returns identity inspired by dasks Dispatch and fsspec fs protocols.

noise_run_comments

Dispatch on URL protocol.

unrecognized protocol returns identity inspired by dasks Dispatch and fsspec fs protocols.

noise_window

Dispatch on URL protocol.

unrecognized protocol returns identity inspired by dasks Dispatch and fsspec fs protocols.

parallel: Union[str, bool] = 'process'
provides: Union[str, tuple, list] = ('led_calibration',)
rechunk_on_save = False
run_doc

Dispatch on URL protocol.

unrecognized protocol returns identity inspired by dasks Dispatch and fsspec fs protocols.

takes_config = immutabledict({'run_doc': <straxen.config.url_config.URLConfig object>, 'default_run_comments': <straxen.config.url_config.URLConfig object>, 'noise_run_comments': <straxen.config.url_config.URLConfig object>, 'led_cal_record_length': <straxen.config.url_config.URLConfig object>, 'baseline_window': <straxen.config.url_config.URLConfig object>, 'minimum_led_position': <straxen.config.url_config.URLConfig object>, 'fixed_position': <straxen.config.url_config.URLConfig object>, 'led_hit_extension': <straxen.config.url_config.URLConfig object>, 'area_averaging_length': <straxen.config.url_config.URLConfig object>, 'area_averaging_step': <straxen.config.url_config.URLConfig object>, 'fixed_led_window': <straxen.config.url_config.URLConfig object>, 'noise_window': <straxen.config.url_config.URLConfig object>, 'channel_list': <straxen.config.url_config.URLConfig object>, 'led_cal_hit_min_height_over_noise': <straxen.config.url_config.URLConfig object>})
class straxen.plugins.led_cal.led_calibration.nVetoExtTimings[source]

Bases: Plugin

Plugin which computes the time difference delta_time from pulse timing of hitlets_nv to start time of raw_records which belong the hitlets_nv.

They are used as the external trigger timings.

static calc_delta_time(ext_timings_nv_delta_time, pulses, hitlets_nv, nv_pmt_start, nv_pmt_stop)[source]

Numpy access with fancy index returns copy, not view This for-loop is required to substitute in one by one.

channel_map

Dispatch on URL protocol.

unrecognized protocol returns identity inspired by dasks Dispatch and fsspec fs protocols.

compressor = 'zstd'
compute(hitlets_nv, raw_records_nv)[source]
data_kind: Union[str, immutabledict, dict] = 'hitlets_nv'
depends_on: Union[str, tuple, list] = ('raw_records_nv', 'hitlets_nv')
infer_dtype()[source]

Return dtype of computed data; used only if no dtype attribute defined.

provides: Union[str, tuple, list] = ('ext_timings_nv',)
static pulse_dtype()[source]
setup()[source]

Hook if plugin wants to do something on initialization.

takes_config = immutabledict({'channel_map': <straxen.config.url_config.URLConfig object>})

Module contents