goldsluice.algorithms

Run an algorithm by name on either backend: the compiled Rust kernel or its Python mirror.

from goldsluice import run out = run(“peak”, traces, glitch_samples=10, pretrigger_samples=1000, amps_per_adc=1.5e-9) out[“adc_max”], out[“current_max”] # one value per trace run(“peak”, traces, backend=”python”, …) # the mirror: slow, for development and checking

traces is an array of shape (n_events, n_samples) (one channel); it is converted to C-contiguous float64. Every parameter is keyword-only and has no default.

Most algorithms reduce a trace to numbers (KIND = "quantities": one value per trace for each name in OUTPUTS). A few transform a trace into another trace (KIND = "trace", OUTPUTS = ("trace",)): a filter, a baseline subtraction. Their result is an array of the shape of traces, and a batch run can hand it to the steps that name it as their input (goldpan.dataset).

Functions

kind(name)

"quantities" (the algorithm reduces a trace to numbers) or "trace" (it returns a trace of the same length).

run(name, traces, *[, backend])

{output name: array of one value per trace} of algorithm name; backend is "rust" or "python".

goldsluice.algorithms.kind(name)[source]

"quantities" (the algorithm reduces a trace to numbers) or "trace" (it returns a trace of the same length).

Return type:

str

goldsluice.algorithms.run(name, traces, *, backend='rust', **params)[source]

{output name: array of one value per trace} of algorithm name; backend is "rust" or "python".