qampy.core.impairments#

Functions for the simulation of transmission and transceiver impairments.

Functions

H_PMD(theta, t_dgd, omega)

Calculate the response for PMD applied to the signal (see e.g.

add_awgn(sig, strgth)

Add additive white Gaussian noise to a signal.

add_carrier_offset(sig, fo, fs)

Add frequency offset to signal

add_dispersion(sig, fs, D, L[, wl0])

Add dispersion to signal.

add_modal_delay(sig, delay)

Add a modal delay of n-symbols to modes of signal, e.g.

apply_DAC_filter(sig, fs[, cutoff, fn, ch])

Apply the frequency response filter of the DAC.

apply_PMD_to_field(field, theta, t_dgd, fs)

Apply PMD to a given input field

apply_enob_as_awgn(sig, enob[, verbose])

Add noise from limited ENOB as modelled as AWGN to signal.

apply_phase_noise(signal, df, fs)

Add phase noise from local oscillators, based on a Wiener noise process.

change_snr(sig, snr, fb, fs)

Change the SNR of a signal assuming that the input signal is noiseless

clipper(sig, clipping_level)

Clip signal to the range (-clipping_level, clipping_level).

er_to_g(ext_rat)

param ext_rat:

filter_signal(signal, fs, cutoff[, ftype, ...])

Apply an analog filter to a signal for simulating e.g.

ideal_amplifier_response(sig, out_volt)

Simulate a ideal amplifier, which just scale RF signal to out_volt.

load_dac_response(fn, fs, N[, ch])

Load the measured dac response and adjust it to target sampling frequency.

modulator_response(rfsig[, dcbias, gfactr, ...])

Function so simulate IQ modulator response.

normalise_and_center(E)

Normalise and center the input field, by calculating the mean power for each polarisation separate and dividing by its square-root

phase_noise(sz, df, fs)

Calculate phase noise from local oscillators, based on a Wiener noise process with a variance given by \(\sigma^2=2\pi df/fs\)

quantize_signal(sig[, nbits, rescale, ...])

Function so simulate limited resultion using DACs and ADCs

quantize_signal_New(sig_in[, nbits, ...])

Function so simulate limited resultion using DACs and ADCs, limit quantization error to (-delta/2,delta/2) and set

rescale_signal(E[, swing])

Rescale the (1-pol) signal to (-swing, swing).

rotate_field(field, theta)

Rotate a dual polarisation field by the given angle

sim_DAC_response(sig, fs[, enob, clip_rat, ...])

Function to simulate DAC response, including quantization noise (ENOB) and frequency response.

sim_tx_response(sig, fs[, enob, tgt_v, ...])

Simulate a realistic transmitter possibly including quantization, noise due to limited ENOB, and DAC frequency response

simulate_transmission(sig, fb, fs[, snr, ...])

Convenience function to simulate impairments on signal at once