qampy.signals#

signals#

QAMPy signal objects for the basic API. The signal objects are numpy ndarray subclasses that contain additional attributes and modules that define signals, such as sampling- and symbol-rate, the bits for generating the object etc..

In general signal objects can be manipulated like numpy arrays, and most operations preserve signal objects, therefore one should check if the returned objects are signal objects.

Warning

Some numpy functions preserve the subclass object type but do not pass the attributes and methods, np.concatenate does this.

Functions

cal_mi(signal, symbols_tx, alphabet, N0[, fast])

Calculate the mutual information for a given (noisy) signal array and the transmitted symbol array.

estimate_snr(signal_rx, symbols_tx, gray_symbols)

Estimate the signal-to-noise ratio from received and known transmitted symbols.

generate_bitmapping_mtx(coded_symbs, ...[, ...])

make_decision(signal, symbols[, method])

Quantize signal array onto symbols.

make_prbs_extXOR(order, nbits[, seed])

Create Pseudo Random Bit Sequence using Linear Feedback Shift Register with a Fibonacci or external XOR implementation.

save_signal(fn, signal[, lvl])

Save a signal object using zlib compression

soft_l_value_demapper(rx_symbs, num_bits, ...)

soft_l_value_demapper_minmax(rx_symbs, ...)

Classes

PRBSBits(N[, nmodes, seed, order])

Returns an 2-D array-object of random bits with shape (nmodes, N) Bits are integers 0,1 generated via a external XOR PRBS shift register

QPSKfromBERT(N[, nmodes, fb, prbsorders, ...])

A QPSK signal where I and Q are generated from either delayed data and data_bar ports or two independent ports of a bit error rate tester.

RandomBits(N[, nmodes, seed])

Returns an 2-D array-object of random bits with shape (nmodes, N) Bits are integers 0,1 generated via np.random.randint.

ResampledQAM(M, N[, fb, fs, resamplekwargs])

Convenience object to provide a SiggnalQAMGrayCoded object with different sampling rate than the symbol rate.

SignalBase

SignalPSKGrayCoded(M, N[, nmodes, fb, ...])

SignalQAMGrayCoded(M, N[, nmodes, fb, ...])

SignalWithPilots(M, frame_len, ...[, ...])

SignalWithPilots(M, frame_len, pilot_seq_len, pilot_ins_rat, nframes=1, pilot_scale=1, Mpilots=4,

SymbolOnlySignal(M, N, symbols nmodes=1[, ...])

2-D array subclass of ndarray representing signal for a given arbitrary symbol array, without a mapping to bits.

TDHQAMSymbols(M, N[, fr, power_method, ...])

TDHQAMSymbols(M, N, fr=0.5, power_method="dist",