goldpan.adapters¶
Adapters: the only code that knows a file format. Each turns one storage into an Events (and back, where we can write).
goldpan.adapters.parquet: the native format (reads and writes); its docstring is the specification.goldpan.adapters.idx: a dump of the NSDF archive (reads).goldpan.adapters.midas: raw SuperCDMS SNOLAB DAQ files,.mid,.mid.gzor.mid.lz4(reads).goldpan.adapters.rq_root: the RQs of the collaboration’s reconstruction, ROOT files read with uproot (reads a table of quantities, not traces;goldpan.adapters.rq.attachadds it to anEvents).
Anyone can add one: a module with read(path, **kw) -> Events, optionally iter_chunks(path, *, chunk, **kw) and write(events, path);
goldpan.testing.check_adapter checks it against the contract. register makes it available to read(path, format=...).
A reader can also define REVISION, a whole number (1 if it is absent) that is raised by one whenever a fix changes what it returns for the same
file. goldsluice run records the revision of the reader of each output and redoes the outputs made with another one (revision).
Functions
The names of the adapters that |
|
|
Read |
|
Make |
|
The |
- goldpan.adapters.register(name, module)[source]¶
Make
module(an adapter) available asread(path, format=name).- Parameters:
name (str)
- Return type:
None
- goldpan.adapters.revision(name)[source]¶
The
REVISIONof the adaptername: raised when a fix changes what the reader returns for the same file, 1 for an adapter that does not say.goldsluice runcompares it with the one an output was made with.
- goldpan.adapters.read(path, format=None, **kwargs)[source]¶
Read
pathwith the adapterformat;Noneguesses: a directory with_goldpan.jsonor a.parquetfile isparquet; a.rootfile or a folder of them isrq_root; a.mid,.mid.gzor.mid.lz4file ismidas.
Modules
The idx adapter: a dump of the NSDF archive (NEXUS-DM |
|
The MIDAS adapter: raw SuperCDMS SNOLAB DAQ files ( |
|
The native format of goldpan and goldsluice: Parquet (specification, format version 1). |
|
Quantity tables from any RQ source, and how they join an |
|
The ROOT RQ adapter: the processed quantities (RQs) of the collaboration's reconstruction, read with uproot; and |