Closed mlincett closed 11 months ago
Thanks for this. In lieu of running a separate tray, what about adding an optional argument
-p
for a user-specified pulse-series, which can be copied intoSplitUncleanedInIcePulses
? Then we can just run over the original p-frame.This would mitigate some unintended behavior when there is a clash of uid.
It's a possibility, but how do we establish that the user-specified pulse-series is the correct one / equivalent to SplitUncleanedInIcePulses
? For example I would not know which one to pick and I would rather encode default and fallback options rather than leaving it open.
Then I would still go for an opt-in method to choose which keys to copy and avoid flooding the output file with unnecessary data (also it seems the content of at least a couple of keys is not serializable).
Thanks for this. In lieu of running a separate tray, what about adding an optional argument
-p
for a user-specified pulse-series, which can be copied intoSplitUncleanedInIcePulses
? Then we can just run over the original p-frame. This would mitigate some unintended behavior when there is a clash of uid.It's a possibility, but how do we establish that the user-specified pulse-series is the correct one / equivalent to
SplitUncleanedInIcePulses
? For example I would not know which one to pick and I would rather encode default and fallback options rather than leaving it open.Then I would still go for an opt-in method to choose which keys to copy and avoid flooding the output file with unnecessary data (also it seems the content of at least a couple of keys is not serializable).
Yes that's true, it's not possible ensure the passed pulseseries will match SplitUncleanedInIcePulses. Though it would allow some additional flexibility if users wanted to run scans on different pulses.
I think the opt-in method would work (and already exists to some extent with the --extra
). Maybe one way to get around the UID for MC is to hash the InIcePulses, which would be unique for all intents and purposes.
It's a possibility, but how do we establish that the user-specified pulse-series is the correct one / equivalent to
SplitUncleanedInIcePulses
? For example I would not know which one to pick and I would rather encode default and fallback options rather than leaving it open. Then I would still go for an opt-in method to choose which keys to copy and avoid flooding the output file with unnecessary data (also it seems the content of at least a couple of keys is not serializable).Yes that's true, it's not possible ensure the passed pulseseries will match SplitUncleanedInIcePulses. Though it would allow some additional flexibility if users wanted to run scans on different pulses.
This should be rather a feature for Skymap Scanner :)
I think the opt-in method would work (and already exists to some extent with the
--extra
). Maybe one way to get around the UID for MC is to hash the InIcePulses, which would be unique for all intents and purposes.
I guess this can be done but we still have the issue of the output filename (I would avoid long hashes in filename if possible).
That's a lot of diff. What does it look like if you run
black
with--skip-string-normalization
?
FWIW this repo doesn't have much history anyway, so I think the big diff is okay
Previously
i3_to_json.py
would fill all the keys required by the realtime JSON generation code with dummy values. This was likely an unintended consequence of running the trigger splitter to createSplitUncleanedInIcePulses
, which would result the creation of an empty P-frame. See #5 and #6 for context.With this PR this behavior changes:
uid
To achieve this, some machinery is introduced for this in the form of the
fill_key()
andfill_missing_keys()
functions. The latter replaces functionality previously implemented inalertify()
.Additional changes:
from I3Tray
import;icetray.load
withimport
of the corresponding module;suppress_warnings
module as a workaround for IceTray Issue #3112. Why not callwarnings.filterwarnings()
in the main file? Becauseflake8
would then complain that all following imports are not at the head of the file and I didn't want to disseminate temporarynoqa
statements everywhere;