From cc5ddf20fe8557930e7870b779c8c86461650fd3 Mon Sep 17 00:00:00 2001 From: WenzDaniel Date: Tue, 8 Oct 2024 01:40:05 -0500 Subject: [PATCH] Changed save type and bootstrax --- bin/bootstrax | 11 +++++++++++ straxen/plugins/raw_records_coin_nv/nveto_recorder.py | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/bin/bootstrax b/bin/bootstrax index f4541b1a8..32cdc35bf 100755 --- a/bin/bootstrax +++ b/bin/bootstrax @@ -601,6 +601,11 @@ def infer_target(rd: dict) -> dict: nv_ref_mon = [ "nVeto_LASER_calibration", ] + nv_calibration_modes = [ + "nVeto_LASER_calibration_LONG_window", + "nVeto_LED_calibration", + "nVeto_LED_calibration_2", + ] mode = str(rd.get("mode")) detectors = list(rd.get("detectors")) # type: ignore @@ -626,6 +631,12 @@ def infer_target(rd: dict) -> dict: # also use source field, outcome is the same) if "event_info" in targets or "event_info" in post_process: targets = list(targets) + ["event_info_double"] + elif np.any([m in mode for m in nv_calibration_modes]): + log.debug("NV calibration-modes") + # In any other NV calibration mode we would like to + # keep our raw data without applying the software trigger. + targets = "raw_records_nv" + post_process = "raw_records_nv" targets = strax.to_str_tuple(targets) post_process = strax.to_str_tuple(post_process) diff --git a/straxen/plugins/raw_records_coin_nv/nveto_recorder.py b/straxen/plugins/raw_records_coin_nv/nveto_recorder.py index 77739b073..a0debf83d 100644 --- a/straxen/plugins/raw_records_coin_nv/nveto_recorder.py +++ b/straxen/plugins/raw_records_coin_nv/nveto_recorder.py @@ -26,7 +26,7 @@ class nVETORecorder(strax.Plugin): rechunk_on_save = True save_when = immutabledict( - raw_records_coin_nv=strax.SaveWhen.ALWAYS, + raw_records_coin_nv=strax.SaveWhen.TARGET, lone_raw_record_statistics_nv=strax.SaveWhen.ALWAYS, ) compressor = "zstd"