Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changed save type and bootstrax #1440

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion straxen/plugins/raw_records_coin_nv/nveto_recorder.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
11 changes: 11 additions & 0 deletions straxen/scripts/bootstrax.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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)
Expand Down
Loading