Skip to content

Commit

Permalink
Change order of merging
Browse files Browse the repository at this point in the history
  • Loading branch information
RasmusOrsoe committed Sep 20, 2024
1 parent 719c3e1 commit 476441d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/graphnet/data/extractors/prometheus/pulsemap_simulator.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,19 +175,19 @@ def __call__(self, event: pd.DataFrame) -> pd.DataFrame:
photons=photons, column=self._time_column
)

# Merge photons into pulses, add charge & delete photons
pulses = self._merge_into_pulses(photons=photons)
del photons # save memory

# Smear arrival time
if self._time_std > 0:
photons[self._time_column] = abs(
pulses[self._time_column] = abs(
self._smear_feature(
x=photons[self._time_column],
x=pulses[self._time_column],
std=self._time_std,
)
).tolist()

# Merge photons into pulses, add charge & delete photons
pulses = self._merge_into_pulses(photons=photons)
del photons # save memory

# Smear Charge
if self._charge_std > 0:
pulses["charge"] = abs(
Expand Down

0 comments on commit 476441d

Please sign in to comment.