NuRadioReco.modules.trigger.highLowThreshold module

NuRadioReco.modules.trigger.highLowThreshold.get_high_low_triggers(trace, high_threshold, low_threshold, time_coincidence=5, dt=1, step=1, align_strides_to_start=False)[source]

calculates a high low trigger in a time coincidence window

Parameters:
trace: array of floats

the signal trace

high_threshold: float

the high threshold

low_threshold: float

the low threshold

time_coincidence: float (default: 5 ns)

the time coincidence window between a high + low

dt: float (default: 1 ns)

the width of a time bin (inverse of sampling rate)

step: int (default: 1_

stride length for sampling rate and clock rate mismatch in trigger logic

align_strides_to_start: bool (default: False)

If true, the trace represents real detector data and will force the striding to start at the beginning of the trace without padding. If false, the traces will be zero-padded at the beginning of the trace. This allows a trigger at beginning of the trace to be associated with the correct trigger time.

Returns:
triggered bins: array of bools

the bins where the trigger condition is satisfied

NuRadioReco.modules.trigger.highLowThreshold.get_majority_logic(tts, number_of_coincidences=2, time_coincidence=32, dt=1, step=1, align_strides_to_start=False)[source]

calculates a majority logic trigger

Parameters:
tts: array/list of array of bools

an array of bools that indicate a single channel trigger per channel

number_of_coincidences: int (default: 2)

the number of coincidences between channels

time_coincidence: float (default: 32 ns)

the time coincidence window between channels

dt: float (default: 1ns)

the width of a time bin (inverse of sampling rate)

step: int (default: 1)

stride length for sampling rate and clock rate mismatch in trigger logic

align_strides_to_start: bool (default: False)

If true, the trace represents real detector data and will force the striding to start at the beginning of the trace without padding. If false, the traces will be zero-padded at the beginning of the trace. This allows a trigger at beginning of the trace to be associated with the correct trigger time.

Returns:
triggerd: bool

returns True if majority logic is fulfilled

triggerd_bins: array of ints

the bins that fulfilled the trigger

triggered_times: array of floats

the trigger times

class NuRadioReco.modules.trigger.highLowThreshold.triggerSimulator[source]

Bases: object

Calculates the trigger of an event. Uses the ARIANNA trigger logic, that a single antenna needs to cross a high and a low threshold value, and then coincidences between antennas can be required.

Methods

run(evt, station, det[, use_digitization, ...])

simulate ARIANNA trigger logic

begin

end

begin(log_level=0)[source]
run(evt, station, det, use_digitization=False, threshold_high=0.06, threshold_low=-0.06, high_low_window=5, coinc_window=200, number_concidences=2, triggered_channels=None, trigger_name='default_high_low', set_not_triggered=False, Vrms=None, trigger_adc=True, clock_offset=0, adc_output='voltage', step=1, align_strides_to_start=False, pre_trigger_time=None)[source]

simulate ARIANNA trigger logic

Parameters:
evt: Event

The event to run the module on

station: Station

The station to run the module on

det: Detector

The detector description

use_digitization: bool

If True, traces will be digitized

threshold_high: float or dict of floats

the threshold voltage that needs to be crossed on a single channel on the high side a dict can be used to specify a different threshold per channel where the key is the channel id

threshold_low: float or dict of floats

the threshold voltage that needs to be crossed on a single channel on the low side a dict can be used to specify a different threshold per channel where the key is the channel id

high_low_window: float

time window in which a high+low crossing needs to occur to trigger a channel

coinc_window: float

time window in which number_concidences channels need to trigger

number_concidences: int

number of channels that are requried in coincidence to trigger a station

triggered_channels: array of ints or None

channels ids that are triggered on, if None trigger will run on all channels

trigger_name: string

a unique name of this particular trigger

set_not_triggered: bool (default: False)

if True not trigger simulation will be performed and this trigger will be set to not_triggered

Vrms: float

If supplied, overrides adc_voltage_range as supplied in the detector description file

trigger_adc: bool

If True, the relevant ADC parameters in the config file are the ones that start with ‘trigger_’

clock_offset: float
adc_output: string

Options: * ‘voltage’ to store the ADC output as discretised voltage trace * ‘counts’ to store the ADC output in ADC counts

step: int

stride length for sampling rate and clock rate mismatch in trigger logic

align_strides_to_start: bool (default: False)

If true, the trace represents real detector data and will force the striding to start at the beginning of the trace without padding. If false, the traces will be zero-padded at the beginning of the trace. This allows a trigger at beginning of the trace to be associated with the correct trigger time.

pre_trigger_time: float or dict of floats

Defines the amount of trace recorded before the trigger time. This module does not cut the traces, but this trigger property is later used to trim traces accordingly. if a dict is given, the keys are the channel_ids, and the value is the pre_trigger_time between the start of the trace and the trigger time. if only a float is given, the same pre_trigger_time is used for all channels If none, the default value of the HighLowTrigger class is used, which is currently 55ns.

end()[source]