straxen.plugins.peaklets package

Submodules

straxen.plugins.peaklets.peaklet_classification module

class straxen.plugins.peaklets.peaklet_classification.PeakletClassification[source]

Bases: Plugin

Classify peaklets as unknown, S1, or S2.

compute(peaklets)[source]
depends_on: tuple = 'peaklets'
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.int32'>), (('Channel/PMT number', 'channel'), <class 'numpy.int16'>), ('type', <class 'numpy.int8'>, 'Classification of the peak(let)')]
n_top_pmts

Dispatch on URL protocol.

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

parallel: Union[str, bool] = True
provides: str | tuple = ('peaklet_classification',)
s1_flatten_threshold_aft

Dispatch on URL protocol.

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

s1_max_rise_time_post100

Dispatch on URL protocol.

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

s1_min_coincidence

Dispatch on URL protocol.

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

s1_risetime_aft_parameters

Dispatch on URL protocol.

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

s1_risetime_area_parameters

Dispatch on URL protocol.

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

s2_min_pmts

Dispatch on URL protocol.

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

takes_config = immutabledict({'s1_risetime_area_parameters': <straxen.url_config.URLConfig object>, 's1_risetime_aft_parameters': <straxen.url_config.URLConfig object>, 's1_flatten_threshold_aft': <straxen.url_config.URLConfig object>, 'n_top_pmts': <straxen.url_config.URLConfig object>, 's1_max_rise_time_post100': <straxen.url_config.URLConfig object>, 's1_min_coincidence': <straxen.url_config.URLConfig object>, 's2_min_pmts': <straxen.url_config.URLConfig object>})
static upper_rise_time_aft_boundary(aft, slope, offset, aft_boundary, flat_threshold)[source]

Function which computes the upper rise time boundary as a function of area fraction top.

static upper_rise_time_area_boundary(area, norm, const, tau)[source]

Function which determines the upper boundary for the rise-time for a given area.

straxen.plugins.peaklets.peaklets module

class straxen.plugins.peaklets.peaklets.Peaklets[source]

Bases: Plugin

Split records into:
  • peaklets

  • lone_hits

Peaklets are very aggressively split peaks such that we are able to find S1-S2s even if they are close to each other. (S2) Peaks that are split into too many peaklets will be merged later on.

To get Peaklets from records apply/do:
  1. Hit finding

  2. Peak finding

  3. Peak splitting using the natural breaks algorithm

  4. Compute the digital sum waveform

Lone hits are all hits which are outside of any peak. The area of lone_hits includes the left and right hit extension, except the extension overlaps with any peaks or other hits.

static add_hit_features(hitlets, hit_max_times, peaklets)[source]

Create hits timing features.

Parameters:
  • hitlets_max – hitlets with only max height time.

  • peaklets – Peaklets for which intervals should be computed.

Returns:

array of peaklet_timing dtype.

channel_map

Dispatch on URL protocol.

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

static clip_peaklet_times(peaklets, start, end)[source]
compressor = 'zstd'
compute(records, start, end)[source]
static create_outside_peaks_region(peaklets, start, end)[source]

Creates time intervals which are outside peaks.

Parameters:
  • peaklets – Peaklets for which intervals should be computed.

  • start – Chunk start

  • end – Chunk end

Returns:

array of strax.time_fields dtype.

data_kind: Dict[str, str] | str = {'lone_hits': 'lone_hits', 'peaklets': 'peaklets'}
depends_on: tuple = 'records'
diagnose_sorting

Dispatch on URL protocol.

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

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.

infer_dtype()[source]

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

n_top_pmts

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.

natural_breaks_threshold(peaks)[source]
parallel: Union[str, bool] = 'process'
peak_left_extension

Dispatch on URL protocol.

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

peak_min_pmts

Dispatch on URL protocol.

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

peak_right_extension

Dispatch on URL protocol.

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

peak_split_filter_wing_width

Dispatch on URL protocol.

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

peak_split_gof_threshold

Dispatch on URL protocol.

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

peak_split_iterations

Dispatch on URL protocol.

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

peak_split_min_area

Dispatch on URL protocol.

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

peaklet_gap_threshold

Dispatch on URL protocol.

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

peaklet_max_duration

Dispatch on URL protocol.

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

provides: Tuple[str, ...] | str = ('peaklets', 'lone_hits')
saturation_correction_on

Dispatch on URL protocol.

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

saturation_min_reference_length

Dispatch on URL protocol.

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

saturation_reference_length

Dispatch on URL protocol.

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

setup()[source]

Hook if plugin wants to do something on initialization.

sum_waveform_top_array

Dispatch on URL protocol.

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

takes_config = immutabledict({'peaklet_gap_threshold': <straxen.url_config.URLConfig object>, 'peak_left_extension': <straxen.url_config.URLConfig object>, 'peak_right_extension': <straxen.url_config.URLConfig object>, 'peak_min_pmts': <straxen.url_config.URLConfig object>, 'peak_split_gof_threshold': <straxen.url_config.URLConfig object>, 'peak_split_filter_wing_width': <straxen.url_config.URLConfig object>, 'peak_split_min_area': <straxen.url_config.URLConfig object>, 'peak_split_iterations': <straxen.url_config.URLConfig object>, 'diagnose_sorting': <straxen.url_config.URLConfig object>, 'gain_model': <straxen.url_config.URLConfig object>, 'tight_coincidence_window_left': <straxen.url_config.URLConfig object>, 'tight_coincidence_window_right': <straxen.url_config.URLConfig object>, 'n_tpc_pmts': <straxen.url_config.URLConfig object>, 'n_top_pmts': <straxen.url_config.URLConfig object>, 'sum_waveform_top_array': <straxen.url_config.URLConfig object>, 'saturation_correction_on': <straxen.url_config.URLConfig object>, 'saturation_reference_length': <straxen.url_config.URLConfig object>, 'saturation_min_reference_length': <straxen.url_config.URLConfig object>, 'peaklet_max_duration': <straxen.url_config.URLConfig object>, 'channel_map': <straxen.url_config.URLConfig object>, 'hit_min_amplitude': <straxen.url_config.URLConfig object>})
tight_coincidence_window_left

Dispatch on URL protocol.

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

tight_coincidence_window_right

Dispatch on URL protocol.

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

Module contents