Skip to content

Commit 6f2b6a4

Browse files
Simple logic bug in the flash indexing when merging flashes
1 parent f27a630 commit 6f2b6a4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

spine/post/optical/flash_matching.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@ def process(self, data):
153153
# Merge flashes based on timing, if requested
154154
if self.merger is not None:
155155
flashes, orig_ids = self.merger(flashes)
156+
print(orig_ids)
156157

157158
# Loop over the optical volumes, run flash matching
158159
for k in self.interaction_keys:
@@ -231,7 +232,7 @@ def process(self, data):
231232
inter.flash_total_pe += float(flash.total_pe)
232233
inter.flash_hypo_pe += hypo_pe
233234

234-
if self.merger is not None and self.update_flashes:
235+
if self.merger is not None and not self.update_flashes:
235236
orig_flashes = [data[self.flash_key][i] for i in orig_ids[flash.id]]
236237
inter.flash_ids.extend([f.id for f in orig_flashes])
237238
inter.flash_volume_ids.extend([f.volume_id for f in orig_flashes])

0 commit comments

Comments
 (0)