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 83877e6 commit 7e4ec6c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
4 changes: 1 addition & 3 deletions src/pygama/evt/modules/xtalk.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@

import awkward as ak
import numpy as np
from lgdo import lh5

from lgdo import ls
from lgdo import lh5, ls

from .. import utils

Expand Down
7 changes: 4 additions & 3 deletions tests/evt/test_build_evt.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def test_field_nesting(lgnd_test_data, files_config):
assert sorted(evt.sub2.keys()) == ["dummy", "multiplicity"]


def test_xtalk(lgnd_test_data,files_config):
def test_xtalk(lgnd_test_data, files_config):

config = {
"channels": {"geds_on": ["ch1084803", "ch1084804", "ch1121600"]},
Expand All @@ -137,9 +137,9 @@ def test_xtalk(lgnd_test_data,files_config):
"channels": "geds_on",
"aggregation_mode": "function",
"expression": "pygama.evt.modules.geds.apply_xtalk_correction(<...>,uncalibrated_energy_name='cuspEmax_ctc',calibrated_energy_name=\
'cuspEmax_ctc_cal',xtalk_matrix_filename='/data1/users/tdixon/cross_talk/l200-p08-r015-x-talk-matrix_trapTmax.lh5')"
'cuspEmax_ctc_cal',xtalk_matrix_filename='/data1/users/tdixon/cross_talk/l200-p08-r015-x-talk-matrix_trapTmax.lh5')",
}
}
},
}
build_evt(
files_config,
Expand All @@ -152,6 +152,7 @@ def test_xtalk(lgnd_test_data,files_config):
evt = lh5.read("/evt", outfile)
show(outfile)


def test_spms_module(lgnd_test_data, files_config):
build_evt(
files_config,
Expand Down
4 changes: 3 additions & 1 deletion tests/evt/test_xtalk.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ def test_xtalk_corrected_energy():

energy = np.array([[1, 2, 3], [4, 5, 6], [2, 0, 1], [0, 1, 0]])
matrix = np.array([[0, 0, 1], [1, 0, 2], [0, 2, 0]])
energy_corrected_zero_threshold = xtalk.xtalk_corrected_energy(energy, energy,matrix, None)
energy_corrected_zero_threshold = xtalk.xtalk_corrected_energy(
energy, energy, matrix, None
)

assert np.all(
energy_corrected_zero_threshold
Expand Down

0 comments on commit 7e4ec6c

Please sign in to comment.