コード例 #1
0
    def _detector_simulation_trigger(self, evt, station, det):

        """
        This function defines the trigger
        to know when an event has triggered. NuRadioMC and NuRadioReco support multiple
        triggers per detector. As an example, we will use a high-low threshold trigger
        with a high level of 5 times the noise RMS, and a low level of minus
        5 times the noise RMS, a coincidence window of 40 nanoseconds and request
        a coincidence of 2 out of 4 antennas. We can also choose which subset of
        channels we want to use for triggering (we will use the four channels in
        detector.json) by specifying their channel ids, defined in the detector file.
        It is also important to give a descriptive name to the trigger.
        """
        highLowThreshold.run(evt, station, det,
                             threshold_high=5 * self._Vrms,
                             threshold_low=-5 * self._Vrms,
                             coinc_window=40 * units.ns,
                             triggered_channels=[0, 1, 2, 3],
                             number_concidences=2,  # 2/4 majority logic
                             trigger_name='hilo_2of4_5_sigma')
        """
        We can add as well a simple trigger threshold of 10 sigma, or 10 times
        the noise RMS. If the absolute value of the voltage goes above that
        threshold, the event triggers.
        """
        simpleThreshold.run(evt, station, det,
                            threshold=10 * self._Vrms,
                            triggered_channels=[0, 1, 2, 3],
                            trigger_name='simple_10_sigma')
コード例 #2
0
 def _detector_simulation_trigger(self, evt, station, det):
     #run a high/low trigger on the deep bicones
     highLowThreshold.run(evt, station, det,
                                 threshold_high=2. * self._Vrms_per_channel[station.get_id()][0],
                                 threshold_low=-2. * self._Vrms_per_channel[station.get_id()][0],
                                 triggered_channels=[0, 1, 2, 3, 4, 5, 6, 7, 8], # select the bicone channels
                                 number_concidences=1, # 4/12 majority logic
                                 coinc_window=270 * units.ns,
                                 trigger_name='deep_bicones_1of6_2sigma') # calculate more time consuming ARIANNA trigger only if station passes simple trigger
コード例 #3
0
    def _detector_simulation_trigger(self, evt, station, det):
        # run a high/low trigger on the 4 downward pointing LPDAs
        threshold_high = {}
        threshold_low = {}
        for channel_id in det.get_channel_ids(station.get_id()):
            threshold_high[channel_id] = 2 * self._Vrms_per_channel[
                station.get_id()][channel_id]
            threshold_low[channel_id] = -2 * self._Vrms_per_channel[
                station.get_id()][channel_id]
        highLowThreshold.run(
            evt,
            station,
            det,
            threshold_high=threshold_high,
            threshold_low=threshold_low,
            coinc_window=40 * units.ns,
            triggered_channels=[0, 1, 2, 3],  # select the LPDA channels
            number_concidences=2,  # 2/4 majority logic
            trigger_name='LPDA_2of4_2sigma')

        threshold_high = {}
        threshold_low = {}
        for channel_id in det.get_channel_ids(station.get_id()):
            threshold_high[
                channel_id] = thresholds['2/4_100Hz'] * self._Vrms_per_channel[
                    station.get_id()][channel_id]
            threshold_low[channel_id] = -thresholds[
                '2/4_100Hz'] * self._Vrms_per_channel[
                    station.get_id()][channel_id]
        highLowThreshold.run(
            evt,
            station,
            det,
            threshold_high=threshold_high,
            threshold_low=threshold_low,
            coinc_window=40 * units.ns,
            triggered_channels=[0, 1, 2, 3],  # select the LPDA channels
            number_concidences=2,  # 2/4 majority logic
            trigger_name='LPDA_2of4_100Hz',
            set_not_triggered=not self._station.has_triggered())

        threshold_high = {}
        threshold_low = {}
        for channel_id in det.get_channel_ids(station.get_id()):
            threshold_high[
                channel_id] = thresholds['2/4_10mHz'] * self._Vrms_per_channel[
                    station.get_id()][channel_id]
            threshold_low[channel_id] = -thresholds[
                '2/4_10mHz'] * self._Vrms_per_channel[
                    station.get_id()][channel_id]
        highLowThreshold.run(
            evt,
            station,
            det,
            threshold_high=threshold_high,
            threshold_low=threshold_low,
            coinc_window=40 * units.ns,
            triggered_channels=[0, 1, 2, 3],  # select the LPDA channels
            number_concidences=2,  # 2/4 majority logic
            trigger_name='LPDA_2of4_10mHz',
            set_not_triggered=not self._station.has_triggered())
        simpleThreshold.run(
            evt,
            station,
            det,
            threshold=2.5 * self._Vrms_per_channel[station.get_id()][4],
            triggered_channels=[4],  # run trigger on all channels
            number_concidences=1,
            trigger_name='dipole_2.5sigma')  # the name of the trigger
        simpleThreshold.run(
            evt,
            station,
            det,
            threshold=1.5 * self._Vrms_per_channel[station.get_id()][4],
            triggered_channels=[4],  # run trigger on all channels
            number_concidences=1,
            trigger_name='dipole_1.5sigma')  # the name of the trigger
        simpleThreshold.run(
            evt,
            station,
            det,
            threshold=1 * self._Vrms_per_channel[station.get_id()][4],
            triggered_channels=[4],  # run trigger on all channels
            number_concidences=1,
            trigger_name='dipole_1.0sigma')  # the name of the trigger
        triggerTimeAdjuster.run(evt, station, det)
