NuRadioReco.modules.phasedarray.triggerSimulator module
- class NuRadioReco.modules.phasedarray.triggerSimulator.triggerSimulator(log_level=0)[source]
Bases:
object
Calculates the trigger for a phased array with a primary beam.
The channels that participate in both beams and the pointing angle for each subbeam can be specified.
See https://arxiv.org/pdf/1809.04573.pdf
Methods
calculate_time_delays
(station, det, ...[, ...])Calculates the delays needed for phasing the array.
check_vertical_string
(station, det, ...)Checks if the triggering antennas lie in a straight vertical line Throws error if not.
get_antenna_positions
(station, det[, ...])Calculates the vertical coordinates of the antennas of the detector
get_channel_trace_start_time
(station, ...)Finds the start time of the desired traces.
phase_signals
(traces, beam_rolls)Phase signals together given the rolls
phased_trigger
(station, det[, Vrms, ...])simulates phased array trigger for each event
power_sum
(coh_sum, window, step[, adc_output])Calculate power summed over a length defined by 'window', overlapping at intervals defined by 'step'
run
(evt, station, det[, Vrms, threshold, ...])Simulates phased array trigger for each event.
begin
end
- get_antenna_positions(station, det, triggered_channels=None, component=2)[source]
Calculates the vertical coordinates of the antennas of the detector
- Parameters:
- station: Station object
Description of the current station
- det: Detector object
Description of the current detector
- triggered_channels: array of ints
channels ids of the channels that form the primary phasing array if None, all channels are taken
- component: int
Which cartesian coordinate to return
- Returns:
- ant_pos: array of floatss
Desired antenna position in requested coordinate
- calculate_time_delays(station, det, triggered_channels, phasing_angles=array([-0.959931089, -0.714608352, -0.513801244, -0.333826648, -0.164572284, 1.11022302e-16, 0.164572284, 0.333826648, 0.513801244, 0.714608352, 0.959931089]), ref_index=1.75, sampling_frequency=None)[source]
Calculates the delays needed for phasing the array.
- Parameters:
- station: Station object
Description of the current station
- det: Detector object
Description of the current detector
- triggered_channels: array of ints
channels ids of the channels that form the primary phasing array if None, all channels are taken
- phasing_angles: array of float
pointing angles for the primary beam
- ref_index: float
refractive index for beam forming
- sampling_frequency: float
Rate of the ADC used
- Returns:
- beam_rolls: array of dicts of keys=antenna and content=delay
- get_channel_trace_start_time(station, triggered_channels)[source]
Finds the start time of the desired traces. Throws an error if all the channels dont have the same start time.
- Parameters:
- station: Station object
Description of the current station
- triggered_channels: array of ints
channels ids of the channels that form the primary phasing array if None, all channels are taken
- Returns:
- channel_trace_start_time: float
Channel start time
- check_vertical_string(station, det, triggered_channels)[source]
Checks if the triggering antennas lie in a straight vertical line Throws error if not.
- Parameters:
- station: Station object
Description of the current station
- det: Detector object
Description of the current detector
- triggered_channels: array of ints
channels ids of the channels that form the primary phasing array if None, all channels are taken
- power_sum(coh_sum, window, step, adc_output='voltage')[source]
Calculate power summed over a length defined by ‘window’, overlapping at intervals defined by ‘step’
- Parameters:
- coh_sum: array of floats
Phased signal to be integrated over
- window: int
Power integral window Units of ADC time ticks
- step: int
Time step in power integral. If equal to window, there is no time overlap in between neighboring integration windows Units of ADC time ticks.
- adc_output: string
‘voltage’ to store the ADC output as discretised voltage trace
‘counts’ to store the ADC output in ADC counts
- Returns:
- power:
Integrated power in each integration window
- num_frames
Number of integration windows calculated
- phase_signals(traces, beam_rolls)[source]
Phase signals together given the rolls
- Parameters:
- traces: 2D array of floats
Signals from the antennas to be phased together.
- beam_rolls: 2D array of floats
The amount to shift each signal before phasing the traces together
- Returns:
- phased_traces: array of arrays
- phased_trigger(station, det, Vrms=None, threshold=0.06, triggered_channels=None, phasing_angles=array([-0.959931089, -0.714608352, -0.513801244, -0.333826648, -0.164572284, 1.11022302e-16, 0.164572284, 0.333826648, 0.513801244, 0.714608352, 0.959931089]), ref_index=1.75, trigger_adc=False, clock_offset=0, adc_output='voltage', trigger_filter=None, upsampling_factor=1, window=32, step=16, apply_digitization=True)[source]
simulates phased array trigger for each event
Several channels are phased by delaying their signals by an amount given by a pointing angle. Several pointing angles are possible in order to cover the sky. The array triggered_channels controls the channels that are phased, according to the angles phasing_angles.
- Parameters:
- station: Station object
Description of the current station
- det: Detector object
Description of the current detector
- Vrms: float
RMS of the noise on a channel, used to automatically create the digitizer reference voltage. If set to None, tries to use reference voltage as defined int the detector description file.
- threshold: float
threshold above (or below) a trigger is issued, absolute amplitude
- triggered_channels: array of ints
channels ids of the channels that form the primary phasing array if None, all channels are taken
- phasing_angles: array of float
pointing angles for the primary beam
- ref_index: float (default 1.75)
refractive index for beam forming
- trigger_adc: bool (default True)
If True, uses the ADC settings from the trigger. It must be specified in the detector file. See analogToDigitalConverter module for information (see option apply_digitization)
- clock_offset: float (default 0)
Overall clock offset, for adc clock jitter reasons (see apply_digitization)
- adc_output: string (default ‘voltage’)
‘voltage’ to store the ADC output as discretised voltage trace
‘counts’ to store the ADC output in ADC counts
- trigger_filter: array floats (default None)
Freq. domain of the response to be applied to post-ADC traces Must be length for “MC freq”
- upsampling_factor: integer (default 1)
Upsampling factor. The trace will be a upsampled to a sampling frequency int_factor times higher than the original one after conversion to digital
- window: int (default 32)
Power integral window Units of ADC time ticks
- step: int (default 16)
Time step in power integral. If equal to window, there is no time overlap in between neighboring integration windows. Units of ADC time ticks
- apply_digitization: bool (default True)
Perform the quantization of the ADC. If set to true, should also set options trigger_adc, adc_output, clock_offset
- Returns:
- is_triggered: bool
True if the triggering condition is met
- trigger_delays: dictionary
the delays for the primary channels that have caused a trigger. If there is no trigger, it’s an empty dictionary
- trigger_time: float
the earliest trigger time with respect to first interaction time.
- trigger_times: dictionary
all time bins that fulfil the trigger condition per beam. The key is the beam number. Time with respect to first interaction time.
- 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
- run(evt, station, det, Vrms=None, threshold=0.06, triggered_channels=None, trigger_name='simple_phased_threshold', phasing_angles=array([-0.959931089, -0.714608352, -0.513801244, -0.333826648, -0.164572284, 1.11022302e-16, 0.164572284, 0.333826648, 0.513801244, 0.714608352, 0.959931089]), set_not_triggered=False, ref_index=1.75, trigger_adc=False, clock_offset=0, adc_output='voltage', trigger_filter=None, upsampling_factor=1, window=32, step=16, apply_digitization=True)[source]
Simulates phased array trigger for each event.
Several channels are phased by delaying their signals by an amount given by a pointing angle. Several pointing angles are possible in order to cover the sky. The array triggered_channels controls the channels that are phased, according to the angles phasing_angles.
- Parameters:
- evt: Event object
Description of the current event
- station: Station object
Description of the current station
- det: Detector object
Description of the current detector
- Vrms: float
RMS of the noise on a channel, used to automatically create the digitizer reference voltage. If set to None, tries to use reference voltage as defined int the detector description file.
- threshold: float
threshold above (or below) a trigger is issued, absolute amplitude
- triggered_channels: array of ints
channels ids of the channels that form the primary phasing array if None, all channels are taken
- trigger_name: string
name for the trigger
- phasing_angles: array of float
pointing angles for the primary beam
- set_not_triggered: bool (default False)
If True, no trigger simulation will be performed and this trigger will be set to not_triggered
- ref_index: float (default 1.75)
refractive index for beam forming
- trigger_adc: bool, (default True)
If True, uses the ADC settings from the trigger. It must be specified in the detector file. See analogToDigitalConverter module for information
- clock_offset: float (default 0)
Overall clock offset, for adc clock jitter reasons
- adc_output: string (default ‘voltage’)
‘voltage’ to store the ADC output as discretised voltage trace
‘counts’ to store the ADC output in ADC counts
- trigger_filter: array floats (default None)
Freq. domain of the response to be applied to post-ADC traces Must be length for “MC freq”
- upsampling_factor: integer (default 1)
Upsampling factor. The trace will be a upsampled to a sampling frequency int_factor times higher than the original one after conversion to digital
- window: int (default 32)
Power integral window Units of ADC time ticks
- step: int (default 16)
Time step in power integral. If equal to window, there is no time overlap in between neighboring integration windows. Units of ADC time ticks
- apply_digitization: bool (default True)
Perform the quantization of the ADC. If set to true, should also set options trigger_adc, adc_output, clock_offset
- Returns:
- is_triggered: bool
True if the triggering condition is met