From dc3c1d9e50723064dce5c8046790eb6d7cc0a381 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 1 May 2024 14:39:25 +0000 Subject: [PATCH] style: pre-commit fixes --- src/pygama/evt/modules/geds.py | 4 +--- tests/evt/test_build_evt.py | 13 ++++++------- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/src/pygama/evt/modules/geds.py b/src/pygama/evt/modules/geds.py index 83509e933..4997ad785 100644 --- a/src/pygama/evt/modules/geds.py +++ b/src/pygama/evt/modules/geds.py @@ -114,6 +114,4 @@ def apply_xtalk_correction( ) # return the result as LGDO - return types.VectorOfVectors( - energies_corr - ) + return types.VectorOfVectors(energies_corr) diff --git a/tests/evt/test_build_evt.py b/tests/evt/test_build_evt.py index 91531a156..ed83b43fd 100644 --- a/tests/evt/test_build_evt.py +++ b/tests/evt/test_build_evt.py @@ -25,25 +25,24 @@ def files_config(lgnd_test_data, tmptestdir): "evt": (outfile, "evt"), } -def test_xtalk(lgnd_test_data,files_config): + +def test_xtalk(lgnd_test_data, files_config): config = { "channels": {"geds_on": ["ch1084803", "ch1084804", "ch1121600"]}, "outputs": [ "corrected_energy", - ], "operations": { "corrected_energy": { "channels": "geds_on", "aggregation_mode": "function", "expression": "pygama.evt.modules.geds.apply_xtalk_correction(<...>,uncalibrated_energy_name='dsp.cuspEmax',calibrated_energy_name=\ - 'hit.cuspEmax_ctc_cal',xtalk_matrix_filename='/data1/users/tdixon/cross_talk/l200-p08-r015-x-talk-matrix_trapTmax.lh5')" + 'hit.cuspEmax_ctc_cal',xtalk_matrix_filename='/data1/users/tdixon/cross_talk/l200-p08-r015-x-talk-matrix_trapTmax.lh5')", } - } + }, } - build_evt( files_config, config=config, @@ -53,10 +52,11 @@ def test_xtalk(lgnd_test_data,files_config): outfile = files_config["evt"][0] evt = lh5.read("/evt", outfile) - + assert os.path.exists(outfile) assert sorted(evt.keys()) == ["corrected_energy"] + def test_basics(lgnd_test_data, files_config): build_evt( files_config, @@ -154,7 +154,6 @@ def test_field_nesting(lgnd_test_data, files_config): assert sorted(evt.sub2.keys()) == ["dummy", "multiplicity"] - def test_spms_module(lgnd_test_data, files_config): build_evt( files_config,