Closed mlincett closed 11 months ago
As a more general note, I don't think we should regularly produce JSON files from I3 but rather convert I3 to JSON on the fly whenever possible.
@jvansanten suggested looking into I3PacketModule and I3Frame.merge.
Note for posterity: merging P frames may not be a good idea after all, since the trigger splitter can create multiple subevents.
Fixed by #7 although not in the most elegant way.
In the current behaviour, the i3_to_json.py script applies the trigger splitter to the Q frame in order to create
SplitUncleanedInIcePulses
. This results in the creation of a P frame which is then written to the JSON file (see my confusion in #5 )This means that all the information in the original P frame is lost when converting to JSON. Notably,
OnlineL2
recos are required as a seed for MuEX by SplineMPE in Skymap Scanner.How to preserve the information in the original P frame in the JSON output?
One possibility is to run beforehand a tray to extract the original physics frame, and then copy over the keys to the newly-created P frame. This seems simple as long as there is a single input file.
To support multiple input file one may have to keep a dictionary (?)In #7 I tried to use a dictionary, but defining unique ids may be tricky for MC files.Alternatively, the Skymap Scanner could replicate the entire OnlineL2Filter server-side, but I am not sure this is the best option.