Пример #1
0
    def _detector_simulation_trigger(self, evt, station, det):

        # channel 8 is a noiseless channel at 100m depth
        simpleThreshold.run(
            evt,
            station,
            det,
            threshold=4 * self._Vrms_per_channel[station.get_id()][8],
            triggered_channels=[8],  # 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()][8],
            triggered_channels=[8],  # 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()][8],
            triggered_channels=[8],  # 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()][8],
            triggered_channels=[8],  # run trigger on all channels
            number_concidences=1,
            trigger_name=f'dipole_2.0sigma')
        simpleThreshold.run(
            evt,
            station,
            det,
            threshold=1.5 * self._Vrms_per_channel[station.get_id()][8],
            triggered_channels=[8],  # run trigger on all channels
            number_concidences=1,
            trigger_name=f'dipole_1.5sigma')
        simpleThreshold.run(
            evt,
            station,
            det,
            threshold=1.0 * self._Vrms_per_channel[station.get_id()][8],
            triggered_channels=[8],  # run trigger on all channels
            number_concidences=1,
            trigger_name=f'dipole_1.0sigma')

        Vrms = self._Vrms_per_channel[station.get_id()][4]

        # 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(0, 8),
            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(2, 6),
            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)
Пример #2
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)
Пример #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())

        # 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')
        simpleThreshold.run(
            evt,
            station,
            det,
            threshold=1.5 * self._Vrms_per_channel[station.get_id()][12],
            triggered_channels=[12],  # run trigger on all channels
            number_concidences=1,
            trigger_name=f'dipole_1.5sigma')
        simpleThreshold.run(
            evt,
            station,
            det,
            threshold=1.0 * self._Vrms_per_channel[station.get_id()][12],
            triggered_channels=[12],  # run trigger on all channels
            number_concidences=1,
            trigger_name=f'dipole_1.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)
Пример #4
0
    def _detector_simulation_trigger(self, evt, station, det):

        Vrms = self._Vrms

        simpleThreshold.run(
            evt,
            station,
            det,
            threshold=1.0 * Vrms,
            triggered_channels=[4],  # run trigger on all channels
            number_concidences=1,
            trigger_name='dipole_1.0sigma')
        simpleThreshold.run(
            evt,
            station,
            det,
            threshold=1.5 * Vrms,
            triggered_channels=[4],  # run trigger on all channels
            number_concidences=1,
            trigger_name='dipole_1.5sigma')
        simpleThreshold.run(
            evt,
            station,
            det,
            threshold=2.0 * Vrms,
            triggered_channels=[4],  # run trigger on all channels
            number_concidences=1,
            trigger_name='dipole_2.0sigma')
        simpleThreshold.run(
            evt,
            station,
            det,
            threshold=2.5 * Vrms,
            triggered_channels=[4],  # run trigger on all channels
            number_concidences=1,
            trigger_name='dipole_2.5sigma')
        simpleThreshold.run(
            evt,
            station,
            det,
            threshold=3.0 * Vrms,
            triggered_channels=[4],  # run trigger on all channels
            number_concidences=1,
            trigger_name='dipole_3.0sigma')
        simpleThreshold.run(
            evt,
            station,
            det,
            threshold=3.5 * Vrms,
            triggered_channels=[4],  # run trigger on all channels
            number_concidences=1,
            trigger_name='dipole_3.5sigma')

        triggerSimulator.run(
            evt,
            station,
            det,
            Vrms=Vrms,
            threshold=30.85 * np.power(Vrms, 2.0),
            triggered_channels=range(4),  # run trigger on all channels
            phasing_angles=phasing_angles_4ant,
            ref_index=1.75,
            trigger_name='4ant_phasing_100Hz',  # the name of the trigger
            trigger_adc=False,  # Don't have a seperate ADC for the trigger
            adc_output='voltage',  # output in volts
            trigger_filter=None,
            upsampling_factor=2,
            window=window_4ant,
            step=step_4ant)