goldsluice.reference.excursion¶
Python mirror of src/excursion.rs: how far a trace strays from its baseline after the pretrigger window, and relative to its noise.
For one trace x of n samples, with the baseline window w = x[glitch_samples:pretrigger_samples], its mean m and its
standard deviation s (the population one, as baseline computes them):
max_deviation= the largestabs(x[i] - m)over the samples after the window,ifrompretrigger_sampleston - 1(the “dev” of the noise-selection notebooks; measuring it over the whole trace would put the window itself in it);excursion_ratio=max_deviation / s(the “ratio”). A window with no scatter (s= 0) givesinfif the trace strays andnanif it does not, as the division does in numpy.
The trace must have at least one sample after the window. This file is written in the kernel subset (see PORTING.md) so that
it can be ported to Rust line by line.
Functions
Inputs both versions must refuse, with the same message: |
|
|
The standard inputs the parity test runs both versions on: |
|
The same numbers from |
|
|
|
Why the parameters do not fit a trace of |
- goldsluice.reference.excursion.goldpan_expected(traces, params)[source]¶
The same numbers from
goldpan.quantities.max_deviationandexcursion_ratio:{output: array}.
- goldsluice.reference.excursion.problem(n_samples, glitch_samples, pretrigger_samples)[source]¶
Why the parameters do not fit a trace of
n_samples, orNoneif they do.