Skip to content

Commit

Permalink
style fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
tdixon97 committed May 4, 2024
1 parent ecb679d commit 495d215
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
10 changes: 4 additions & 6 deletions src/pygama/evt/modules/xtalk.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,10 @@ def build_energy_array(
list of channel rawids from the cross talk matrix.
"""


# replace group. with group___
# replace group. with group___
for tier in datainfo._asdict():
group = datainfo._asdict()[tier].group
observable= observable.replace(f"{group}.", f"{group}___")
observable = observable.replace(f"{group}.", f"{group}___")

observable = observable.replace(".", "__")

Expand All @@ -88,9 +87,8 @@ def build_energy_array(
# import function into current namespace
importlib.import_module(package)


# initialise the output object
energies_out = np.full(( np.max(tcm.idx) + 1,len(rawids)), np.nan)
energies_out = np.full((np.max(tcm.idx) + 1, len(rawids)), np.nan)

for idx_chan, channel in enumerate(rawids):
tbl = types.Table()
Expand All @@ -108,12 +106,12 @@ def build_energy_array(
except KeyError:
tbl.add_column(name, np.full_like(idx_events, np.nan))


res = tbl.eval(observable)
energies_out[idx_events, idx_chan] = res.nda

return energies_out


def filter_hits(
datainfo: utils.DataInfo,
tcm: utils.TCMData,
Expand Down
1 change: 0 additions & 1 deletion tests/evt/test_build_evt.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ def files_config(lgnd_test_data, tmptestdir):
}



def test_basics(lgnd_test_data, files_config):
build_evt(
files_config,
Expand Down

0 comments on commit 495d215

Please sign in to comment.