goldsluice.reference.rise_crossing¶
Python mirror of src/rise_crossing.rs: the time at which the rising edge of the largest pulse of a trace crosses fraction of its height (s).
For one trace x of n samples:
baseline= mean ofx[glitch_samples:pretrigger_samples], andy[i] = x[i] - baseline;the peak is the first largest
yover allnsamples (the glitch and the window included), at indexpeakwith heightamp;level=fraction * amp, andi= the last indexi <= peakwithy[i] < level, or -1 if there is none;the crossing lies between samples
iandi + 1, and is found by linear interpolation:crossing_time_s=(i + (level - y[i]) / (y[i + 1] - y[i])) * sample_period_s, from the start of the trace (asmax_time_s);the result is
nanunlessamp > 0andiwas found (a trace with no positive peak, or that never lies below the level before its peak).
This is the same last-crossing rule as rise_time, for one level, with the sample fraction kept (a rise time of a few samples is
too coarse to tell where on the face an event is). It is computed on the trace as it is: no filter is applied, so it is noisier than
a time taken from a filtered pulse. fraction has no default: 0.2 gives the 20 % time that the collaboration’s position quantities
(xdel, ydel, the delays between channels) are made of. A step of a definition file writes it. 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: |
|
|
|
Why the parameters do not fit a trace of |
- goldsluice.reference.rise_crossing.problem(n_samples, glitch_samples, pretrigger_samples, sample_period_s, fraction)[source]¶
Why the parameters do not fit a trace of
n_samples, orNoneif they do.
- goldsluice.reference.rise_crossing.kernel(trace, glitch_samples, pretrigger_samples, sample_period_s, fraction)[source]¶