NuRadioReco.modules.RNO_G.triggerBoardResponse module
- class NuRadioReco.modules.RNO_G.triggerBoardResponse.triggerBoardResponse(log_level=30)[source]
Bases:
object
Simulates the response of the trigger board, nominally the “flower board” Includes: * analog frequency filter * ADC gain to fix the noise RMS to a specified number of bits * (optional) applies digitization to the waveforms
Methods
apply_adc_gain
(station, det, trigger_channels)Calculates and applies the gain adjustment such that the correct number of "noise bits" are realized.
apply_trigger_filter
(station, ...)Applies the requested trigger filter to the trigger_channels
begin
([adc_input_range, clock_offset, ...])- Parameters:
get_avg_vrms
(station, trigger_channels[, ...])Estimates the RMS voltage of the triggering antennas by splitting the waveforms into chunks and taking the median of standard deviation of the chunks
get_trigger_values
(station, det[, ...])Extracts information about the trigger channels from the detector description
run
(evt, station, det[, requested_channels, ...])Applies the additional filters on the trigger board and performs a gain amplification to get the correct number of trigger bits.
digitize_trace
end
- begin(adc_input_range=2.0, clock_offset=0.0, adc_output='voltage')[source]
- Parameters:
- adc_input_rangefloat (default: 2V)
the voltage range of the ADC (should be given in units of volts)
- clock_offset: bool
If True, a random clock offset between -1 and 1 clock cycles is added
- adc_output: string
Options:
‘voltage’ to store the ADC output as discretised voltage trace
‘counts’ to store the ADC output in ADC counts
- apply_trigger_filter(station, trigger_channels, trigger_filter)[source]
Applies the requested trigger filter to the trigger_channels
- Parameters:
- stationStation
Station to use
- trigger_channelslist
Channels that this function should be applied to
- trigger_filterfunction
set of interpolations describing the gain and phase of the filter (see function load_amp_response in file /detector/RNO_G/analog_components.py)
- get_avg_vrms(station, trigger_channels, trace_split=20)[source]
Estimates the RMS voltage of the triggering antennas by splitting the waveforms into chunks and taking the median of standard deviation of the chunks
- Parameters:
- stationStation
Station to use
- trigger_channelslist
Channels that this function should be applied to
- trace_splitint (default: 9)
How many chunks each of the waveforms will be split into before calculating the standard deviation
- Returns:
- approx_vrmsfloat
the median RMS voltage of the waveforms
- apply_adc_gain(station, det, trigger_channels, avg_vrms=None)[source]
Calculates and applies the gain adjustment such that the correct number of “noise bits” are realized. The ADC has fixed possible gain values and this module sets the one that is closest-to-but-greater-than the ideal value
- Parameters:
- stationStation
Station to use
- detDetector
The detector description
- trigger_channelslist
Channels that this function should be applied to
- avg_rmsfloat (default: None)
The Vrms of the trigger channels including the trigger board filters If set to None, this will be estimated using the waveforms
- Returns:
- vrms_after_gainfloat
the RMS voltage of the waveforms after the gain has been applied
- ideal_vrms: float
the ideal vrms, as measured on the ADC capacitors
- get_trigger_values(station, det, requested_channels=[])[source]
Extracts information about the trigger channels from the detector description
- Parameters:
- stationStation
Station to use
- detDetector
The detector description
- requested_channelslist (default: [])
Channels that this function should consider when extracting data
- Returns:
- found_trigger_channelslist
channel ids for the trigger channels
- trigger_filterfunction
set of interpolations describing the gain and phase of the filter (see function load_amp_response in file /detector/RNO_G/analog_components.py)
- run(evt, station, det, requested_channels=[], vrms=None, apply_adc_gain=True, digitize_trace=True, do_apply_trigger_filter=True)[source]
Applies the additional filters on the trigger board and performs a gain amplification to get the correct number of trigger bits. This module expects that all of the trigger channels (either defined by the existance of trigger_XXX fields in the detector .json file or via the requested_channels argument) are identical.
- Parameters:
- evtEvent
Event to run the module on
- stationStation
Station to run the module on
- detDetector
The detector description
- requested_channelslist (default: [])
Channels that this module should consider when applying the filter
- vrmsfloat (default: None)
The Vrms of the trigger channels including the trigger board filters If set to None, this will be estimated using the waveforms
- apply_adc_gainbool (default: True)
Apply the gain shift to achieve the specified level of noise bits
- digitize_tracebool (default: True)
Apply the quantization to the voltages (uses
NuRadioReco.modules.analogToDigitalConverter
to do so)- do_apply_trigger_filterbool (default: True)
Apply the trigger filter to the waveforms. The response might already be ablied as part of the detector simulation, in which case this should be set to False.
- Returns:
- trigger_board_vrmsfloat
the RMS voltage of the waveforms on the trigger board after applying the ADC gain