From 82a16a4302a377d33f121eaee3f8cbb0fe44d2a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Schl=C3=BCter?= Date: Tue, 4 Feb 2025 12:04:03 +0100 Subject: [PATCH] Fix --- NuRadioMC/simulation/simulation.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/NuRadioMC/simulation/simulation.py b/NuRadioMC/simulation/simulation.py index 5f8110f63..45d708e4a 100644 --- a/NuRadioMC/simulation/simulation.py +++ b/NuRadioMC/simulation/simulation.py @@ -1676,7 +1676,7 @@ def run(self): # because we need to add noise to traces where the amplifier response # was already applied to. if bool(self._config['noise']): - self.add_filtered_noise_to_channels(evt, non_trigger_channels) + self.add_filtered_noise_to_channels(evt, station, non_trigger_channels) channelSignalReconstructor.run(evt, station, self._det) self._set_generator_attributes(evt) @@ -1717,14 +1717,14 @@ def run(self): logger.warning("No events were triggered. Writing empty HDF5 output file.") self._output_writer_hdf5.write_empty_output_file(self._fin_attrs) - def add_filtered_noise_to_channels(self, evt, channel_ids): + def add_filtered_noise_to_channels(self, evt, station, channel_ids): """ Add noise to the traces of the channels in the event. This function is used to add noise to the traces of the non-trigger channels. The traces of the non-trigger channels already have the detector response applied to them. Hence we add "filtered" noise, i.e., noise which is based through the same filter seperatly. """ - station = evt.get_station() + station_id = station.get_id() for channel_id in channel_ids: channel = station.get_channel(channel_id)