How the pieces fit¶
The pieces¶
Piece |
What it is |
Where |
|---|---|---|
|
An immutable container of one detector’s events: the traces of each channel and segment (read-only arrays), and one record per event of the quantities, keyed by |
|
Readout |
How the data were sampled: |
|
Adapter |
The only code that knows a file format: it turns idx dumps, MIDAS files, Parquet or ROOT RQ files into |
|
Registry |
The facts about the detectors (number, type, readout, which channel is wired where in a file format), kept outside the package in folders of TOML files that a dataset definition names with |
|
Dataset definition |
One TOML file naming the raw files, how to read them and the processing to run. Read by goldpan and by goldsluice. |
The flow¶
raw files --adapter--> Events (pulses) --kernels (goldsluice, Rust)--> quantities --Parquet dataset--> goldpan.dataset.Dataset
|-- .processed(): quantities only
|-- .read(): pulses + quantities
goldpan never imports goldsluice. goldsluice’s batch mode imports goldpan, which does the reading and the definition file.
Principles¶
The readout is never assumed. A wrong silent default (the library once assumed 1.6 µs for data sampled every 0.8 µs) changes every time and frequency without an error, so a readout and every algorithm parameter must be given. In a dataset definition,
"@readout.glitch_samples"takes a value from the readout so that the file cannot disagree with itself.A quantity has one definition. Every goldsluice algorithm has a Rust kernel and a Python mirror, and a test requires that they agree with each other and with the goldpan function of the same quantity (or say why there is none).
Provenance travels with the data. A processed file carries the steps, parameters, versions and timing that produced it.
Event numbers restart in every dump, so an event is identified by
series,dumpandevent, never by the number alone.
Status of functions¶
A function in goldpan carries a development status. Functions that are still under development run, but warn on every call, and their entry in the reference says so.