helpers#
Convenient helper functions
Convenient helper functions
- qampy.helpers.cabssquared(x)#
Calculate the absolute squared of a complex number
- qampy.helpers.dB2lin(x)#
Convert input from dB(m) units to linear units
- qampy.helpers.dump_edges(E, N)#
Remove N samples from the front and end of the input field.
- qampy.helpers.find_pilot_idx(nframe=2, frame_len=65536, os_rate=2, pilot_seq_len=1024, pilot_ins_rat=32)#
find pilot index for object with both pilot sequence (at the beginning) and phase pilot.
- qampy.helpers.get_center_shift_fac(E)#
Obtain shift factor (x_shift, y_shift) that is used to center the signal.
- qampy.helpers.lin2dB(x)#
Convert input from linear units to dB(m)
- qampy.helpers.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
- qampy.helpers.normalise_and_center_pil(sig, idx_pil)#
Normalise and center the input field only based on pilot symbols, by calculating the mean power for each polarisation separate and dividing by its square-root
- qampy.helpers.rescale_signal(E, swing=1)#
Rescale the (1-pol) signal to (-swing, swing).
- qampy.helpers.set_mid_and_resale(E, mid_pos=0, swing=1)#
Change (1-pol) signal mid-position to given value and rescale the real signal to (-swing, swing).
- qampy.helpers.set_mid_point(E, mid_pos=0)#
Move the (1-pol) signal’s mid-position to given value