Skip to content

Commit

Permalink
Force unblind (#152)
Browse files Browse the repository at this point in the history
* force unblind

* force unblind
  • Loading branch information
FaroutYLq authored Sep 23, 2024
1 parent d9913d4 commit cb1b198
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
1 change: 1 addition & 0 deletions jobs/job.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ def create_context(settings, runid):
simu_mode=settings["simu_mode"],
rate=settings["rate"] if settings["rate"] else None,
en_range=settings["en_range"] if settings["en_range"] else None,
unblind=True
)
for d in settings["storage_to_patch"]:
if d:
Expand Down
16 changes: 14 additions & 2 deletions saltax/contexts.py
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,7 @@ def fxenonnt(
generator_name="flat",
recoil=8,
simu_mode="all",
unblind=True,
**kwargs,
):
"""United strax context for XENONnT data, simulation, or salted data. Based
Expand All @@ -447,6 +448,7 @@ def fxenonnt(
:param generator_name: Instruction mode to use, defaults to 'flat'
:param recoil: NEST recoil type, defaults to 8 (beta ER)
:param simu_mode: 's1', 's2', or 'all'. Defaults to 'all'
:param unblind: Whether to bypass any kind of blinding, defaults to True
:param kwargs: Extra options to pass to strax.Context or generator,
and rate/en_range etc for generator
:return: strax context
Expand All @@ -461,7 +463,7 @@ def fxenonnt(
validate_runid(runid)
log.warning("Welcome to computation mode which only works for run %s!" % (runid))

return xenonnt_salted_fuse(
st = xenonnt_salted_fuse(
runid=runid,
saltax_mode=saltax_mode,
output_folder=output_folder,
Expand All @@ -475,6 +477,10 @@ def fxenonnt(
simu_mode=simu_mode,
**kwargs,
)
if unblind:
st.set_config(dict(event_info_function="disabled"))

return st


def sxenonnt(
Expand All @@ -489,6 +495,7 @@ def sxenonnt(
generator_name="flat",
recoil=7,
simu_mode="all",
unblind=True,
**kwargs,
):
"""United strax context for XENONnT data, simulation, or salted data. Based
Expand All @@ -514,6 +521,7 @@ def sxenonnt(
:param recoil: (for simulation) NEST recoil type, defaults to 7
(beta ER)
:param simu_mode: 's1', 's2', or 'all'. Defaults to 'all'
:param unblind: Whether to bypass any kind of blinding, defaults to True
:param kwargs: Additional kwargs to pass
:return: strax context
"""
Expand All @@ -527,7 +535,7 @@ def sxenonnt(
validate_runid(runid)
log.warning("Welcome to computation mode which only works for run %s!" % (runid))

return xenonnt_salted_wfsim(
st = xenonnt_salted_wfsim(
runid=runid,
output_folder=output_folder,
corrections_version=corrections_version,
Expand All @@ -541,3 +549,7 @@ def sxenonnt(
saltax_mode=saltax_mode,
**kwargs,
)
if unblind:
st.set_config(dict(event_info_function="disabled"))

return st

0 comments on commit cb1b198

Please sign in to comment.