goldpan.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. Only this module knows about cdms; everything else in
python/ only ever sees plain arrays.
Functions
|
The |
|
The |
|
Keep only ids whose |
|
Stack one channel from a list of detector_ids into a batch array. |
|
Like |
|
The |
- goldpan.io.detector_index(detector_id)[source]¶
The
<detector>component of a"<event>_<detector>_Phonon_<n>"id.
- goldpan.io.event_id(detector_id)[source]¶
The
<event>component of a"<event>_<detector>_Phonon_<n>"id.
- goldpan.io.filter_by_detector(detector_ids, detector)[source]¶
Keep only ids whose
<detector>component matchesdetector.
- goldpan.io.load_channel_batch(cdms, detector_ids, channel)[source]¶
Stack one channel from a list of detector_ids into a batch array.
Returns
(ids, data):idsisnp.array(detector_ids)(same order asdata),datais float64 shape(len(detector_ids), n_samples).- Parameters:
channel (int)
- goldpan.io.trigger_types(cdms, detector_ids)[source]¶
The
trigger_typestring the dump’s.csvrecords for each id’s event, as an array aligned withdetector_ids(e.g."Physics","Unknown"). Metadata is per event, so the three detectors of one event share a value. Feed it togoldpan.cuts.randoms/real_triggers.
- goldpan.io.load_channel_batch_multi(cdms_by_dump, channel, detector=None)[source]¶
Like
load_channel_batch, pooled across multiple dumps.cdms_by_dump:{dump_label: cdms}(e.g.{"F0002": cdms2, "F0003": cdms3}). Passdetectorto filter each dump’s ids withfilter_by_detectorfirst.Returns
(dumps, ids, data), all the same length, concatenated across dumps incdms_by_dump’s iteration order:dumps[i]/ids[i]name which dump and detector_iddata[i]came from.- Parameters:
channel (int)