goldpan.adapters.idx¶
The idx adapter: a dump of the NSDF archive (NEXUS-DM idx) into an Events. Read only.
An idx dump numbers its traces by readout board and input, not by channel name: a trace is addressed by an id like
<event>_<board>_Phonon_<n> and a channel of it by a small integer. In Run 76 the three “detectors” of a dump are three
boards of one physical detector. This adapter hides that: you say which board and input each named channel comes from, and
you name the readout, because neither belongs to the library:
from goldpan.adapters import idx
from goldpan.config import DCRC_RUN76
ev = idx.read("~/idx/07221203_2025_F0001", detector_name="S104", config=DCRC_RUN76,
channels={"Side2pC": (0, 0), "Side2pF": (0, 1)}) # channel name -> (board, input)
For Run 76 the map of every sensor is in goldpan.channels (sensor_channels()). Only this module and goldpan.io know
nsdf_dark_matter’s cdms object; it is imported when a path is given, so tests can pass any object with
get_detector_ids(), get_detector_channels(id) and get_event_metadata(event).
Module Attributes
Raised by one when a change of this reader changes what it returns for the same file (a fix), so that |
Functions
|
Read one idx dump into an |
- goldpan.adapters.idx.REVISION = 1¶
Raised by one when a change of this reader changes what it returns for the same file (a fix), so that
goldsluice runredoes the outputs made with the old one (goldpan.adapters.revision). Not for a change that leaves the results alone.
- goldpan.adapters.idx.read(source, *, detector_name, channels, config, roles=None, series=None, dump=None)[source]¶
Read one idx dump into an
Eventsof one detector.sourceis the dump folder (for example~/idx/07221203_2025_F0001) or an already loadedcdmsobject (then giveseriesanddump).channelsmaps each channel name to its(board, input)in the dump;configis the readout of the data (there is no default);rolesoptionally gives a role per channel name. Events that lack any requested board are dropped, and how many is recorded inmeta["dropped_events"]. The quantitytrigger_typeis the label of the dump’s.csv, if the dump has one.