sknrf.utilities.dsp module

sknrf.utilities.dsp.val2bits(val)
sknrf.utilities.dsp.nbits2sqnr(nbits)

Convert the number of bits in a DAC/ADC to Signal-to-Quantization Noise Ratio in rU

sknrf.utilities.dsp.load_iq_txt(i_filename, q_filename, t_points)
sknrf.utilities.dsp.save_iq_txt(iq_array, i_filename, q_filename)
sknrf.utilities.dsp.resample_f(X, num, axis=0)

Resample X to num samples using Fourier method along the given axis.

The resampled signal starts at the same value as x but is sampled with a spacing of len(x) / num * (spacing of x). Because a Fourier method is used, the signal is assumed to be periodic.

Parameters:
xarray_like

The data to be resampled.

numint

The number of samples in the resampled signal.

axisint, optional

The axis of x that is resampled. Default is 0.

Returns:
resampled_X

See also

decimate

Downsample the signal after applying an FIR or IIR filter.

resample_poly

Resample using polyphase filtering and an FIR filter.

sknrf.utilities.dsp.sinc(iq)
sknrf.utilities.dsp.iq_delay(iq, tau)
sknrf.utilities.dsp.iq_phase(iq, phase)
sknrf.utilities.dsp.sample_filter(iq, filter_, keepdims=False)
sknrf.utilities.dsp.ind_grid(fm)
sknrf.utilities.dsp.fm_grid(fm)
sknrf.utilities.dsp.fund_phasor(iq, fm, level=False, keepdims=False)

Synthesize a phasor frequency sweep.

Sweeps positive and negative frequencies individually (one-tone) using:

\[\]

iq = exp^{j2 pi f_m t}

Parameters:
iqTensor

IQ waveform of shape (1, t_points, f_points).

fmTensor

Fundamental frequency sweep of shape (fm_points).

level:

Level the frequency sweep with a 1/sinc(t) filter.

keepdims:

Keep the full dimensionality of the sweep.

Returns:
iqTensor

IQ waveform of shape (fm_points, t_points, f_points).

sknrf.utilities.dsp.fund_dsb(iq, fm, level=False, keepdims=False)

Synthesize a Double-Sideband (DSB) frequency sweep.

Sweeps positive and negative frequencies simultaneously (two-tone) using:

\[\]

iq = sin( 2 pi f_m t )

Parameters:
iqTensor

IQ waveform of shape (1, t_points, f_points).

fmTensor

Fundamental frequency sweep of shape (fm_points).

level:

Level the frequency sweep with a 1/sinc(t) filter.

keepdims:

Keep the full dimensionality of the sweep.

Returns:
iqTensor

IQ waveform of shape (fm_points, t_points, f_points).

sknrf.utilities.dsp.fund_ssb(iq, fm, level=False, keepdims=False)

Synthesize a Single-Sideband (SSB) frequency sweep.

Sweeps positive and negative frequencies independently (one-tone), using:

\[\]

iq = sin( 2 pi f_m t )

Parameters:
iqTensor

IQ waveform of shape (1, t_points, f_points).

fmTensor

Fundamental frequency sweep of shape (fm_points).

level:

Level the frequency sweep with a 1/sinc(t) filter.

keepdims:

Keep the full dimensionality of the sweep.

Returns:
iqTensor

IQ waveform of shape (fm_points, t_points, f_points).