From c8037192aa6d7bf743fda9e1c23e8c393539e168 Mon Sep 17 00:00:00 2001 From: Jianyu Long Date: Mon, 4 Oct 2021 13:40:20 -0500 Subject: [PATCH 01/16] updated S2 corrected area --- straxen/plugins/event_processing.py | 79 +++++++++++++++++++++++++---- 1 file changed, 68 insertions(+), 11 deletions(-) diff --git a/straxen/plugins/event_processing.py b/straxen/plugins/event_processing.py index 6d354c8e9..1a1667c01 100644 --- a/straxen/plugins/event_processing.py +++ b/straxen/plugins/event_processing.py @@ -598,8 +598,24 @@ def get_veto_tags(events, split_tags, result): (0, pax_file('XENON1T_s1_xyz_lce_true_kr83m_SR0_pax-680_fdc-3d_v0.json')), # noqa (first_sr1_run, pax_file('XENON1T_s1_xyz_lce_true_kr83m_SR1_pax-680_fdc-3d_v0.json'))]), # noqa strax.Option( - 's2_xy_correction_map', - help="S2 (x, y) correction map. Correct S2 position dependence " + 's2_xy_correction_map_top', + help="S2top (x, y) correction map. Correct S2 position dependence " + "manly due to bending of anode/gate-grid, PMT quantum efficiency " + "and extraction field distribution, as well as other geometric factors.", + default_by_run=[ + (0, pax_file('XENON1T_s2_xy_ly_SR0_24Feb2017.json')), + (170118_1327, pax_file('XENON1T_s2_xy_ly_SR1_v2.2.json'))]), + strax.Option( + 's2_xy_correction_map_bottom', + help="S2bottom (x, y) correction map. Correct S2 position dependence " + "manly due to bending of anode/gate-grid, PMT quantum efficiency " + "and extraction field distribution, as well as other geometric factors.", + default_by_run=[ + (0, pax_file('XENON1T_s2_xy_ly_SR0_24Feb2017.json')), + (170118_1327, pax_file('XENON1T_s2_xy_ly_SR1_v2.2.json'))]), + strax.Option( + 's2_xy_correction_map_total', + help="S2total (x, y) correction map. Correct S2 position dependence " "manly due to bending of anode/gate-grid, PMT quantum efficiency " "and extraction field distribution, as well as other geometric factors.", default_by_run=[ @@ -626,8 +642,14 @@ class CorrectedAreas(strax.Plugin): Note: Please be aware that for both, the main and alternative S1, the area is corrected according to the xy-position of the main S2. + + There are now 3 components of cS2s: cS2top, cS2bot and cS2tot, + all computed with respect to corresponding S2 components. Therefore + cS2tot and cS2top+cS2bot are slightly different. + + Also the cS2aft is calculated by cS2top/cS2tot for now. """ - __version__ = '0.1.1' + __version__ = '0.1.2' depends_on = ['event_basics', 'event_positions'] dtype = [('cs1', np.float32, 'Corrected S1 area [PE]'), @@ -641,8 +663,12 @@ def setup(self): if isinstance(self.config['s1_xyz_correction_map'], str): self.config['s1_xyz_correction_map'] = [self.config['s1_xyz_correction_map']] - if isinstance(self.config['s2_xy_correction_map'], str): - self.config['s2_xy_correction_map'] = [self.config['s2_xy_correction_map']] + if isinstance(self.config['s2_xy_correction_map_top'], str): + self.config['s2_xy_correction_map_top'] = [self.config['s2_xy_correction_map_top']] + if isinstance(self.config['s2_xy_correction_map_bottom'], str): + self.config['s2_xy_correction_map_bottom'] = [self.config['s2_xy_correction_map_bottom']] + if isinstance(self.config['s2_xy_correction_map_total'], str): + self.config['s2_xy_correction_map_total'] = [self.config['s2_xy_correction_map_total']] self.s1_map = InterpolatingMap( get_cmt_resource(self.run_id, @@ -651,9 +677,17 @@ def setup(self): *self.config['s1_xyz_correction_map']]), fmt='text')) - self.s2_map = InterpolatingMap( + self.s2top_map = InterpolatingMap( get_cmt_resource(self.run_id, - tuple([*self.config['s2_xy_correction_map']]), + tuple([*self.config['s2_xy_correction_map_top']]), + fmt='text')) + self.s2bot_map = InterpolatingMap( + get_cmt_resource(self.run_id, + tuple([*self.config['s2_xy_correction_map_bottom']]), + fmt='text')) + self.s2tot_map = InterpolatingMap( + get_cmt_resource(self.run_id, + tuple([*self.config['s2_xy_correction_map_total']]), fmt='text')) def compute(self, events): @@ -672,6 +706,21 @@ def compute(self, events): # S2(x,y) corrections use the observed S2 positions s2_positions = np.vstack([events['s2_x'], events['s2_y']]).T alt_s2_positions = np.vstack([events['alt_s2_x'], events['alt_s2_y']]).T + + cs2top=(events['s2_area'] * events['s2_area_fraction_top'] * lifetime_corr + / self.s2top_map(s2_positions)), + alt_cs2top=(events['alt_s2_area']* events['alt_s2_area_fraction_top'] * alt_lifetime_corr + / self.s2top_map(alt_s2_positions)), + + cs2bot=(events['s2_area'] * (1-events['s2_area_fraction_top']) * lifetime_corr + / self.s2bot_map(s2_positions)), + alt_cs2bot=(events['alt_s2_area'] * (1-events['s2_area_fraction_top']) * alt_lifetime_corr + / self.s2bot_map(alt_s2_positions)), + + cs2tot=(events['s2_area'] * lifetime_corr + / self.s2tot_map(s2_positions)), + alt_cs2tot=(events['alt_s2_area'] * alt_lifetime_corr + / self.s2tot_map(alt_s2_positions)), return dict( time=events['time'], @@ -680,10 +729,18 @@ def compute(self, events): cs1=events['s1_area'] / self.s1_map(event_positions), alt_cs1=events['alt_s1_area'] / self.s1_map(event_positions), - cs2=(events['s2_area'] * lifetime_corr - / self.s2_map(s2_positions)), - alt_cs2=(events['alt_s2_area'] * alt_lifetime_corr - / self.s2_map(alt_s2_positions))) + cs2top = cs2top, + alt_cs2top = alt_cs2top, + + cs2bot = cs2bot, + alt_cs2bot = alt_cs2bot, + + cs2tot = cs2tot, + alt_cs2tot = alt_cs2tot, + + cs2_area_fraction_top = cs2top/cs2tot, + alt_cs2_area_fraction_top = alt_cs2top/alt_cs2tot + ) @export From 1fb38c752e01ca697b437ccd4dfe5a7e5eab4dbb Mon Sep 17 00:00:00 2001 From: Jingqiang Ye Date: Mon, 4 Oct 2021 16:18:01 -0500 Subject: [PATCH 02/16] add posrec algo dependence --- straxen/contexts.py | 2 + straxen/corrections_services.py | 10 ++-- straxen/plugins/event_processing.py | 89 ++++++++++++++++------------- 3 files changed, 56 insertions(+), 45 deletions(-) diff --git a/straxen/contexts.py b/straxen/contexts.py index 3ef9a46c7..ff17e5ada 100644 --- a/straxen/contexts.py +++ b/straxen/contexts.py @@ -53,6 +53,8 @@ # Clustering/classification parameters # Event level parameters s2_xy_correction_map=('s2_xy_map', "ONLINE", True), + s2_xy_correction_map_bottom=('s2_xy_map_bottom', "ONLINE", True), + s2_xy_correction_map_top=('s2_xy_map_top', "ONLINE", True), fdc_map=('fdc_map', "ONLINE", True), s1_xyz_correction_map=("s1_xyz_map", "ONLINE", True), g1=0.1426, diff --git a/straxen/corrections_services.py b/straxen/corrections_services.py index 0eed04495..634e46e1f 100644 --- a/straxen/corrections_services.py +++ b/straxen/corrections_services.py @@ -14,10 +14,10 @@ export, __all__ = strax.exporter() -corrections_w_file = ['mlp_model', 'gcn_model', 'cnn_model', - 's2_xy_map', 's1_xyz_map_mlp', 's1_xyz_map_cnn', - 's1_xyz_map_gcn', 'fdc_map_mlp', 'fdc_map_gcn', - 'fdc_map_cnn'] +corrections_w_file = ['mlp_model', 'cnn_model', 'gcn_model', + 's2_xy_map_mlp', 's2_xy_map_cnn', 's2_xy_map_gcn', + 's1_xyz_map_mlp', 's1_xyz_map_cnn', 's1_xyz_map_gcn', + 'fdc_map_mlp', 'fdc_map_cnn', 'fdc_map_gcn'] single_value_corrections = ['elife_xenon1t', 'elife', 'baseline_samples_nv', 'electron_drift_velocity', 'electron_drift_time_gate'] @@ -27,7 +27,7 @@ # needed because we pass these names as strax options which then get paired with the default reconstruction algorithm # important for apply_cmt_version -posrec_corrections_basenames = ['s1_xyz_map', 'fdc_map'] +posrec_corrections_basenames = ['s1_xyz_map', 'fdc_map', 's2_map'] class CMTVersionError(Exception): diff --git a/straxen/plugins/event_processing.py b/straxen/plugins/event_processing.py index 1a1667c01..4aad4bd7f 100644 --- a/straxen/plugins/event_processing.py +++ b/straxen/plugins/event_processing.py @@ -599,7 +599,7 @@ def get_veto_tags(events, split_tags, result): (first_sr1_run, pax_file('XENON1T_s1_xyz_lce_true_kr83m_SR1_pax-680_fdc-3d_v0.json'))]), # noqa strax.Option( 's2_xy_correction_map_top', - help="S2top (x, y) correction map. Correct S2 position dependence " + help="S2 (x, y) correction map for the top PMT array. Correct S2 position dependence " "manly due to bending of anode/gate-grid, PMT quantum efficiency " "and extraction field distribution, as well as other geometric factors.", default_by_run=[ @@ -607,28 +607,28 @@ def get_veto_tags(events, split_tags, result): (170118_1327, pax_file('XENON1T_s2_xy_ly_SR1_v2.2.json'))]), strax.Option( 's2_xy_correction_map_bottom', - help="S2bottom (x, y) correction map. Correct S2 position dependence " + help="S2 (x, y) correction map for the bottom PMT array. Correct S2 position dependence " "manly due to bending of anode/gate-grid, PMT quantum efficiency " "and extraction field distribution, as well as other geometric factors.", default_by_run=[ (0, pax_file('XENON1T_s2_xy_ly_SR0_24Feb2017.json')), (170118_1327, pax_file('XENON1T_s2_xy_ly_SR1_v2.2.json'))]), strax.Option( - 's2_xy_correction_map_total', - help="S2total (x, y) correction map. Correct S2 position dependence " + 's2_xy_correction_map', + help="S2 (x, y) correction map. Correct S2 position dependence " "manly due to bending of anode/gate-grid, PMT quantum efficiency " "and extraction field distribution, as well as other geometric factors.", default_by_run=[ (0, pax_file('XENON1T_s2_xy_ly_SR0_24Feb2017.json')), (170118_1327, pax_file('XENON1T_s2_xy_ly_SR1_v2.2.json'))]), - strax.Option( + strax.Option( 'elife_conf', default=("elife", "ONLINE", True), help='Electron lifetime ' 'Specify as (model_type->str, model_config->str, is_nT->bool) ' 'where model_type can be "elife" or "elife_constant" ' 'and model_config can be a version.' - ), + ), *DEFAULT_POSREC_ALGO_OPTION ) class CorrectedAreas(strax.Plugin): @@ -654,8 +654,14 @@ class CorrectedAreas(strax.Plugin): depends_on = ['event_basics', 'event_positions'] dtype = [('cs1', np.float32, 'Corrected S1 area [PE]'), ('cs2', np.float32, 'Corrected S2 area [PE]'), + ('cs2_top', np.float32, 'Corrected S2 area in the top PMT array [PE]'), + ('cs2_bottom', np.float32, 'Corrected S2 area in the bottom PMT array [PE]'), ('alt_cs1', np.float32, 'Corrected area of the alternate S1 [PE]'), - ('alt_cs2', np.float32, 'Corrected area of the alternate S2 [PE]') + ('alt_cs2', np.float32, 'Corrected area of the alternate S2 [PE]'), + ('alt_cs2_top', np.float32, 'Corrected area of the alternate S2 in the top PMT array [PE]'), + ('alt_cs2_bottom', np.float32, 'Corrected area of the alternate S2 in the bottom PMT array [PE]'), + ('cs2_area_fraction_top', np.float, 'Main cS2 fraction of area seen by the top PMT array'), + ('alt_cs2_area_fraction_top', np.float, 'Alternate cS2 fraction of area seen by the top PMT array'), ] + strax.time_fields def setup(self): @@ -663,12 +669,12 @@ def setup(self): if isinstance(self.config['s1_xyz_correction_map'], str): self.config['s1_xyz_correction_map'] = [self.config['s1_xyz_correction_map']] + if isinstance(self.config['s2_xy_correction_map_total'], str): + self.config['s2_xy_correction_map'] = [self.config['s2_xy_correction_map']] if isinstance(self.config['s2_xy_correction_map_top'], str): self.config['s2_xy_correction_map_top'] = [self.config['s2_xy_correction_map_top']] if isinstance(self.config['s2_xy_correction_map_bottom'], str): self.config['s2_xy_correction_map_bottom'] = [self.config['s2_xy_correction_map_bottom']] - if isinstance(self.config['s2_xy_correction_map_total'], str): - self.config['s2_xy_correction_map_total'] = [self.config['s2_xy_correction_map_total']] self.s1_map = InterpolatingMap( get_cmt_resource(self.run_id, @@ -676,18 +682,23 @@ def setup(self): self.config['default_reconstruction_algorithm'], *self.config['s1_xyz_correction_map']]), fmt='text')) - - self.s2top_map = InterpolatingMap( + self.s2_map = InterpolatingMap( get_cmt_resource(self.run_id, - tuple([*self.config['s2_xy_correction_map_top']]), + tuple(['suffix', + self.config['default_reconstruction_algorithm'], + *self.config['s2_xy_correction_map']]), fmt='text')) - self.s2bot_map = InterpolatingMap( + self.s2_map_top = InterpolatingMap( get_cmt_resource(self.run_id, - tuple([*self.config['s2_xy_correction_map_bottom']]), + tuple(['suffix', + self.config['default_reconstruction_algorithm'], + *self.config['s2_xy_correction_map_top']]), fmt='text')) - self.s2tot_map = InterpolatingMap( + self.s2_map_bottom = InterpolatingMap( get_cmt_resource(self.run_id, - tuple([*self.config['s2_xy_correction_map_total']]), + tuple(['suffix', + self.config['default_reconstruction_algorithm'], + *self.config['s2_xy_correction_map_bottom']]), fmt='text')) def compute(self, events): @@ -706,21 +717,19 @@ def compute(self, events): # S2(x,y) corrections use the observed S2 positions s2_positions = np.vstack([events['s2_x'], events['s2_y']]).T alt_s2_positions = np.vstack([events['alt_s2_x'], events['alt_s2_y']]).T - - cs2top=(events['s2_area'] * events['s2_area_fraction_top'] * lifetime_corr - / self.s2top_map(s2_positions)), - alt_cs2top=(events['alt_s2_area']* events['alt_s2_area_fraction_top'] * alt_lifetime_corr - / self.s2top_map(alt_s2_positions)), - cs2bot=(events['s2_area'] * (1-events['s2_area_fraction_top']) * lifetime_corr - / self.s2bot_map(s2_positions)), - alt_cs2bot=(events['alt_s2_area'] * (1-events['s2_area_fraction_top']) * alt_lifetime_corr - / self.s2bot_map(alt_s2_positions)), + cs2 = events['s2_area'] * lifetime_corr / self.s2_map(s2_positions) + alt_cs2 = events['alt_s2_area'] * alt_lifetime_corr / self.s2_map(alt_s2_positions) - cs2tot=(events['s2_area'] * lifetime_corr - / self.s2tot_map(s2_positions)), - alt_cs2tot=(events['alt_s2_area'] * alt_lifetime_corr - / self.s2tot_map(alt_s2_positions)), + cs2_bottom = (events['s2_area'] * (1 - events['s2_area_fraction_top']) * lifetime_corr + / self.s2_map_bottom(s2_positions)) + alt_cs2_bottom = (events['alt_s2_area'] * (1 - events['s2_area_fraction_top']) * alt_lifetime_corr + / self.s2_map_bottom(alt_s2_positions)) + + cs2_top = (events['s2_area'] * events['s2_area_fraction_top'] * lifetime_corr + / self.s2_map_top(s2_positions)) + alt_cs2_top = (events['alt_s2_area'] * events['alt_s2_area_fraction_top'] * alt_lifetime_corr + / self.s2_map_top(alt_s2_positions)) return dict( time=events['time'], @@ -729,17 +738,17 @@ def compute(self, events): cs1=events['s1_area'] / self.s1_map(event_positions), alt_cs1=events['alt_s1_area'] / self.s1_map(event_positions), - cs2top = cs2top, - alt_cs2top = alt_cs2top, - - cs2bot = cs2bot, - alt_cs2bot = alt_cs2bot, - - cs2tot = cs2tot, - alt_cs2tot = alt_cs2tot, - - cs2_area_fraction_top = cs2top/cs2tot, - alt_cs2_area_fraction_top = alt_cs2top/alt_cs2tot + cs2=cs2, + alt_cs2tot=alt_cs2, + + cs2_bottom=cs2_bottom, + alt_cs2_bottom=alt_cs2_bottom, + + cs2_top=cs2_top, + alt_cs2top=cs2_bottom, + + cs2_area_fraction_top=cs2_top / cs2, + alt_cs2_area_fraction_top=alt_cs2_top / alt_cs2, ) From 4824d1876e51cc11950c7b54513899f3b4e42a7c Mon Sep 17 00:00:00 2001 From: Jingqiang Ye Date: Wed, 6 Oct 2021 11:15:47 -0500 Subject: [PATCH 03/16] consolidate s2 maps --- straxen/plugins/event_processing.py | 28 ++++++---------------------- 1 file changed, 6 insertions(+), 22 deletions(-) diff --git a/straxen/plugins/event_processing.py b/straxen/plugins/event_processing.py index 4aad4bd7f..ddbcb6a9d 100644 --- a/straxen/plugins/event_processing.py +++ b/straxen/plugins/event_processing.py @@ -597,25 +597,9 @@ def get_veto_tags(events, split_tags, result): default_by_run=[ (0, pax_file('XENON1T_s1_xyz_lce_true_kr83m_SR0_pax-680_fdc-3d_v0.json')), # noqa (first_sr1_run, pax_file('XENON1T_s1_xyz_lce_true_kr83m_SR1_pax-680_fdc-3d_v0.json'))]), # noqa - strax.Option( - 's2_xy_correction_map_top', - help="S2 (x, y) correction map for the top PMT array. Correct S2 position dependence " - "manly due to bending of anode/gate-grid, PMT quantum efficiency " - "and extraction field distribution, as well as other geometric factors.", - default_by_run=[ - (0, pax_file('XENON1T_s2_xy_ly_SR0_24Feb2017.json')), - (170118_1327, pax_file('XENON1T_s2_xy_ly_SR1_v2.2.json'))]), - strax.Option( - 's2_xy_correction_map_bottom', - help="S2 (x, y) correction map for the bottom PMT array. Correct S2 position dependence " - "manly due to bending of anode/gate-grid, PMT quantum efficiency " - "and extraction field distribution, as well as other geometric factors.", - default_by_run=[ - (0, pax_file('XENON1T_s2_xy_ly_SR0_24Feb2017.json')), - (170118_1327, pax_file('XENON1T_s2_xy_ly_SR1_v2.2.json'))]), strax.Option( 's2_xy_correction_map', - help="S2 (x, y) correction map. Correct S2 position dependence " + help="S2 (x, y) correction map. Correct S2 position dependence, including S2 top, bottom, and total." "manly due to bending of anode/gate-grid, PMT quantum efficiency " "and extraction field distribution, as well as other geometric factors.", default_by_run=[ @@ -687,19 +671,19 @@ def setup(self): tuple(['suffix', self.config['default_reconstruction_algorithm'], *self.config['s2_xy_correction_map']]), - fmt='text')) + fmt='text'), map_name="s2_total") self.s2_map_top = InterpolatingMap( get_cmt_resource(self.run_id, tuple(['suffix', self.config['default_reconstruction_algorithm'], - *self.config['s2_xy_correction_map_top']]), - fmt='text')) + *self.config['s2_xy_correction_map']]), + fmt='text'), map_name="s2_top") self.s2_map_bottom = InterpolatingMap( get_cmt_resource(self.run_id, tuple(['suffix', self.config['default_reconstruction_algorithm'], - *self.config['s2_xy_correction_map_bottom']]), - fmt='text')) + *self.config['s2_xy_correction_map']]), + fmt='text'), map_name="s2_bottom") def compute(self, events): # S1 corrections depend on the actual corrected event position. From 57cb49eb0023a52677f946d5272d939faa37d9cc Mon Sep 17 00:00:00 2001 From: Jingqiang Ye Date: Thu, 7 Oct 2021 14:07:11 -0500 Subject: [PATCH 04/16] consolidate maps again --- straxen/corrections_services.py | 2 +- straxen/plugins/event_processing.py | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/straxen/corrections_services.py b/straxen/corrections_services.py index 634e46e1f..c11cb362c 100644 --- a/straxen/corrections_services.py +++ b/straxen/corrections_services.py @@ -27,7 +27,7 @@ # needed because we pass these names as strax options which then get paired with the default reconstruction algorithm # important for apply_cmt_version -posrec_corrections_basenames = ['s1_xyz_map', 'fdc_map', 's2_map'] +posrec_corrections_basenames = ['s1_xyz_map', 'fdc_map', 's2_xy_map'] class CMTVersionError(Exception): diff --git a/straxen/plugins/event_processing.py b/straxen/plugins/event_processing.py index ddbcb6a9d..1e8558bfd 100644 --- a/straxen/plugins/event_processing.py +++ b/straxen/plugins/event_processing.py @@ -653,12 +653,8 @@ def setup(self): if isinstance(self.config['s1_xyz_correction_map'], str): self.config['s1_xyz_correction_map'] = [self.config['s1_xyz_correction_map']] - if isinstance(self.config['s2_xy_correction_map_total'], str): + if isinstance(self.config['s2_xy_correction_map'], str): self.config['s2_xy_correction_map'] = [self.config['s2_xy_correction_map']] - if isinstance(self.config['s2_xy_correction_map_top'], str): - self.config['s2_xy_correction_map_top'] = [self.config['s2_xy_correction_map_top']] - if isinstance(self.config['s2_xy_correction_map_bottom'], str): - self.config['s2_xy_correction_map_bottom'] = [self.config['s2_xy_correction_map_bottom']] self.s1_map = InterpolatingMap( get_cmt_resource(self.run_id, From 20cb8dadafbbf4d0573dd9032d6f8045a295b85e Mon Sep 17 00:00:00 2001 From: Jingqiang Ye Date: Fri, 8 Oct 2021 11:08:16 -0500 Subject: [PATCH 05/16] use top and bottom maps only --- straxen/contexts.py | 2 -- straxen/corrections_services.py | 2 +- straxen/plugins/event_processing.py | 27 +++++++++++---------------- 3 files changed, 12 insertions(+), 19 deletions(-) diff --git a/straxen/contexts.py b/straxen/contexts.py index f9392c1e7..b2ae19482 100644 --- a/straxen/contexts.py +++ b/straxen/contexts.py @@ -53,8 +53,6 @@ # Clustering/classification parameters # Event level parameters s2_xy_correction_map=('s2_xy_map', "ONLINE", True), - s2_xy_correction_map_bottom=('s2_xy_map_bottom', "ONLINE", True), - s2_xy_correction_map_top=('s2_xy_map_top', "ONLINE", True), fdc_map=('fdc_map', "ONLINE", True), s1_xyz_correction_map=("s1_xyz_map", "ONLINE", True), g1=0.1426, diff --git a/straxen/corrections_services.py b/straxen/corrections_services.py index c11cb362c..7478eb380 100644 --- a/straxen/corrections_services.py +++ b/straxen/corrections_services.py @@ -15,7 +15,7 @@ export, __all__ = strax.exporter() corrections_w_file = ['mlp_model', 'cnn_model', 'gcn_model', - 's2_xy_map_mlp', 's2_xy_map_cnn', 's2_xy_map_gcn', + 's2_xy_map_mlp', 's2_xy_map_cnn', 's2_xy_map_gcn', 's2_xy_map', 's1_xyz_map_mlp', 's1_xyz_map_cnn', 's1_xyz_map_gcn', 'fdc_map_mlp', 'fdc_map_cnn', 'fdc_map_gcn'] diff --git a/straxen/plugins/event_processing.py b/straxen/plugins/event_processing.py index 1e8558bfd..15f66dd98 100644 --- a/straxen/plugins/event_processing.py +++ b/straxen/plugins/event_processing.py @@ -662,12 +662,6 @@ def setup(self): self.config['default_reconstruction_algorithm'], *self.config['s1_xyz_correction_map']]), fmt='text')) - self.s2_map = InterpolatingMap( - get_cmt_resource(self.run_id, - tuple(['suffix', - self.config['default_reconstruction_algorithm'], - *self.config['s2_xy_correction_map']]), - fmt='text'), map_name="s2_total") self.s2_map_top = InterpolatingMap( get_cmt_resource(self.run_id, tuple(['suffix', @@ -698,18 +692,19 @@ def compute(self, events): s2_positions = np.vstack([events['s2_x'], events['s2_y']]).T alt_s2_positions = np.vstack([events['alt_s2_x'], events['alt_s2_y']]).T - cs2 = events['s2_area'] * lifetime_corr / self.s2_map(s2_positions) - alt_cs2 = events['alt_s2_area'] * alt_lifetime_corr / self.s2_map(alt_s2_positions) + # S2 top and bottom are corrected separately, and cS2 total is the sum of the two + cs2_top = (events['s2_area'] * events['s2_area_fraction_top'] * lifetime_corr + / self.s2_map_top(s2_positions)) + alt_cs2_top = (events['alt_s2_area'] * events['alt_s2_area_fraction_top'] * alt_lifetime_corr + / self.s2_map_top(alt_s2_positions)) cs2_bottom = (events['s2_area'] * (1 - events['s2_area_fraction_top']) * lifetime_corr / self.s2_map_bottom(s2_positions)) alt_cs2_bottom = (events['alt_s2_area'] * (1 - events['s2_area_fraction_top']) * alt_lifetime_corr / self.s2_map_bottom(alt_s2_positions)) - cs2_top = (events['s2_area'] * events['s2_area_fraction_top'] * lifetime_corr - / self.s2_map_top(s2_positions)) - alt_cs2_top = (events['alt_s2_area'] * events['alt_s2_area_fraction_top'] * alt_lifetime_corr - / self.s2_map_top(alt_s2_positions)) + cs2 = cs2_top + cs2_bottom + alt_cs2 = alt_cs2_top + alt_cs2_bottom return dict( time=events['time'], @@ -718,14 +713,14 @@ def compute(self, events): cs1=events['s1_area'] / self.s1_map(event_positions), alt_cs1=events['alt_s1_area'] / self.s1_map(event_positions), - cs2=cs2, - alt_cs2tot=alt_cs2, + cs2_top=cs2_top, + alt_cs2_top=alt_cs2_top, cs2_bottom=cs2_bottom, alt_cs2_bottom=alt_cs2_bottom, - cs2_top=cs2_top, - alt_cs2top=cs2_bottom, + cs2=cs2, + alt_cs2=alt_cs2, cs2_area_fraction_top=cs2_top / cs2, alt_cs2_area_fraction_top=alt_cs2_top / alt_cs2, From 3cf9b59b11f7763e4f6bc1f5afe7b02d2937b9b0 Mon Sep 17 00:00:00 2001 From: Jingqiang Ye Date: Mon, 11 Oct 2021 20:16:22 -0500 Subject: [PATCH 06/16] s2 correction compatibility for online version --- straxen/plugins/event_processing.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/straxen/plugins/event_processing.py b/straxen/plugins/event_processing.py index 15f66dd98..998f5d801 100644 --- a/straxen/plugins/event_processing.py +++ b/straxen/plugins/event_processing.py @@ -662,18 +662,27 @@ def setup(self): self.config['default_reconstruction_algorithm'], *self.config['s1_xyz_correction_map']]), fmt='text')) + + # s2 maps + if self.config['s2_xy_correction_map'][1] == "ONLINE": + s2_top_name = "map" + s2_bottom_name = "map" + else: + s2_top_name = "s2_top" + s2_bottom_name = "s2_bottom" + self.s2_map_top = InterpolatingMap( get_cmt_resource(self.run_id, tuple(['suffix', self.config['default_reconstruction_algorithm'], *self.config['s2_xy_correction_map']]), - fmt='text'), map_name="s2_top") + fmt='text'), map_name=s2_top_name) self.s2_map_bottom = InterpolatingMap( get_cmt_resource(self.run_id, tuple(['suffix', self.config['default_reconstruction_algorithm'], *self.config['s2_xy_correction_map']]), - fmt='text'), map_name="s2_bottom") + fmt='text'), map_name=s2_bottom_name) def compute(self, events): # S1 corrections depend on the actual corrected event position. From b059089c43e3da1312b213c6b2742418e9c97e85 Mon Sep 17 00:00:00 2001 From: Jingqiang Ye Date: Tue, 12 Oct 2021 00:20:51 -0500 Subject: [PATCH 07/16] comptability for online version --- straxen/corrections_services.py | 2 +- straxen/plugins/event_processing.py | 34 ++++++++++++----------------- 2 files changed, 15 insertions(+), 21 deletions(-) diff --git a/straxen/corrections_services.py b/straxen/corrections_services.py index 7478eb380..c11cb362c 100644 --- a/straxen/corrections_services.py +++ b/straxen/corrections_services.py @@ -15,7 +15,7 @@ export, __all__ = strax.exporter() corrections_w_file = ['mlp_model', 'cnn_model', 'gcn_model', - 's2_xy_map_mlp', 's2_xy_map_cnn', 's2_xy_map_gcn', 's2_xy_map', + 's2_xy_map_mlp', 's2_xy_map_cnn', 's2_xy_map_gcn', 's1_xyz_map_mlp', 's1_xyz_map_cnn', 's1_xyz_map_gcn', 'fdc_map_mlp', 'fdc_map_cnn', 'fdc_map_gcn'] diff --git a/straxen/plugins/event_processing.py b/straxen/plugins/event_processing.py index 998f5d801..9ffffd148 100644 --- a/straxen/plugins/event_processing.py +++ b/straxen/plugins/event_processing.py @@ -663,26 +663,12 @@ def setup(self): *self.config['s1_xyz_correction_map']]), fmt='text')) - # s2 maps - if self.config['s2_xy_correction_map'][1] == "ONLINE": - s2_top_name = "map" - s2_bottom_name = "map" - else: - s2_top_name = "s2_top" - s2_bottom_name = "s2_bottom" - - self.s2_map_top = InterpolatingMap( - get_cmt_resource(self.run_id, - tuple(['suffix', - self.config['default_reconstruction_algorithm'], - *self.config['s2_xy_correction_map']]), - fmt='text'), map_name=s2_top_name) - self.s2_map_bottom = InterpolatingMap( + self.s2_map = InterpolatingMap( get_cmt_resource(self.run_id, tuple(['suffix', self.config['default_reconstruction_algorithm'], *self.config['s2_xy_correction_map']]), - fmt='text'), map_name=s2_bottom_name) + fmt='json')) def compute(self, events): # S1 corrections depend on the actual corrected event position. @@ -702,15 +688,23 @@ def compute(self, events): alt_s2_positions = np.vstack([events['alt_s2_x'], events['alt_s2_y']]).T # S2 top and bottom are corrected separately, and cS2 total is the sum of the two + # figure out the map name + if len(self.s2_map.map_names) > 1: + s2_top_map_name = "s2_top" + s2_bottom_map_name = "s2_bottom" + else: + s2_top_map_name = "map" + s2_bottom_map_name = "map" + cs2_top = (events['s2_area'] * events['s2_area_fraction_top'] * lifetime_corr - / self.s2_map_top(s2_positions)) + / self.s2_map(s2_positions, map_name=s2_top_map_name)) alt_cs2_top = (events['alt_s2_area'] * events['alt_s2_area_fraction_top'] * alt_lifetime_corr - / self.s2_map_top(alt_s2_positions)) + / self.s2_map(alt_s2_positions, map_name=s2_top_map_name)) cs2_bottom = (events['s2_area'] * (1 - events['s2_area_fraction_top']) * lifetime_corr - / self.s2_map_bottom(s2_positions)) + / self.s2_map(s2_positions, map_name=s2_bottom_map_name)) alt_cs2_bottom = (events['alt_s2_area'] * (1 - events['s2_area_fraction_top']) * alt_lifetime_corr - / self.s2_map_bottom(alt_s2_positions)) + / self.s2_map(alt_s2_positions, map_name=s2_bottom_map_name)) cs2 = cs2_top + cs2_bottom alt_cs2 = alt_cs2_top + alt_cs2_bottom From 87021c187aa1bf26c9a99654e67fdf893e83a567 Mon Sep 17 00:00:00 2001 From: Jingqiang Ye Date: Tue, 12 Oct 2021 09:18:59 -0500 Subject: [PATCH 08/16] reduce duplication by using dict --- straxen/plugins/event_processing.py | 61 ++++++++++------------------- 1 file changed, 21 insertions(+), 40 deletions(-) diff --git a/straxen/plugins/event_processing.py b/straxen/plugins/event_processing.py index 9ffffd148..0da0af81e 100644 --- a/straxen/plugins/event_processing.py +++ b/straxen/plugins/event_processing.py @@ -671,22 +671,19 @@ def setup(self): fmt='json')) def compute(self, events): + result = dict( + time=events['time'], + endtime=strax.endtime(events) + ) + # S1 corrections depend on the actual corrected event position. # We use this also for the alternate S1; for e.g. Kr this is # fine as the S1 correction varies slowly. event_positions = np.vstack([events['x'], events['y'], events['z']]).T + for prefix in ["", "alt_"]: + result[f"{prefix}cs1"] = events[f'{prefix}s1_area'] / self.s1_map(event_positions) - # For electron lifetime corrections to the S2s, - # use lifetimes computed using the main S1. - lifetime_corr = np.exp(events['drift_time'] / self.elife) - alt_lifetime_corr = ( - np.exp((events['alt_s2_interaction_drift_time']) - / self.elife)) - - # S2(x,y) corrections use the observed S2 positions - s2_positions = np.vstack([events['s2_x'], events['s2_y']]).T - alt_s2_positions = np.vstack([events['alt_s2_x'], events['alt_s2_y']]).T - + # s2 corrections # S2 top and bottom are corrected separately, and cS2 total is the sum of the two # figure out the map name if len(self.s2_map.map_names) > 1: @@ -696,38 +693,22 @@ def compute(self, events): s2_top_map_name = "map" s2_bottom_map_name = "map" - cs2_top = (events['s2_area'] * events['s2_area_fraction_top'] * lifetime_corr - / self.s2_map(s2_positions, map_name=s2_top_map_name)) - alt_cs2_top = (events['alt_s2_area'] * events['alt_s2_area_fraction_top'] * alt_lifetime_corr - / self.s2_map(alt_s2_positions, map_name=s2_top_map_name)) - - cs2_bottom = (events['s2_area'] * (1 - events['s2_area_fraction_top']) * lifetime_corr - / self.s2_map(s2_positions, map_name=s2_bottom_map_name)) - alt_cs2_bottom = (events['alt_s2_area'] * (1 - events['s2_area_fraction_top']) * alt_lifetime_corr - / self.s2_map(alt_s2_positions, map_name=s2_bottom_map_name)) + for prefix in ["", "alt_"]: + # For electron lifetime corrections to the S2s, + # use lifetimes computed using the main S1. + el_string = prefix + "s2_interaction_" if prefix is "alt_" else prefix + lifetime_corr = np.exp(events[f'{el_string}drift_time'] / self.elife) - cs2 = cs2_top + cs2_bottom - alt_cs2 = alt_cs2_top + alt_cs2_bottom + # S2(x,y) corrections use the observed S2 positions + s2_positions = np.vstack([events[f'{prefix}s2_x'], events[f'{prefix}s2_y']]).T - return dict( - time=events['time'], - endtime=strax.endtime(events), + result[f"{prefix}cs2_top"] = (events[f'{prefix}s2_area'] * events[f'{prefix}s2_area_fraction_top'] + * lifetime_corr / self.s2_map(s2_positions, map_name=s2_top_map_name)) + result[f"{prefix}cs2_bottom"] = (events[f'{prefix}s2_area'] * (1 - events[f'{prefix}s2_area_fraction_top']) + * lifetime_corr / self.s2_map(s2_positions, map_name=s2_bottom_map_name)) + result[f"{prefix}cs2"] = result[f"{prefix}cs2_top"] + result[f"{prefix}cs2_bottom"] - cs1=events['s1_area'] / self.s1_map(event_positions), - alt_cs1=events['alt_s1_area'] / self.s1_map(event_positions), - - cs2_top=cs2_top, - alt_cs2_top=alt_cs2_top, - - cs2_bottom=cs2_bottom, - alt_cs2_bottom=alt_cs2_bottom, - - cs2=cs2, - alt_cs2=alt_cs2, - - cs2_area_fraction_top=cs2_top / cs2, - alt_cs2_area_fraction_top=alt_cs2_top / alt_cs2, - ) + return result @export From af213a5219204b8bfd9f04f72604c6abc52b14a8 Mon Sep 17 00:00:00 2001 From: Jingqiang Ye Date: Tue, 12 Oct 2021 09:21:01 -0500 Subject: [PATCH 09/16] fix typo --- straxen/plugins/event_processing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/straxen/plugins/event_processing.py b/straxen/plugins/event_processing.py index 0da0af81e..f52a868d2 100644 --- a/straxen/plugins/event_processing.py +++ b/straxen/plugins/event_processing.py @@ -696,7 +696,7 @@ def compute(self, events): for prefix in ["", "alt_"]: # For electron lifetime corrections to the S2s, # use lifetimes computed using the main S1. - el_string = prefix + "s2_interaction_" if prefix is "alt_" else prefix + el_string = prefix + "s2_interaction_" if prefix == "alt_" else prefix lifetime_corr = np.exp(events[f'{el_string}drift_time'] / self.elife) # S2(x,y) corrections use the observed S2 positions From af955ee26e3a63f263a2a95abf66055f610027a8 Mon Sep 17 00:00:00 2001 From: Jingqiang Ye Date: Tue, 12 Oct 2021 09:22:06 -0500 Subject: [PATCH 10/16] load old maps --- straxen/corrections_services.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/straxen/corrections_services.py b/straxen/corrections_services.py index c11cb362c..7478eb380 100644 --- a/straxen/corrections_services.py +++ b/straxen/corrections_services.py @@ -15,7 +15,7 @@ export, __all__ = strax.exporter() corrections_w_file = ['mlp_model', 'cnn_model', 'gcn_model', - 's2_xy_map_mlp', 's2_xy_map_cnn', 's2_xy_map_gcn', + 's2_xy_map_mlp', 's2_xy_map_cnn', 's2_xy_map_gcn', 's2_xy_map', 's1_xyz_map_mlp', 's1_xyz_map_cnn', 's1_xyz_map_gcn', 'fdc_map_mlp', 'fdc_map_cnn', 'fdc_map_gcn'] From 5ab3157441e99898f4e89ba410b3a32fa9f8bb7d Mon Sep 17 00:00:00 2001 From: Jingqiang Ye Date: Tue, 12 Oct 2021 09:28:19 -0500 Subject: [PATCH 11/16] oops forgot cs2_aft --- straxen/plugins/event_processing.py | 1 + 1 file changed, 1 insertion(+) diff --git a/straxen/plugins/event_processing.py b/straxen/plugins/event_processing.py index f52a868d2..e08679998 100644 --- a/straxen/plugins/event_processing.py +++ b/straxen/plugins/event_processing.py @@ -707,6 +707,7 @@ def compute(self, events): result[f"{prefix}cs2_bottom"] = (events[f'{prefix}s2_area'] * (1 - events[f'{prefix}s2_area_fraction_top']) * lifetime_corr / self.s2_map(s2_positions, map_name=s2_bottom_map_name)) result[f"{prefix}cs2"] = result[f"{prefix}cs2_top"] + result[f"{prefix}cs2_bottom"] + result[f"{prefix}cs2_area_fraction_top"] = result[f"{prefix}cs2_top"] / result[f"{prefix}cs2"] return result From aa490a38f75a6fed1fbe8f179379b20af70116fd Mon Sep 17 00:00:00 2001 From: Jingqiang Ye Date: Tue, 12 Oct 2021 09:34:19 -0500 Subject: [PATCH 12/16] update correctedarea docstring --- straxen/plugins/event_processing.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/straxen/plugins/event_processing.py b/straxen/plugins/event_processing.py index e08679998..07551631e 100644 --- a/straxen/plugins/event_processing.py +++ b/straxen/plugins/event_processing.py @@ -627,11 +627,9 @@ class CorrectedAreas(strax.Plugin): Please be aware that for both, the main and alternative S1, the area is corrected according to the xy-position of the main S2. - There are now 3 components of cS2s: cS2top, cS2bot and cS2tot, - all computed with respect to corresponding S2 components. Therefore - cS2tot and cS2top+cS2bot are slightly different. - - Also the cS2aft is calculated by cS2top/cS2tot for now. + There are now 3 components of cS2s: cs2_top, cS2_bottom and cs2. + cs2_top and cs2_bottom are corrected by the corresponding maps, + and cs2 is the sum of the two. """ __version__ = '0.1.2' From ca47034430bf83d4138e4edce4e5972e6e24a2e5 Mon Sep 17 00:00:00 2001 From: Jingqiang Ye Date: Tue, 12 Oct 2021 09:50:15 -0500 Subject: [PATCH 13/16] unify name --- straxen/plugins/event_processing.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/straxen/plugins/event_processing.py b/straxen/plugins/event_processing.py index 07551631e..a1cad15b5 100644 --- a/straxen/plugins/event_processing.py +++ b/straxen/plugins/event_processing.py @@ -678,8 +678,8 @@ def compute(self, events): # We use this also for the alternate S1; for e.g. Kr this is # fine as the S1 correction varies slowly. event_positions = np.vstack([events['x'], events['y'], events['z']]).T - for prefix in ["", "alt_"]: - result[f"{prefix}cs1"] = events[f'{prefix}s1_area'] / self.s1_map(event_positions) + for peak_type in ["", "alt_"]: + result[f"{peak_type}cs1"] = events[f'{peak_type}s1_area'] / self.s1_map(event_positions) # s2 corrections # S2 top and bottom are corrected separately, and cS2 total is the sum of the two @@ -691,21 +691,21 @@ def compute(self, events): s2_top_map_name = "map" s2_bottom_map_name = "map" - for prefix in ["", "alt_"]: + for peak_type in ["", "alt_"]: # For electron lifetime corrections to the S2s, # use lifetimes computed using the main S1. - el_string = prefix + "s2_interaction_" if prefix == "alt_" else prefix + el_string = peak_type + "s2_interaction_" if peak_type == "alt_" else peak_type lifetime_corr = np.exp(events[f'{el_string}drift_time'] / self.elife) # S2(x,y) corrections use the observed S2 positions - s2_positions = np.vstack([events[f'{prefix}s2_x'], events[f'{prefix}s2_y']]).T + s2_positions = np.vstack([events[f'{peak_type}s2_x'], events[f'{peak_type}s2_y']]).T - result[f"{prefix}cs2_top"] = (events[f'{prefix}s2_area'] * events[f'{prefix}s2_area_fraction_top'] + result[f"{peak_type}cs2_top"] = (events[f'{peak_type}s2_area'] * events[f'{peak_type}s2_area_fraction_top'] * lifetime_corr / self.s2_map(s2_positions, map_name=s2_top_map_name)) - result[f"{prefix}cs2_bottom"] = (events[f'{prefix}s2_area'] * (1 - events[f'{prefix}s2_area_fraction_top']) + result[f"{peak_type}cs2_bottom"] = (events[f'{peak_type}s2_area'] * (1 - events[f'{peak_type}s2_area_fraction_top']) * lifetime_corr / self.s2_map(s2_positions, map_name=s2_bottom_map_name)) - result[f"{prefix}cs2"] = result[f"{prefix}cs2_top"] + result[f"{prefix}cs2_bottom"] - result[f"{prefix}cs2_area_fraction_top"] = result[f"{prefix}cs2_top"] / result[f"{prefix}cs2"] + result[f"{peak_type}cs2"] = result[f"{peak_type}cs2_top"] + result[f"{peak_type}cs2_bottom"] + result[f"{peak_type}cs2_area_fraction_top"] = result[f"{peak_type}cs2_top"] / result[f"{peak_type}cs2"] return result From 119df0bb30bdb219005504cfa09afad12f230876 Mon Sep 17 00:00:00 2001 From: Jingqiang Ye Date: Tue, 12 Oct 2021 11:45:21 -0500 Subject: [PATCH 14/16] change map name --- straxen/plugins/event_processing.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/straxen/plugins/event_processing.py b/straxen/plugins/event_processing.py index a1cad15b5..51467f66e 100644 --- a/straxen/plugins/event_processing.py +++ b/straxen/plugins/event_processing.py @@ -685,8 +685,8 @@ def compute(self, events): # S2 top and bottom are corrected separately, and cS2 total is the sum of the two # figure out the map name if len(self.s2_map.map_names) > 1: - s2_top_map_name = "s2_top" - s2_bottom_map_name = "s2_bottom" + s2_top_map_name = "map_top" + s2_bottom_map_name = "map_bottom" else: s2_top_map_name = "map" s2_bottom_map_name = "map" From 4994476415565ed15fba33536abace019e2bdea0 Mon Sep 17 00:00:00 2001 From: Jingqiang Ye Date: Wed, 13 Oct 2021 09:52:48 -0500 Subject: [PATCH 15/16] add elife_correction --- straxen/plugins/event_processing.py | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/straxen/plugins/event_processing.py b/straxen/plugins/event_processing.py index 51467f66e..ad6ec080d 100644 --- a/straxen/plugins/event_processing.py +++ b/straxen/plugins/event_processing.py @@ -642,8 +642,11 @@ class CorrectedAreas(strax.Plugin): ('alt_cs2', np.float32, 'Corrected area of the alternate S2 [PE]'), ('alt_cs2_top', np.float32, 'Corrected area of the alternate S2 in the top PMT array [PE]'), ('alt_cs2_bottom', np.float32, 'Corrected area of the alternate S2 in the bottom PMT array [PE]'), - ('cs2_area_fraction_top', np.float, 'Main cS2 fraction of area seen by the top PMT array'), - ('alt_cs2_area_fraction_top', np.float, 'Alternate cS2 fraction of area seen by the top PMT array'), + ('cs2_area_fraction_top', np.float32, 'Main cS2 fraction of area seen by the top PMT array'), + ('alt_cs2_area_fraction_top', np.float32, 'Alternate cS2 fraction of area seen by the top PMT array'), + ('elife_correction', np.float32, 'Main cS2 correction factor due to electron lifetime'), + ('alt_elife_correction', np.float32, 'Alt cS2 correction factor due to electron lifetime'), + ] + strax.time_fields def setup(self): @@ -695,15 +698,18 @@ def compute(self, events): # For electron lifetime corrections to the S2s, # use lifetimes computed using the main S1. el_string = peak_type + "s2_interaction_" if peak_type == "alt_" else peak_type - lifetime_corr = np.exp(events[f'{el_string}drift_time'] / self.elife) + result[f"{peak_type}elife_correction"] = np.exp(events[f'{el_string}drift_time'] / self.elife) # S2(x,y) corrections use the observed S2 positions s2_positions = np.vstack([events[f'{peak_type}s2_x'], events[f'{peak_type}s2_y']]).T result[f"{peak_type}cs2_top"] = (events[f'{peak_type}s2_area'] * events[f'{peak_type}s2_area_fraction_top'] - * lifetime_corr / self.s2_map(s2_positions, map_name=s2_top_map_name)) - result[f"{peak_type}cs2_bottom"] = (events[f'{peak_type}s2_area'] * (1 - events[f'{peak_type}s2_area_fraction_top']) - * lifetime_corr / self.s2_map(s2_positions, map_name=s2_bottom_map_name)) + * result[f"{peak_type}elife_correction"] + / self.s2_map(s2_positions, map_name=s2_top_map_name)) + result[f"{peak_type}cs2_bottom"] = (events[f'{peak_type}s2_area'] + * (1 - events[f'{peak_type}s2_area_fraction_top']) + * result[f"{peak_type}elife_correction"] + / self.s2_map(s2_positions, map_name=s2_bottom_map_name)) result[f"{peak_type}cs2"] = result[f"{peak_type}cs2_top"] + result[f"{peak_type}cs2_bottom"] result[f"{peak_type}cs2_area_fraction_top"] = result[f"{peak_type}cs2_top"] / result[f"{peak_type}cs2"] From 664960101c71cb26c7c80e13e41804fbeec54e22 Mon Sep 17 00:00:00 2001 From: Daniel Wenz Date: Fri, 15 Oct 2021 14:37:58 +0200 Subject: [PATCH 16/16] Remove latest CMT test --- tests/test_contexts.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/tests/test_contexts.py b/tests/test_contexts.py index 049db13ed..bcdd051e2 100644 --- a/tests/test_contexts.py +++ b/tests/test_contexts.py @@ -24,12 +24,6 @@ def test_xennonnt(): st.search_field('time') -def test_xennonnt_latest(cmt_version='latest'): - if straxen.utilix_is_configured(): - st = xenonnt(cmt_version, _database_init=False, use_rucio=False) - st.search_field('time') - - def test_xenonnt_led(): st = xenonnt_led(_database_init=False, use_rucio=False) st.search_field('time')