diff --git a/amstrax/auto_processing_new/process.py b/amstrax/auto_processing_new/process.py index 08ae034e..0c55378c 100644 --- a/amstrax/auto_processing_new/process.py +++ b/amstrax/auto_processing_new/process.py @@ -22,6 +22,7 @@ def __init__(self, args): self.production = args.production self.amstrax_path = args.amstrax_path self.is_online = args.is_online + self.fix_targets = args.fix_targets if self.amstrax_path: self.amstrax_path = self.amstrax_path.rstrip("/") @@ -262,7 +263,9 @@ def process_remaining_targets(self): ) st.storage += [strax.DataDirectory(raw_records_folder, readonly=True)] - st = self.infer_special_modes(st) + + if not self.fix_targets: + st = self.infer_special_modes(st) self.st = st @@ -297,6 +300,8 @@ def parse_args(): parser.add_argument("--amstrax_path", type=str, default=None, help="Version of amstrax to use.") parser.add_argument("--production", action="store_true", help="Update the production database.") parser.add_argument("--is_online", action="store_true", help="Process online data.") + parser.add_argument("--fix_targets", action="store_true", help="Fix the targets to process, do not allow special modes.") + return parser.parse_args() diff --git a/amstrax/plugins/led_calibration/records_led.py b/amstrax/plugins/led_calibration/records_led.py index f14e2122..bc9147d5 100644 --- a/amstrax/plugins/led_calibration/records_led.py +++ b/amstrax/plugins/led_calibration/records_led.py @@ -36,6 +36,8 @@ class RecordsLED(strax.Plugin): compressor = 'zstd' parallel = 'process' rechunk_on_save = False + + save_when = strax.SaveWhen.TARGET def setup(self): diff --git a/amstrax/plugins/records_ext/pulse_processing_ext.py b/amstrax/plugins/records_ext/pulse_processing_ext.py index e4304769..bfaa1ccb 100644 --- a/amstrax/plugins/records_ext/pulse_processing_ext.py +++ b/amstrax/plugins/records_ext/pulse_processing_ext.py @@ -34,9 +34,7 @@ class PulseProcessingEXT(strax.Plugin): provides = 'records_ext' data_kind = 'records_ext' - # I think in amstrax we can save everything - # default is ALWAYS - # save_when = strax.SaveWhen.TARGET + save_when = strax.SaveWhen.TARGET def infer_dtype(self): record_length = strax.record_length_from_dtype(