Skip to main content

Module convolve_uv

Module convolve_uv 

Source
Expand description

FFT-based UV-plane beam convolution.

This is a port of racs_tools.convolve_uv.convolve and racs_tools.gaussft.gaussft. The “robust” mode is implemented: the FT of the convolving Gaussian is computed analytically at each UV point (no kernel image needed), which handles NaNs gracefully.

The convolution is generic over the floating-point element type FftFloat (f32 or f64): the transforms run in the same precision as the input image, so f32 data (the common radio-astronomy case) is transformed in f32 — roughly half the memory traffic and compute of an f64 transform — while genuine f64 data is honoured exactly. Plans and scratch buffers are reused across calls via FftPlans, which matters when convolving every channel of a cube at the same image size.

Structs§

ConvolutionResult
FftPlans
Cached FFT plans for a fixed (nrows, ncols) image size.

Enums§

ConvolveError

Traits§

FftFloat
Floating-point element type a convolution can run in: f32 or f64.

Functions§

convolve_uv
Convolve image from old_beam to new_beam in the UV plane.
convolve_uv_with_plans
Like convolve_uv, but reuses pre-built FftPlans instead of planning per call. plans must have been built for image’s dimensions.
fftfreq
numpy-compatible fftfreq(n, d).
gaussft
Compute the UV-plane filter that deconvolves old_beam and re-convolves with new_beam. Direct port of racs_tools.gaussft.gaussft.