NuRadioReco.modules.triggerTimeAdjuster module
- class NuRadioReco.modules.triggerTimeAdjuster.triggerTimeAdjuster(log_level=0)[source]
Bases:
object
Modifies channel traces to simulate the effects of the trigger
The trace is cut to the length defined in the detector description relative to the trigger time. If no trigger exists, nothing is done.
Methods
get_pre_trigger_time
(trigger_name, channel_id)Get the pre_trigger_time for a given trigger_name and channel_id
run
(event, station, detector[, mode])Run the trigger time adjuster.
begin
- get_pre_trigger_time(trigger_name, channel_id)[source]
Get the pre_trigger_time for a given trigger_name and channel_id
- run(event, station, detector, mode='sim_to_data')[source]
Run the trigger time adjuster.
This module can be used either to ‘cut’ the simulated traces into the appropriate readout windows, or to adjust the trace start times of simulated / real data to account for the different trigger readout delays.
If multiple triggers exist, the primary trigger is used. If multiple primary triggers exist, an error is raised. If no primary trigger exists, the trigger with the earliest trigger time is defined as the primary trigger and used to set the readout windows.
- Parameters:
- event: `NuRadioReco.framework.event.Event`
- station: `NuRadioReco.framework.base_station.Station`
- detector: `NuRadioReco.detector.detector.Detector`
- mode: ‘sim_to_data’ (default) | ‘data_to_sim’
If ‘sim_to_data’, cuts the (arbitrary-length) simulated traces to the appropriate readout windows. If ‘data_to_sim’, looks through all triggers in the station and adjusts the trace_start_time according to the different readout delays
If the
trigger_name
was specified in thebegin
function, only this trigger is considered.