filtering#
Functions for filtering signal objects
Filter functions for matched filtering, pulse-shaping and impairment simulation.
- qampy.filtering.filter_signal(signal, cutoff, ftype='bessel', order=2, analog=False)#
Apply a filter to a signal for simulating e.g. electrical bandwidth limitation
- Parameters:
signal (SignalObject) – input signal
cutoff (float) – 3 dB cutoff frequency of the filter
ftype (string, optional) – filter type can be either a bessel, butter, exp or gauss filter (default=bessel)
order (int, optional) – order of the filter (default = 2)
analog (bool, optional) – whether to use analog filtering with lsim, much slower, but could give sligthly more accurate results for bessel and butter filters does not have an effect for other filters (default=False)
- Returns:
signalout – filtered output signal
- Return type:
SignalObject
- qampy.filtering.filter_signal_analog(signal, cutoff, ftype='bessel', order=2)#
Legacy function will be deprecated Apply an analog filter to a signal for simulating e.g. electrical bandwidth limitation
- Parameters:
signal (SignalObject) – input signal
cutoff (float) – 3 dB cutoff frequency of the filter
ftype (string, optional) – filter type can be either a bessel, butter, exp or gauss filter (default=bessel)
order (int, optional) – order of the filter (default = 2)
- Returns:
signalout – filtered output signal
- Return type:
SignalObject
- qampy.filtering.pre_filter(signal, bw)#
Low-pass pre-filter signal with square shape filter
- Parameters:
signal (SignalObject) – single polarization signal
bw (float) – bandwidth of the rejected part, given as fraction of overall length
- Returns:
signal_out – filtered signal
- Return type:
SignalObject
- qampy.filtering.rrcos_pulseshaping(sig, beta, T=None)#
Root-raised cosine filter applied in the spectral domain.
- Parameters:
sig (SignalObject) – input time distribution of the signal
beta (float) – filter roll-off factor needs to be in range [0, 1]
T (float, optional) – width of the filter (default: None, use the inverse of the signals symbol rate)
- Returns:
sign_out – filtered signal in time domain
- Return type:
SignalObject