NuRadioReco.modules.RNO_G.hardwareResponseIncorporator module
- class NuRadioReco.modules.RNO_G.hardwareResponseIncorporator.hardwareResponseIncorporator[source]
Bases:
object
Incorporates the gain and phase induced by the RNO-G hardware.
Methods
get_filter
(frequencies, station_id, ...[, ...])Helper function to return the filter that the module applies.
run
(evt, station, det[, temp, sim_to_data, ...])Switch sim_to_data to go from simulation to data or otherwise.
begin
end
get_mingainlin
get_time_delay
- get_filter(frequencies, station_id, channel_id, det, temp=293.15, sim_to_data=False, phase_only=False, mode=None, mingainlin=None)[source]
Helper function to return the filter that the module applies.
- Parameters:
- frequencies: array of floats
the frequency array for which the filter should be returned
- station_id: int
the station id
- channel_id: int
the channel id
- det: detector instance
the detector
- temp: float
temperature in Kelvin, better in the range [223.15 K , 323.15 K]
- sim_to_data: bool (default False)
If False, deconvolve the hardware response. If True, convolve with the hardware response
- phase_only: bool (default False)
if True, only the phases response is applied but not the amplitude response
- mode: {None, ‘phase_only’, ‘relative’}, default None
Options:
‘phase_only’: only the phases response is applied but not the amplitude response (identical to phase_only=True )
‘relative’: gain of amp is divided by maximum of the gain, i.e. at the maximum of the filter response is 1 (before applying cable response). This makes it easier to compare the filtered to unfiltered signal
None : default, gain and phase effects are applied ‘normally’
- mingainlin: float
In frequency ranges where the gain gets very small, the reconstruction of the original signal (obtained by dividing the measured signal by the gain) leads to excessively high values, due to the effect of post-amplifier noise. In order to mitigate this effect, a minimum gain (linear scale!) as fraction of the maximum gain can be defined. If specified, any gain value smaller than mingainlin will be replaced by mingainlin.
Note: The adjustment to the minimal gain is NOT visible when getting the amp response from
analog_components.get_amplifier_response()
- Returns:
- array of complex floats
the complex filter amplitudes
- run(evt, station, det, temp=293.15, sim_to_data=False, phase_only=False, mode=None, mingainlin=None)[source]
Switch sim_to_data to go from simulation to data or otherwise. The option zero_noise can be used to zero the noise around the pulse. It is unclear, how useful this is.
- Parameters:
- evt: Event
Event to run the module on
- station: Station
Station to run the module on
- det: Detector
The detector description
- temp: temperature in Kelvin, better in the range [223.15 K , 323.15 K]
- sim_to_data: bool (default False)
if False, deconvolve the hardware response
if True, convolve with the hardware response
- phase_only: bool (default False)
if True, only the phases response is applied but not the amplitude response
- mode: string or None, default None
Options:
‘phase_only’: only the phases response is applied but not the amplitude response (identical to phase_only=True )
‘relative’: gain of amp is divided by maximum of the gain, i.e. at the maximum of the filter response is 1 (before applying cable response). This makes it easier to compare the filtered to unfiltered signal
None: default, gain and phase effects are applied ‘normally’
- mingainlin: float
In frequency ranges where the gain gets very small, the reconstruction of the original signal (obtained by dividing the measured signal by the gain) leads to excessively high values, due to the effect of post-amplifier noise. In order to mitigate this effect, a minimum gain (linear scale!) as fraction of the maximum gain can be defined. If specified, any gain value smaller than mingainlin will be replaced by mingainlin.
Note: The adjustment to the minimal gain is NOT visible when getting the amp response from
analog_components.get_amplifier_response()