goldpan.adapters.rq¶
Quantity tables from any RQ source, and how they join an Events.
The RQ adapters (goldpan.adapters.rq_root, and any you add) return a table of quantities: an Awkward Array with one record per
event whose first fields are the event key (series, dump, event). attach adds such a table to an Events of the same
events, matching on the key, so the RQs of the reconstruction can be compared with, or cut on together with, what the library
computes from the traces:
ev = rq.attach(ev, rq_root.read(path, detector=7, branches=["PTOFamps", "P*std"]))
ev.quantities["PTOFamps"]
Functions
|
|
- goldpan.adapters.rq.attach(events, table, *, on=('series', 'dump', 'event'), prefix='')[source]¶
eventswith the columns oftableadded, each event matched to the row oftablewith the sameonfields.Every event must have exactly one row in
table(extra rows are ignored); otherwiseValueErrornames the first events without. The fields oftablethat are in the key (series,dump,event) are not copied, and a field with the name of an existing quantity is refused unlessprefixis given (it is put before the names of the new columns).onlets you match on fewer fields, for example("dump", "event")when the two sources name the series differently.