comnum.adc#
- comnum.adc(x, bits, *, fs=1.0, full_scale=None, loading=None, enob=None, jitter_s=0.0, bandwidth_hz=None, rng=None)#
An analogue-to-digital converter on the in-phase and quadrature components: the front-end bandwidth (Gaussian, 3 dB at
bandwidth_hz), the sampling-clock jitter (first order), the noise of the effective number of bits, then a uniform mid-rise quantiser ofbitsbits with clipping at the full scale.- Parameters:
x (array_like) – the analogue signal (complex).
bits (int) – resolution
N.fs (float) – sampling rate (Hz).
full_scale (float, optional) – the full scale
Aof each dimension (the levels span±(A - Δ/2),Δ = 2A/2^N).loading (float, optional) – without
full_scale,Aisloadingtimes the RMS value of one dimension ofx; by default the loading that minimises the error of a Gaussian input (optimal_loading).enob (float, optional) – effective number of bits (
≤ N).jitter_s (float) – RMS clock jitter (s).
bandwidth_hz (float, optional) – 3 dB bandwidth of the front end (Hz).
rng (Rng, optional) – the generator, needed with
enoborjitter_s.
- Returns:
the digital samples (complex128).
- Return type:
- Raises:
ValueError – for an invalid parameter or input (the message names it).
Examples
>>> import comnum, numpy as np >>> comnum.adc(np.array([0.3 - 0.01j]), 3, full_scale=1.0).tolist() [(0.375-0.125j)]