NuRadioReco.framework.trigger module
- class NuRadioReco.framework.trigger.Trigger(name, channels=None, trigger_type='default')[source]
Bases:
object
base class to store different triggers
Methods
get_name
()get trigger name
Return the pre_trigger_time between the start of the trace and the (global) trigger time
get the trigger time (absolute time with respect to the beginning of the event)
get the trigger times (time with respect to beginning of trace)
get IDs of channels that have triggered
get_type
()get trigger type
returns true if station has trigger, false otherwise
set_pre_trigger_times
(pre_trigger_times)Set the pre-trigger times
set_trigger_time
(time)set the trigger time
set_trigger_times
(times)set the trigger times
set_triggered
([triggered])set the trigger to True or False
deserialize
get_trigger_settings
serialize
set_triggered_channels
initialize trigger class
- Parameters:
- name: string
unique name of the trigger
- channels: array of ints
the channels that are involved in the trigger
- trigger_type: string
the trigger type
Methods
get_name
()get trigger name
Return the pre_trigger_time between the start of the trace and the (global) trigger time
get the trigger time (absolute time with respect to the beginning of the event)
get the trigger times (time with respect to beginning of trace)
get IDs of channels that have triggered
get_type
()get trigger type
returns true if station has trigger, false otherwise
set_pre_trigger_times
(pre_trigger_times)Set the pre-trigger times
set_trigger_time
(time)set the trigger time
set_trigger_times
(times)set the trigger times
set_triggered
([triggered])set the trigger to True or False
deserialize
get_trigger_settings
serialize
set_triggered_channels
- set_trigger_time(time)[source]
set the trigger time
- Parameters:
- time: float
the trigger time from the beginning of the trace
- get_trigger_time()[source]
get the trigger time (absolute time with respect to the beginning of the event)
- set_pre_trigger_times(pre_trigger_times)[source]
Set the pre-trigger times
This parameter should only be set if this trigger determines the readout windows (e.g. by
NuRadioReco.modules.triggerTimeAdjuster
)- Parameters:
- pre_trigger_times: dict
keys are the channel_ids, and the value is the pre_trigger_time between the start of the trace and the trigger time.
- get_pre_trigger_times()[source]
Return the pre_trigger_time between the start of the trace and the (global) trigger time
If this trigger has not been used to adjust the readout windows, returns None instead
- Returns:
- pre_trigger_times: dict | None
If this trigger has been used to set the readout windows, returns a dictionary where the keys are the channel ids and the values are the time between the start of the channel trace and the trigger time. Otherwise, returns None
- class NuRadioReco.framework.trigger.SimpleThresholdTrigger(name, threshold, channels=None, number_of_coincidences=1, channel_coincidence_window=None)[source]
Bases:
Trigger
initialize trigger class
- Parameters:
- name: string
unique name of the trigger
- threshold: float or dict of floats
the threshold
- channels: array of ints or None
the channels that are involved in the trigger default: None, i.e. all channels
- number_of_coincidences: int
the number of channels that need to fulfill the trigger condition default: 1
- channel_coincidence_window: float or None (default)
the coincidence time between triggers of different channels
Methods
get_name
()get trigger name
Return the pre_trigger_time between the start of the trace and the (global) trigger time
get the trigger time (absolute time with respect to the beginning of the event)
get the trigger times (time with respect to beginning of trace)
get IDs of channels that have triggered
get_type
()get trigger type
returns true if station has trigger, false otherwise
set_pre_trigger_times
(pre_trigger_times)Set the pre-trigger times
set_trigger_time
(time)set the trigger time
set_trigger_times
(times)set the trigger times
set_triggered
([triggered])set the trigger to True or False
deserialize
get_trigger_settings
serialize
set_triggered_channels
- deserialize(data_pkl)
- get_name()
get trigger name
- get_pre_trigger_times()
Return the pre_trigger_time between the start of the trace and the (global) trigger time
If this trigger has not been used to adjust the readout windows, returns None instead
- Returns:
- pre_trigger_times: dict | None
If this trigger has been used to set the readout windows, returns a dictionary where the keys are the channel ids and the values are the time between the start of the channel trace and the trigger time. Otherwise, returns None
- get_trigger_settings()
- get_trigger_time()
get the trigger time (absolute time with respect to the beginning of the event)
- get_trigger_times()
get the trigger times (time with respect to beginning of trace)
- get_triggered_channels()
get IDs of channels that have triggered
- get_type()
get trigger type
- has_triggered()
returns true if station has trigger, false otherwise
- serialize()
- set_pre_trigger_times(pre_trigger_times)
Set the pre-trigger times
This parameter should only be set if this trigger determines the readout windows (e.g. by
NuRadioReco.modules.triggerTimeAdjuster
)- Parameters:
- pre_trigger_times: dict
keys are the channel_ids, and the value is the pre_trigger_time between the start of the trace and the trigger time.
- set_trigger_time(time)
set the trigger time
- Parameters:
- time: float
the trigger time from the beginning of the trace
- set_trigger_times(times)
set the trigger times
- Parameters:
- times: array
all trigger times
- set_triggered(triggered=True)
set the trigger to True or False
- set_triggered_channels(triggered_channels)
- class NuRadioReco.framework.trigger.EnvelopePhasedTrigger(name, threshold_factor, power_mean, power_std, triggered_channels=None, phasing_angles=None, trigger_delays=None, output_passband=(None, None))[source]
Bases:
Trigger
initialize trigger class
- Parameters:
- name: string
unique name of the trigger
- threshold_factor: float
the threshold factor
- power_mean: float
mean of the noise trace after being filtered with the diode
- power_std: float
standard deviation of the noise trace after being filtered with the diode. power_mean and power_std can be calculated with the function calculate_noise_parameters from utilities.diodeSimulator
- triggered_channels: array of ints or None
the channels that are involved in the main phased beam default: None, i.e. all channels
- phasing_angles: array of floats or None
the angles for each beam
- trigger_delays: dictionary
the delays for the channels that have caused a trigger. If there is no trigger, it’s an empty dictionary
- output_passband: (float, float) tuple
Frequencies for a 6th-order Butterworth filter to be applied after the diode filtering.
Methods
get_name
()get trigger name
Return the pre_trigger_time between the start of the trace and the (global) trigger time
get the trigger time (absolute time with respect to the beginning of the event)
get the trigger times (time with respect to beginning of trace)
get IDs of channels that have triggered
get_type
()get trigger type
returns true if station has trigger, false otherwise
set_pre_trigger_times
(pre_trigger_times)Set the pre-trigger times
set_trigger_time
(time)set the trigger time
set_trigger_times
(times)set the trigger times
set_triggered
([triggered])set the trigger to True or False
deserialize
get_trigger_settings
serialize
set_triggered_channels
- deserialize(data_pkl)
- get_name()
get trigger name
- get_pre_trigger_times()
Return the pre_trigger_time between the start of the trace and the (global) trigger time
If this trigger has not been used to adjust the readout windows, returns None instead
- Returns:
- pre_trigger_times: dict | None
If this trigger has been used to set the readout windows, returns a dictionary where the keys are the channel ids and the values are the time between the start of the channel trace and the trigger time. Otherwise, returns None
- get_trigger_settings()
- get_trigger_time()
get the trigger time (absolute time with respect to the beginning of the event)
- get_trigger_times()
get the trigger times (time with respect to beginning of trace)
- get_triggered_channels()
get IDs of channels that have triggered
- get_type()
get trigger type
- has_triggered()
returns true if station has trigger, false otherwise
- serialize()
- set_pre_trigger_times(pre_trigger_times)
Set the pre-trigger times
This parameter should only be set if this trigger determines the readout windows (e.g. by
NuRadioReco.modules.triggerTimeAdjuster
)- Parameters:
- pre_trigger_times: dict
keys are the channel_ids, and the value is the pre_trigger_time between the start of the trace and the trigger time.
- set_trigger_time(time)
set the trigger time
- Parameters:
- time: float
the trigger time from the beginning of the trace
- set_trigger_times(times)
set the trigger times
- Parameters:
- times: array
all trigger times
- set_triggered(triggered=True)
set the trigger to True or False
- set_triggered_channels(triggered_channels)
- class NuRadioReco.framework.trigger.SimplePhasedTrigger(name, threshold, channels=None, secondary_channels=None, primary_angles=None, secondary_angles=None, trigger_delays=None, sec_trigger_delays=None, window_size=None, step_size=None, maximum_amps=None)[source]
Bases:
Trigger
initialize trigger class
- Parameters:
- name: string
unique name of the trigger
- threshold: float
the threshold
- channels: array of ints or None
the channels that are involved in the main phased beam default: None, i.e. all channels
- secondary_channels: array of ints or None
the channels involved in the secondary phased beam
- primary_angles: array of floats or None
the angles for each subbeam of the primary phasing
- secondary_angles: array of floats or None
the angles for each subbeam of the secondary phasing
- trigger_delays: dictionary
the delays for the primary channels that have caused a trigger. If there is no trigger, it’s an empty dictionary
- sec_trigger_delays: dictionary
the delays for the secondary channels that have caused a trigger. If there is no trigger or no secondary channels, it’s an empty dictionary
- window_size: int
the size of the integration window (units of ADC time ticks)
- step_size: int
the size of the stride between calculating the phasing (units of ADC time ticks)
- maximum_amps: list of floats (length equal to that of `phasing_angles`)
the maximum value of all the integration windows for each of the phased waveforms
Methods
get_name
()get trigger name
Return the pre_trigger_time between the start of the trace and the (global) trigger time
get the trigger time (absolute time with respect to the beginning of the event)
get the trigger times (time with respect to beginning of trace)
get IDs of channels that have triggered
get_type
()get trigger type
returns true if station has trigger, false otherwise
set_pre_trigger_times
(pre_trigger_times)Set the pre-trigger times
set_trigger_time
(time)set the trigger time
set_trigger_times
(times)set the trigger times
set_triggered
([triggered])set the trigger to True or False
deserialize
get_trigger_settings
serialize
set_triggered_channels
- deserialize(data_pkl)
- get_name()
get trigger name
- get_pre_trigger_times()
Return the pre_trigger_time between the start of the trace and the (global) trigger time
If this trigger has not been used to adjust the readout windows, returns None instead
- Returns:
- pre_trigger_times: dict | None
If this trigger has been used to set the readout windows, returns a dictionary where the keys are the channel ids and the values are the time between the start of the channel trace and the trigger time. Otherwise, returns None
- get_trigger_settings()
- get_trigger_time()
get the trigger time (absolute time with respect to the beginning of the event)
- get_trigger_times()
get the trigger times (time with respect to beginning of trace)
- get_triggered_channels()
get IDs of channels that have triggered
- get_type()
get trigger type
- has_triggered()
returns true if station has trigger, false otherwise
- serialize()
- set_pre_trigger_times(pre_trigger_times)
Set the pre-trigger times
This parameter should only be set if this trigger determines the readout windows (e.g. by
NuRadioReco.modules.triggerTimeAdjuster
)- Parameters:
- pre_trigger_times: dict
keys are the channel_ids, and the value is the pre_trigger_time between the start of the trace and the trigger time.
- set_trigger_time(time)
set the trigger time
- Parameters:
- time: float
the trigger time from the beginning of the trace
- set_trigger_times(times)
set the trigger times
- Parameters:
- times: array
all trigger times
- set_triggered(triggered=True)
set the trigger to True or False
- set_triggered_channels(triggered_channels)
- class NuRadioReco.framework.trigger.HighLowTrigger(name, threshold_high, threshold_low, high_low_window, channel_coincidence_window, channels=None, number_of_coincidences=1)[source]
Bases:
Trigger
initialize trigger class
- Parameters:
- name: string
unique name of the trigger
- threshold_high: float or dict of floats
the high threshold
- threshold_low: float or dict of floats
the low threshold
- high_low_window: float
the coincidence time between a high and low per channel
- channel_coincidence_window: float
the coincidence time between triggers of different channels
- channels: array of ints or None
the channels that are involved in the trigger default: None, i.e. all channels
- number_of_coincidences: int
the number of channels that need to fulfill the trigger condition default: 1
Methods
get_name
()get trigger name
Return the pre_trigger_time between the start of the trace and the (global) trigger time
get the trigger time (absolute time with respect to the beginning of the event)
get the trigger times (time with respect to beginning of trace)
get IDs of channels that have triggered
get_type
()get trigger type
returns true if station has trigger, false otherwise
set_pre_trigger_times
(pre_trigger_times)Set the pre-trigger times
set_trigger_time
(time)set the trigger time
set_trigger_times
(times)set the trigger times
set_triggered
([triggered])set the trigger to True or False
deserialize
get_trigger_settings
serialize
set_triggered_channels
- deserialize(data_pkl)
- get_name()
get trigger name
- get_pre_trigger_times()
Return the pre_trigger_time between the start of the trace and the (global) trigger time
If this trigger has not been used to adjust the readout windows, returns None instead
- Returns:
- pre_trigger_times: dict | None
If this trigger has been used to set the readout windows, returns a dictionary where the keys are the channel ids and the values are the time between the start of the channel trace and the trigger time. Otherwise, returns None
- get_trigger_settings()
- get_trigger_time()
get the trigger time (absolute time with respect to the beginning of the event)
- get_trigger_times()
get the trigger times (time with respect to beginning of trace)
- get_triggered_channels()
get IDs of channels that have triggered
- get_type()
get trigger type
- has_triggered()
returns true if station has trigger, false otherwise
- serialize()
- set_pre_trigger_times(pre_trigger_times)
Set the pre-trigger times
This parameter should only be set if this trigger determines the readout windows (e.g. by
NuRadioReco.modules.triggerTimeAdjuster
)- Parameters:
- pre_trigger_times: dict
keys are the channel_ids, and the value is the pre_trigger_time between the start of the trace and the trigger time.
- set_trigger_time(time)
set the trigger time
- Parameters:
- time: float
the trigger time from the beginning of the trace
- set_trigger_times(times)
set the trigger times
- Parameters:
- times: array
all trigger times
- set_triggered(triggered=True)
set the trigger to True or False
- set_triggered_channels(triggered_channels)
- class NuRadioReco.framework.trigger.IntegratedPowerTrigger(name, threshold, channel_coincidence_window, channels=None, number_of_coincidences=1, power_mean=None, power_std=None, integration_window=None)[source]
Bases:
Trigger
initialize trigger class
- Parameters:
- name: string
unique name of the trigger
- threshold: float
the threshold
- channel_coincidence_window: float
the coincidence time between triggers of different channels
- channels: array of ints or None
the channels that are involved in the trigger default: None, i.e. all channels
- number_of_coincidences: int
the number of channels that need to fulfill the trigger condition default: 1
Methods
get_name
()get trigger name
Return the pre_trigger_time between the start of the trace and the (global) trigger time
get the trigger time (absolute time with respect to the beginning of the event)
get the trigger times (time with respect to beginning of trace)
get IDs of channels that have triggered
get_type
()get trigger type
returns true if station has trigger, false otherwise
set_pre_trigger_times
(pre_trigger_times)Set the pre-trigger times
set_trigger_time
(time)set the trigger time
set_trigger_times
(times)set the trigger times
set_triggered
([triggered])set the trigger to True or False
deserialize
get_trigger_settings
serialize
set_triggered_channels
- deserialize(data_pkl)
- get_name()
get trigger name
- get_pre_trigger_times()
Return the pre_trigger_time between the start of the trace and the (global) trigger time
If this trigger has not been used to adjust the readout windows, returns None instead
- Returns:
- pre_trigger_times: dict | None
If this trigger has been used to set the readout windows, returns a dictionary where the keys are the channel ids and the values are the time between the start of the channel trace and the trigger time. Otherwise, returns None
- get_trigger_settings()
- get_trigger_time()
get the trigger time (absolute time with respect to the beginning of the event)
- get_trigger_times()
get the trigger times (time with respect to beginning of trace)
- get_triggered_channels()
get IDs of channels that have triggered
- get_type()
get trigger type
- has_triggered()
returns true if station has trigger, false otherwise
- serialize()
- set_pre_trigger_times(pre_trigger_times)
Set the pre-trigger times
This parameter should only be set if this trigger determines the readout windows (e.g. by
NuRadioReco.modules.triggerTimeAdjuster
)- Parameters:
- pre_trigger_times: dict
keys are the channel_ids, and the value is the pre_trigger_time between the start of the trace and the trigger time.
- set_trigger_time(time)
set the trigger time
- Parameters:
- time: float
the trigger time from the beginning of the trace
- set_trigger_times(times)
set the trigger times
- Parameters:
- times: array
all trigger times
- set_triggered(triggered=True)
set the trigger to True or False
- set_triggered_channels(triggered_channels)
- class NuRadioReco.framework.trigger.EnvelopeTrigger(name, passband, order, threshold, number_of_coincidences=2, channel_coincidence_window=None, channels=None)[source]
Bases:
Trigger
initialize trigger class
- Parameters:
- name: string
unique name of the trigger
- passband: array
the passband in which the trigger should apply
- order: int
order of filtertype ‘butterabs’
- threshold: float
the threshold
- channels: array of ints or None
the channels that are involved in the trigger default: None, i.e. all channels
- number_of_coincidences: int
the number of channels that need to fulfill the trigger condition default: 1
- channel_coincidence_window: float or None (default)
the coincidence time between triggers of different channels
Methods
get_name
()get trigger name
Return the pre_trigger_time between the start of the trace and the (global) trigger time
get the trigger time (absolute time with respect to the beginning of the event)
get the trigger times (time with respect to beginning of trace)
get IDs of channels that have triggered
get_type
()get trigger type
returns true if station has trigger, false otherwise
set_pre_trigger_times
(pre_trigger_times)Set the pre-trigger times
set_trigger_time
(time)set the trigger time
set_trigger_times
(times)set the trigger times
set_triggered
([triggered])set the trigger to True or False
deserialize
get_trigger_settings
serialize
set_triggered_channels
- deserialize(data_pkl)
- get_name()
get trigger name
- get_pre_trigger_times()
Return the pre_trigger_time between the start of the trace and the (global) trigger time
If this trigger has not been used to adjust the readout windows, returns None instead
- Returns:
- pre_trigger_times: dict | None
If this trigger has been used to set the readout windows, returns a dictionary where the keys are the channel ids and the values are the time between the start of the channel trace and the trigger time. Otherwise, returns None
- get_trigger_settings()
- get_trigger_time()
get the trigger time (absolute time with respect to the beginning of the event)
- get_trigger_times()
get the trigger times (time with respect to beginning of trace)
- get_triggered_channels()
get IDs of channels that have triggered
- get_type()
get trigger type
- has_triggered()
returns true if station has trigger, false otherwise
- serialize()
- set_pre_trigger_times(pre_trigger_times)
Set the pre-trigger times
This parameter should only be set if this trigger determines the readout windows (e.g. by
NuRadioReco.modules.triggerTimeAdjuster
)- Parameters:
- pre_trigger_times: dict
keys are the channel_ids, and the value is the pre_trigger_time between the start of the trace and the trigger time.
- set_trigger_time(time)
set the trigger time
- Parameters:
- time: float
the trigger time from the beginning of the trace
- set_trigger_times(times)
set the trigger times
- Parameters:
- times: array
all trigger times
- set_triggered(triggered=True)
set the trigger to True or False
- set_triggered_channels(triggered_channels)
- class NuRadioReco.framework.trigger.RNOGSurfaceTrigger(name, threshold, number_of_coincidences=1, channel_coincidence_window=60, channels=[13, 16, 19], temperature=250, Vbias=2.0)[source]
Bases:
Trigger
initialize trigger class
- Parameters:
- name: string
unique name of the trigger
- threshold: float
the threshold
- number_of_coincidences: int
the number of channels that need to fulfill the trigger condition default: 1
- channel_coincidence_window: float or None (default)
the coincidence time between triggers of different channels
- channels: array of ints or None
the channels that are involved in the trigger default: None, i.e. all channels
- temperature: float
temperature of the trigger board
- Vbias: float
bias voltage on the trigger board
Methods
get_name
()get trigger name
Return the pre_trigger_time between the start of the trace and the (global) trigger time
get the trigger time (absolute time with respect to the beginning of the event)
get the trigger times (time with respect to beginning of trace)
get IDs of channels that have triggered
get_type
()get trigger type
returns true if station has trigger, false otherwise
set_pre_trigger_times
(pre_trigger_times)Set the pre-trigger times
set_trigger_time
(time)set the trigger time
set_trigger_times
(times)set the trigger times
set_triggered
([triggered])set the trigger to True or False
deserialize
get_trigger_settings
serialize
set_triggered_channels
- units = <module 'NuRadioReco.utilities.units' from '/home/runner/work/NuRadioMC/NuRadioMC/NuRadioReco/utilities/units.py'>
- deserialize(data_pkl)
- get_name()
get trigger name
- get_pre_trigger_times()
Return the pre_trigger_time between the start of the trace and the (global) trigger time
If this trigger has not been used to adjust the readout windows, returns None instead
- Returns:
- pre_trigger_times: dict | None
If this trigger has been used to set the readout windows, returns a dictionary where the keys are the channel ids and the values are the time between the start of the channel trace and the trigger time. Otherwise, returns None
- get_trigger_settings()
- get_trigger_time()
get the trigger time (absolute time with respect to the beginning of the event)
- get_trigger_times()
get the trigger times (time with respect to beginning of trace)
- get_triggered_channels()
get IDs of channels that have triggered
- get_type()
get trigger type
- has_triggered()
returns true if station has trigger, false otherwise
- serialize()
- set_pre_trigger_times(pre_trigger_times)
Set the pre-trigger times
This parameter should only be set if this trigger determines the readout windows (e.g. by
NuRadioReco.modules.triggerTimeAdjuster
)- Parameters:
- pre_trigger_times: dict
keys are the channel_ids, and the value is the pre_trigger_time between the start of the trace and the trigger time.
- set_trigger_time(time)
set the trigger time
- Parameters:
- time: float
the trigger time from the beginning of the trace
- set_trigger_times(times)
set the trigger times
- Parameters:
- times: array
all trigger times
- set_triggered(triggered=True)
set the trigger to True or False
- set_triggered_channels(triggered_channels)