katgpucbf.fgpu.ddc module
Digital down-conversion.
- class katgpucbf.fgpu.ddc.DDC(template: DDCTemplate, command_queue: AbstractCommandQueue, samples: int, n_pols: int)[source]
Bases:
OperationOperation implementating
DDCTemplate.The kernel takes 10-bit integer inputs (real) and produces 32-bit floating-point outputs (complex). The user provides a real-valued FIR baseband filter and a mixer frequency for translating the signal from the desired band to baseband.
Element j of the output contains the dot product of weights with elements \(dj, d(j+1), \ldots, d(j+taps-1)\) of the mixed signal. The mixed signal is the product of sample \(j\) of the input with \(e^{2\pi i (aj + b)}\), where \(a\) is the mix_frequency argument to
configure()and \(b\) is the (settable)mix_phaseproperty.Slots
- insamples * input_sample_bits // BYTE_BITS, uint8
Input digitiser samples in a big chunk.
- outout_samples, complex64
Filtered and subsampled output data
- Raises:
ValueError – If samples is not a multiple of 8, or is less than template.taps
- Parameters:
template – Template for the PFB-FIR operation.
command_queue – The GPU command queue
samples – Number of input samples to store, per polarisation
n_pols – Number of polarisations
- class katgpucbf.fgpu.ddc.DDCTemplate(context: AbstractContext, taps: int, subsampling: int, input_sample_bits: int, tuning: _TuningDict | None = None)[source]
Bases:
objectTemplate for digital down-conversion.
See
DDCfor a more detailed description of what it does.- Parameters:
context – The GPU context that we’ll operate in
taps – Number of taps in the FIR filter
subsampling – Fraction of samples to retain after filtering
input_sample_bits – Bits per input sample
- classmethod autotune(context: AbstractContext, taps: int, subsampling: int, input_sample_bits: int) _TuningDict[source]
Determine tuning parameters.
- autotune_version = 3