コード例 #4
0
    def _detector_simulation_trigger(self, evt, station, det):
        # run a high/low trigger on the 4 downward pointing LPDAs
        threshold_high = {}
        threshold_low = {}
        for channel_id in det.get_channel_ids(station.get_id()):
            threshold_high[
                channel_id] = thresholds['2/4_100Hz'] * self._Vrms_per_channel[
                    station.get_id()][channel_id]
            threshold_low[channel_id] = -thresholds[
                '2/4_100Hz'] * self._Vrms_per_channel[
                    station.get_id()][channel_id]
        highLowThreshold.run(
            evt,
            station,
            det,
            threshold_high=threshold_high,
            threshold_low=threshold_low,
            coinc_window=40 * units.ns,
            triggered_channels=[0, 1, 2, 3],  # select the LPDA channels
            number_concidences=2,  # 2/4 majority logic
            trigger_name='LPDA_2of4_100Hz')

        threshold_high = {}
        threshold_low = {}
        for channel_id in det.get_channel_ids(station.get_id()):
            threshold_high[
                channel_id] = thresholds['2/4_10mHz'] * self._Vrms_per_channel[
                    station.get_id()][channel_id]
            threshold_low[channel_id] = -thresholds[
                '2/4_10mHz'] * self._Vrms_per_channel[
                    station.get_id()][channel_id]
        highLowThreshold.run(
            evt,
            station,
            det,
            threshold_high=threshold_high,
            threshold_low=threshold_low,
            coinc_window=40 * units.ns,
            triggered_channels=[0, 1, 2, 3],  # select the LPDA channels
            number_concidences=2,  # 2/4 majority logic
            trigger_name='LPDA_2of4_10mHz',
            set_not_triggered=not self._station.has_triggered())

        # channel 8 is a noiseless channel at 100m depth
        simpleThreshold.run(
            evt,
            station,
            det,
            threshold=4 * self._Vrms_per_channel[station.get_id()][12],
            triggered_channels=[12],  # run trigger on all channels
            number_concidences=1,
            trigger_name=f'dipole_4sigma')
        simpleThreshold.run(
            evt,
            station,
            det,
            threshold=3 * self._Vrms_per_channel[station.get_id()][12],
            triggered_channels=[12],  # run trigger on all channels
            number_concidences=1,
            trigger_name=f'dipole_3.0sigma')
        simpleThreshold.run(
            evt,
            station,
            det,
            threshold=2.5 * self._Vrms_per_channel[station.get_id()][12],
            triggered_channels=[12],  # run trigger on all channels
            number_concidences=1,
            trigger_name=f'dipole_2.5sigma')
        simpleThreshold.run(
            evt,
            station,
            det,
            threshold=2.0 * self._Vrms_per_channel[station.get_id()][12],
            triggered_channels=[12],  # run trigger on all channels
            number_concidences=1,
            trigger_name=f'dipole_2.0sigma')

        Vrms = self._Vrms_per_channel[station.get_id()][8]
        # run the 8 phased trigger
        # x4 for upsampling
        window_8ant = int(16 * units.ns * self._sampling_rate_detector * 4.0)
        step_8ant = int(8 * units.ns * self._sampling_rate_detector * 4.0)

        phasedArrayTrigger.run(
            evt,
            station,
            det,
            Vrms=Vrms,
            threshold=62.15 *
            np.power(Vrms, 2.0),  # see phased trigger module for explanation
            triggered_channels=range(4, 12),
            phasing_angles=phasing_angles_8ant,
            ref_index=1.75,
            trigger_name=f'PA_8channel_100Hz',  # the name of the trigger
            trigger_adc=False,  # Don't have a seperate ADC for the trigger
            adc_output=f'voltage',  # output in volts
            trigger_filter=None,
            upsampling_factor=4,
            window=window_8ant,
            step=step_8ant)

        # run the 4 phased trigger
        # x2 for upsampling
        window_4ant = int(16 * units.ns * self._sampling_rate_detector * 2.0)
        step_4ant = int(8 * units.ns * self._sampling_rate_detector * 2.0)

        phasedArrayTrigger.run(
            evt,
            station,
            det,
            Vrms=Vrms,
            threshold=30.85 * np.power(Vrms, 2.0),
            triggered_channels=range(6, 10),
            phasing_angles=phasing_angles_4ant,
            ref_index=1.75,
            trigger_name=f'PA_4channel_100Hz',  # the name of the trigger
            trigger_adc=False,  # Don't have a seperate ADC for the trigger
            adc_output=f'voltage',  # output in volts
            trigger_filter=None,
            upsampling_factor=2,
            window=window_4ant,
            step=step_4ant)
