Skip to content

Commit

Permalink
style: pre-commit fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
pre-commit-ci[bot] committed May 1, 2024
1 parent 40cbcd3 commit dc3c1d9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
4 changes: 1 addition & 3 deletions src/pygama/evt/modules/geds.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,4 @@ def apply_xtalk_correction(
)

# return the result as LGDO
return types.VectorOfVectors(
energies_corr
)
return types.VectorOfVectors(energies_corr)
13 changes: 6 additions & 7 deletions tests/evt/test_build_evt.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit dc3c1d9

Please sign in to comment.