optic.dsp.core.quantizer
- quantizer(x, nBits=16, maxV=1, minV=-1)
Quantize the input signal using a uniform quantizer with the specified precision.
- Parameters:
x (np.array) – The input signal to be quantized.
nBits (int) – Number of bits used for quantization. The quantizer will have 2^nBits levels.
maxV (float, optional) – Maximum value for the quantizer’s full-scale range (default is 1).
minV (float, optional) – Minimum value for the quantizer’s full-scale range (default is -1).
- Returns:
The quantized output signal with the same shape as ‘x’, quantized using ‘nBits’ levels.
- Return type:
np.array