straxen.plugins.afterpulses package
Submodules
straxen.plugins.afterpulses.afterpulse_processing module
- class straxen.plugins.afterpulses.afterpulse_processing.LEDAfterpulseProcessing[source]
Bases:
PluginPlugin for processing LED afterpulses.
Detect LED pulses and afterpulses (APs) in raw_records waveforms. Compute the AP datatype.
- LED_hit_left_boundary
Dispatch on URL protocol.
unrecognized protocol returns identity inspired by dasks Dispatch and fsspec fs protocols.
- LED_hit_right_boundary
Dispatch on URL protocol.
unrecognized protocol returns identity inspired by dasks Dispatch and fsspec fs protocols.
- LED_window_width
Dispatch on URL protocol.
unrecognized protocol returns identity inspired by dasks Dispatch and fsspec fs protocols.
- baseline_samples
Dispatch on URL protocol.
unrecognized protocol returns identity inspired by dasks Dispatch and fsspec fs protocols.
- compressor = 'zstd'
- gain_model
Dispatch on URL protocol.
unrecognized protocol returns identity inspired by dasks Dispatch and fsspec fs protocols.
- hit_min_amplitude
Dispatch on URL protocol.
unrecognized protocol returns identity inspired by dasks Dispatch and fsspec fs protocols.
- hit_min_height_over_noise
Dispatch on URL protocol.
unrecognized protocol returns identity inspired by dasks Dispatch and fsspec fs protocols.
- n_tpc_pmts
Dispatch on URL protocol.
unrecognized protocol returns identity inspired by dasks Dispatch and fsspec fs protocols.
- rechunk_on_save = True
- save_outside_hits
Dispatch on URL protocol.
unrecognized protocol returns identity inspired by dasks Dispatch and fsspec fs protocols.
- takes_config = immutabledict({'gain_model': <straxen.config.url_config.URLConfig object>, 'n_tpc_pmts': <straxen.config.url_config.URLConfig object>, 'LED_hit_left_boundary': <straxen.config.url_config.URLConfig object>, 'LED_hit_right_boundary': <straxen.config.url_config.URLConfig object>, 'LED_window_width': <straxen.config.url_config.URLConfig object>, 'baseline_samples': <straxen.config.url_config.URLConfig object>, 'hit_min_amplitude': <straxen.config.url_config.URLConfig object>, 'hit_min_height_over_noise': <straxen.config.url_config.URLConfig object>, 'save_outside_hits': <straxen.config.url_config.URLConfig object>})
- straxen.plugins.afterpulses.afterpulse_processing.dtype_afterpulses()[source]
The afterpulse datatype.
Return: - The afterpulse datatype
- straxen.plugins.afterpulses.afterpulse_processing.find_ap(hits, records, LED_hit_left_boundary, LED_hit_right_boundary, LED_window_width, hit_left_extension, hit_right_extension)[source]
Find afterpulses (APs) in the given hits data within specified LED hit boundaries and extensions.
Parameters
- hits :
Array containing hit data.
- records :
Array containing record data.
- LED_hit_left_boundary :
Left boundary of the LED hit window.
- LED_hit_right_boundary :
Right boundary of the LED hit window.
- LED_window_width :
Extension to the right of the first hit found in the LED hit window within which hits are merged into the LED hit.
- hit_left_extension :
Extension to the left of the hit window.
- hit_right_extension :
Extension to the right of the hit window.
Returns
Array containing afterpulse data.
Notes
Hits to the left of the LED_hit_left_boundary are ignored.
If no hit is found between LED_hit_left_boundary and LED_hit_right_boundary
the record is skipped. - The merged LED hits are also saved and can be selected for by having t_delay = 0 by definition.
- straxen.plugins.afterpulses.afterpulse_processing.get_sample_area_quantile(data, quantile, baseline_fpart)[source]
Return the index of the first sample in the hit where the integrated area of the hit to that index is above the specified quantile of the total area.
Parameters: - data :
Array containing the baselined waveform data of the hit.
- quantile :
The quantile (0 to 1) representing the threshold for the area.
- baseline_fpart :
Fractional part of the baseline (baseline % 1) of the record
Return: - int: The index of the first sample where the area exceeds the quantile of the total area.
If no such sample is found, returns 0.
Notes: - If no quantile is found where the area exceeds the threshold, it returns 0. This is usually caused by real events in the baseline window, which can result in a negative area.