Beispiel #1
0
    def demodulate_and_filter(self, samples):
        '''Demodulate and filter the given samples.'''

        if self.demod_type == Receiver.ENVELOPE:
            d_samples = demodulate.envelope_demodulator(samples)

        if self.filter_type == Receiver.AVERAGE_FILTER:
            window_size = int(self.sample_rate / float(self.fc))
            f_samples = filter.averaging_filter(d_samples, window_size)

        return f_samples
Beispiel #2
0
    def demodulate_and_filter(self, samples):
        '''Demodulate and filter the given samples.'''

        if self.demod_type == Receiver.ENVELOPE:
            d_samples = demodulate.envelope_demodulator(samples)

        if self.filter_type == Receiver.AVERAGE_FILTER:
            window_size = int(self.sample_rate/float(self.fc))
            f_samples = filter.averaging_filter(d_samples, window_size)

        return f_samples
Beispiel #3
0
    def demodulate_and_filter(self, samples):
        '''Demodulate and filter the given samples.'''

        if self.demod_type == Receiver.ENVELOPE:
            d_samples = demodulate.envelope_demodulator(samples)
        elif self.demod_type == Receiver.HETERODYNE:
            d_samples = demodulate.heterodyne_demodulator(samples, self.sample_rate, self.fc)
        elif self.demod_type == Receiver.QUADRATURE:
            d_samples = demodulate.quadrature_demodulator(samples, self.sample_rate, self.fc)

        if self.filter_type == Receiver.AVERAGE_FILTER:
            window_size = int(self.sample_rate/float(self.fc))
            f_samples = filter.averaging_filter(d_samples, window_size)
        elif self.filter_type == Receiver.LP_FILTER:
            f_samples = filter.low_pass_filter(d_samples, self.gap, self.sample_rate)

        return f_samples
Beispiel #4
0
    def demodulate_and_filter(self, samples):
        '''Demodulate and filter the given samples.'''
        if self.demod_type == Receiver.ENVELOPE:
            d_samples = demodulate.envelope_demodulator(samples)
        elif self.demod_type == Receiver.HETERODYNE:
            d_samples = demodulate.heterodyne_demodulator(
                samples, self.sample_rate, self.fc)
        elif self.demod_type == Receiver.QUADRATURE:
            d_samples = demodulate.quadrature_demodulator(
                samples, self.sample_rate, self.fc)

        if self.filter_type == Receiver.AVERAGE_FILTER:
            if self.window_size:
                window_size = self.window_size
            else:
                window_size = int(self.sample_rate / float(self.fc))
            f_samples = filter.averaging_filter(d_samples, window_size)
        elif self.filter_type == Receiver.LP_FILTER:
            f_samples = filter.low_pass_filter(d_samples, self.gap,
                                               self.sample_rate)

        return f_samples