コード例 #5
0
    def _detector_simulation(self):
        # start detector simulation
        if (bool(self._cfg['signal']['zerosignal'])):
            self._increase_signal(None, 0)

        efieldToVoltageConverter.run(
            self._evt, self._station,
            self._det)  # convolve efield with antenna pattern
        # downsample trace to internal simulation sampling rate (the efieldToVoltageConverter upsamples the trace to
        # 20 GHz by default to achive a good time resolution when the two signals from the two signal paths are added)
        channelResampler.run(self._evt,
                             self._station,
                             self._det,
                             sampling_rate=1. / self._dt)

        if bool(self._cfg['noise']):
            Vrms = self._Vrms / (
                self._bandwidth / (2.5 * units.GHz)
            )**0.5  # normalize noise level to the bandwidth its generated for
            channelGenericNoiseAdder.run(self._evt,
                                         self._station,
                                         self._det,
                                         amplitude=Vrms,
                                         min_freq=0 * units.MHz,
                                         max_freq=2.5 * units.GHz,
                                         type='rayleigh')

        # bandpass filter trace, the upper bound is higher then the sampling rate which makes it just a highpass filter
        channelBandPassFilter.run(self._evt,
                                  self._station,
                                  self._det,
                                  passband=[80 * units.MHz, 1000 * units.GHz],
                                  filter_type='butter',
                                  order=2)
        channelBandPassFilter.run(self._evt,
                                  self._station,
                                  self._det,
                                  passband=[0, 500 * units.MHz],
                                  filter_type='butter',
                                  order=10)
        # first run a simple threshold trigger
        simpleThreshold.run(
            self._evt,
            self._station,
            self._det,
            threshold=3 * self._Vrms,
            triggered_channels=None,  # run trigger on all channels
            number_concidences=1,
            trigger_name='simple_threshold')  # the name of the trigger

        # run a high/low trigger on the 4 downward pointing LPDAs
        highLowThreshold.run(
            self._evt,
            self._station,
            self._det,
            threshold_high=4 * self._Vrms,
            threshold_low=-4 * self._Vrms,
            triggered_channels=[0, 1, 2, 3],  # select the LPDA channels
            number_concidences=2,  # 2/4 majority logic
            trigger_name='LPDA_2of4_4.1sigma',
            set_not_triggered=(
                not self._station.has_triggered("simple_threshold"))
        )  # calculate more time consuming ARIANNA trigger only if station passes simple trigger

        # run a high/low trigger on the 4 surface dipoles
        highLowThreshold.run(
            self._evt,
            self._station,
            self._det,
            threshold_high=3 * self._Vrms,
            threshold_low=-3 * self._Vrms,
            triggered_channels=[4, 5, 6, 7],  # select the bicone channels
            number_concidences=4,  # 4/4 majority logic
            trigger_name='surface_dipoles_4of4_3sigma',
            set_not_triggered=(
                not self._station.has_triggered("simple_threshold"))
        )  # calculate more time consuming ARIANNA trigger only if station passes simple trigger

        # downsample trace back to detector sampling rate
        channelResampler.run(self._evt,
                             self._station,
                             self._det,
                             sampling_rate=self._sampling_rate_detector)