goldsluice.reference.baseline¶
Python mirror of src/baseline.rs: the mean and the standard deviation of the pretrigger window of a trace.
For one trace x of n samples, with w = x[glitch_samples:pretrigger_samples] (the same window as peak uses for its baseline):
baseline_mean= mean ofw;baseline_std= standard deviation ofw(the population one, dividing by the number of samples, asnumpy.std).
Both are in the units of the trace (ADC counts): there is no conversion to amps here, so no amps_per_adc.
This file is written in the kernel subset (see PORTING.md) so that it can be ported to Rust line by line. The deviations are
summed in a second pass over the window (not E[x^2] - E[x]^2), which stays accurate when the baseline is large compared with its scatter.
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.baseline.goldpan_expected(traces, params)[source]¶
The same numbers from
goldpan’s own functions (the analysis side):{output: array}.
- goldsluice.reference.baseline.problem(n_samples, glitch_samples, pretrigger_samples)[source]¶
Why the parameters do not fit a trace of
n_samples, orNoneif they do.