goldpan

goldpan: analysis of digitized pulses together with their scalar quantities.

The modules (import what you need; none is imported automatically, so that optional dependencies such as h5py are only needed by the modules that use them):

  • goldpan.config the readout of your data (PulseConfig, with the presets DCRC_RUN76 and Z7); it has no defaults

  • goldpan.data the immutable container of one detector’s events (Events, Detector, Readout; needs awkward)

  • goldpan.quantities per-pulse numbers (baseline, excursion, spectrum, …)

  • goldpan.cuts selections built from the quantities

  • goldpan.operations pulse in, pulse out (baseline subtraction, glitch trimming)

  • goldpan.io loading traces of a dump into arrays

  • goldpan.rqdata the RQs of a list of series as numpy arrays, with an on-disk cache (load(dataset, rqs); needs uproot)

  • goldpan.runmeta run metadata (high voltage, trigger setting) per event, joined by series, and chunks of events by it

  • goldpan.archive writing and reading HDF5 archives of selected pulses

  • goldpan.channels which physical channel is a dump’s (detector, channel); the map of the Run 76 readout

  • goldpan.status the @status tag of every public function

The flat names of the first versions (pulse_quantities, pulse_cuts, …) still work: they are aliases of these modules with the Run 76 readout as the default config, kept for the existing notebooks (goldpan.legacy).

Modules

adapters

Adapters: the only code that knows a file format.

algorithms

Trace algorithms: filters and per-trace quantities (ported from pulsedata.algorithms of scdms-analysis-tools).

archive

Persistent archive of "good event" selections, keyed by series/detector/channel.

channels

Which physical detector channel is a dump's (detector, channel) pair?

config

Configuration of a readout, shared by the pulse quantities, cuts and operations.

cuts

Cuts: pulses in, one boolean per pulse out (True = keep).

data

The in-memory container of one detector's events: traces, quantities, readout, provenance.

dataset

A dataset definition: which raw files, how to read them, and which processing to run on them.

io

Bridge from nsdf_dark_matter's cdms objects into the plain-ndarray convention ((n_pulses, n_samples), samples on the last axis) the rest of this library expects.

legacy

The flat module names of the first versions (pulse_quantities, pulse_cuts, ...), as aliases of the package.

operations

Operations: pulses in, new (modified) pulses out -- same pulse-shaped family.

quantities

Derived quantities: pulses in, one real number (or one array) per pulse out.

registry

A registry of the facts about an experiment that analysis needs and the library must not contain: the readouts (how a pretrigger window, a glitch and a sample period are set), and the detectors (their number, type, readout and where each named channel is wired in a given file format).

rq_cuts

Selections made from already-processed RQs, with no raw traces: the fast path (ported from scdms-analysis-tools).

rqdata

The RQs of a whole list of series at once, as numpy arrays, with an on-disk cache: the second read is fast.

runmeta

Run metadata (high voltage, trigger setting, ...) per event, from a table keyed by series.

status

Development-status tagging for functions in this library.

testing

The conformance test of an adapter, for the people who write one (see the guide "Writing an adapter" in the documentation).