diff --git a/requirements.txt b/requirements.txt index f297f67d..e83262ba 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ strax utilix>=0.5.3 -straxen==0.18.4 +straxen>=0.19.0 uproot>=4.0.0 diff --git a/tests/test_wfsim.py b/tests/test_wfsim.py index bc975c5a..46a1c2b0 100644 --- a/tests/test_wfsim.py +++ b/tests/test_wfsim.py @@ -27,8 +27,8 @@ def test_sim_1T(): with tempfile.TemporaryDirectory() as tempdir: log.debug(f'Working in {tempdir}') testing_config_1T = dict( - hev_gain_model=('to_pe_constant', 0.0085), - gain_model=('to_pe_constant', 0.0085), + hev_gain_model=("1T_to_pe_placeholder", True), + gain_model=("1T_to_pe_placeholder", True), ) st = strax.Context( storage=tempdir, @@ -60,7 +60,9 @@ def test_sim_nT_basics(): with tempfile.TemporaryDirectory() as tempdir: log.debug(f'Working in {tempdir}') conf = straxen.contexts.xnt_common_config - conf['gain_model'] = ('to_pe_constant', 0.01) + conf['gain_model'] = ("to_pe_placeholder", True) + conf['hev_gain_model'] = ("to_pe_placeholder", True) + conf['hit_min_amplitude'] = 'pmt_commissioning_initial' resource, conf_override = test_load_nt() # The SPE table in this package is for a single channel diff --git a/wfsim/strax_interface.py b/wfsim/strax_interface.py index 86801f81..d1415b8c 100644 --- a/wfsim/strax_interface.py +++ b/wfsim/strax_interface.py @@ -400,8 +400,8 @@ def set_config(self,): self.config.update(overrides) # Update gains to the nT defaults - self.to_pe = straxen.get_to_pe(self.run_id, self.config['gain_model'], - self.config['channel_map']['tpc'][1]+1) + self.to_pe = straxen.get_correction_from_cmt(self.run_id, + self.config['gain_model']) adc_2_current = (self.config['digitizer_voltage_range'] / 2 ** (self.config['digitizer_bits'])