straxen.plugins.merged_s2s package

Submodules

straxen.plugins.merged_s2s.merged_s2s module

class straxen.plugins.merged_s2s.merged_s2s.MergedS2s[source]

Bases: OverlapWindowPlugin

Merge together peaklets if peak finding favours that they would form a single peak instead.

compute(peaklets, lone_hits)[source]
data_kind: Union[str, immutabledict, dict] = 'merged_s2s'
depends_on: Tuple[str, ...] = ('peaklets', 'peaklet_classification', 'lone_hits')
gain_model

Dispatch on URL protocol.

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

static get_merge_instructions(peaklet_starts, peaklet_ends, areas, types, gap_thresholds, max_duration, max_gap, max_area, sort_kind='mergesort')[source]

Finding the group of peaklets to merge. To do this start with the smallest gaps and keep merging until the new, merged S2 has such a large area or gap to adjacent peaks that merging is not required anymore. see https://github.com/XENONnT/straxen/pull/548 and https://github.com/XENONnT/straxen/pull/568

Returns:

list of the first index of peaklet to be merged and

list of the exclusive last index of peaklet to be merged

get_window_size()[source]

Return the required window size in nanoseconds.

infer_dtype()[source]

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

merge_without_s1

Dispatch on URL protocol.

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

merged_s2s_get_window_size_factor

Dispatch on URL protocol.

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

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.

provides: tuple = ('merged_s2s',)
s2_merge_gap_thresholds

Dispatch on URL protocol.

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

s2_merge_max_duration

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({'s2_merge_max_duration': <straxen.url_config.URLConfig object>, 's2_merge_gap_thresholds': <straxen.url_config.URLConfig object>, 'gain_model': <straxen.url_config.URLConfig object>, 'merge_without_s1': <straxen.url_config.URLConfig object>, 'n_top_pmts': <straxen.url_config.URLConfig object>, 'n_tpc_pmts': <straxen.url_config.URLConfig object>, 'sum_waveform_top_array': <straxen.url_config.URLConfig object>, 'merged_s2s_get_window_size_factor': <straxen.url_config.URLConfig object>})

Module contents