Skip to content
This repository has been archived by the owner on Jun 5, 2024. It is now read-only.

Commit

Permalink
Bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
dachengx committed Jan 16, 2024
1 parent f6e3565 commit bf4f130
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion tests/test_contexts.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def test_nt_sim_context_bad_inits(self):


def test_sim_context():
straxen.contexts.xenon1t_simulation()
wfsim.contexts.xenon1t_simulation()


@skipIf(not straxen.utilix_is_configured(), "No db access, cannot test!")
Expand Down
2 changes: 1 addition & 1 deletion tests/test_wfsim.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def test_sim_1T():
**conf_1t,
),
**straxen.legacy.x1t_common_config),
**straxen.legacy.contexts_1t.get_x1t_context_config(),
**straxen.legacy.get_x1t_context_config(),
)
st.register(wfsim.RawRecordsFromFax1T)
log.debug(f'Setting testing config {testing_config_1t}')
Expand Down
2 changes: 2 additions & 0 deletions wfsim/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@

from .load_resource import *
from .utils import *

from .contexts import *
8 changes: 6 additions & 2 deletions wfsim/contexts.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from immutabledict import immutabledict
import strax
import straxen
import wfsim
from .strax_interface import RawRecordsFromFax1T


Expand Down Expand Up @@ -280,8 +281,11 @@ def xenonnt_simulation(
def xenon1t_simulation(output_folder="./strax_data"):
st = strax.Context(
storage=strax.DataDirectory(output_folder),
config=dict(fax_config="fax_config_1t.json", detector="XENON1T", **straxen.contexts.x1t_common_config),
**straxen.contexts.get_x1t_context_config(),
config=dict(
fax_config="fax_config_1t.json", detector="XENON1T",
**straxen.legacy.x1t_common_config,
),
**straxen.legacy.get_x1t_context_config(),
)
st.register(RawRecordsFromFax1T)
st.deregister_plugins_with_missing_dependencies()
Expand Down

0 comments on commit bf4f130

Please sign in to comment.