goldsluice.reference.rise_time

Python mirror of src/rise_time.rs: the 10-90 % rise time of the largest pulse of a trace (s), as goldpan.algorithms.rise_time.

For one trace x of n samples:

  • baseline = mean of x[glitch_samples:pretrigger_samples], and y[i] = x[i] - baseline;

  • the peak is the first largest y over all n samples (the glitch and the window included), at index peak with height amp;

  • i_lo (i_hi) = the last index i <= peak with y[i] < lo * amp (hi * amp), or -1 if there is none;

  • rise_time_s = (i_hi - i_lo) * sample_period_s, and nan unless amp > 0 and both indices were found (a trace with no positive peak, or that never lies below the lo level before its peak).

lo and hi have no defaults here (the collaboration’s 10 and 90 % are lo = 0.1, hi = 0.9): they are part of the definition of the quantity, so a definition file writes them. 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.rise_time: {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.rise_time.goldpan_expected(traces, params)[source]

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

goldsluice.reference.rise_time.problem(n_samples, glitch_samples, pretrigger_samples, sample_period_s, lo, hi)[source]

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

goldsluice.reference.rise_time.kernel(trace, glitch_samples, pretrigger_samples, sample_period_s, lo, hi)[source]
goldsluice.reference.rise_time.cases()[source]

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

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

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