Skip to content

Commit

Permalink
[evt.modules.larveto] fix pulse data masking for classifier
Browse files Browse the repository at this point in the history
  • Loading branch information
gipert committed May 8, 2024
1 parent cccec5d commit a770272
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
10 changes: 5 additions & 5 deletions src/pygama/evt/modules/spms.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ def geds_coincidence_classifier(
*,
geds_t0_ns: types.Array,
bkg_prob: float,
dens_array: Sequence[float],
dens_array: Sequence[float] = None,
) -> types.Array:
"""Calculate the HPGe / SiPMs coincidence classifier.
Expand Down Expand Up @@ -344,12 +344,12 @@ def geds_coincidence_classifier(
tcm,
table_names,
observable=obs,
pulse_mask=pulse_mask,
drop_empty=True,
pulse_mask=None,
drop_empty=False,
).view_as("ak")

# remove pulses below noise threshold
data[k] = all_data[is_good_pulse]
# remove pulses below noise threshold and outside the HPGe trigger window
data[k] = all_data[is_good_pulse & pulse_mask.view_as("ak")]

# load the channel info
# rawids = spms.gather_tcm_id_data(
Expand Down
6 changes: 5 additions & 1 deletion tests/evt/configs/spms-module-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -96,4 +96,8 @@ operations:
lar_coin_class:
channels: spms_on
aggregation_mode: function
expression: pygama.evt.modules.spms.geds_coincidence_classifier(<...>, geds_t0_ns=evt.t0, bkg_prob=0.42, dens_array=None)
expression: pygama.evt.modules.spms.geds_coincidence_classifier(
<...>,
geds_t0_ns=evt.t0,
bkg_prob=0.42,
dens_array=[0.5, 0.1, 0.05])

0 comments on commit a770272

Please sign in to comment.