goldsluice.reference.integral

Python mirror of src/integral.rs: the integral of the baseline-subtracted trace over the whole trace.

For one trace x of n samples:

  • baseline = mean of x[glitch_samples:pretrigger_samples] (the window peak and baseline use);

  • integral = sum over all n samples of (x[i] - baseline), times sample_period_s: the unit of the trace times seconds.

The sum runs over the whole trace, the baseline window and the glitch samples included, as goldpan.algorithms.integral does. sample_period_s has no default: it belongs to the readout.

This file is written in the kernel subset (see PORTING.md) so that it can be ported to Rust line by line.

Functions

bad_cases()

Inputs both versions must refuse, with the same message: [(traces, params), ...].

cases()

The standard inputs the parity test runs both versions on: [(traces, params), ...].

goldpan_expected(traces, params)

The same numbers from goldpan.algorithms.integral: {output: array}.

kernel(trace, glitch_samples, ...)

problem(n_samples, glitch_samples, ...)

Why the parameters do not fit a trace of n_samples, or None if they do.

goldsluice.reference.integral.goldpan_expected(traces, params)[source]

The same numbers from goldpan.algorithms.integral: {output: array}.

goldsluice.reference.integral.problem(n_samples, glitch_samples, pretrigger_samples, sample_period_s)[source]

Why the parameters do not fit a trace of n_samples, or None if they do.

goldsluice.reference.integral.kernel(trace, glitch_samples, pretrigger_samples, sample_period_s)[source]
goldsluice.reference.integral.cases()[source]

The standard inputs the parity test runs both versions on: [(traces, params), ...].

goldsluice.reference.integral.bad_cases()[source]

Inputs both versions must refuse, with the same message: [(traces, params), ...].