autolens.TransformerDFT#

class TransformerDFT[source]#

Bases: object

A direct Fourier transform (DFT) operator for radio interferometric imaging.

This class performs the forward and inverse mapping between real-space images and complex visibilities measured by an interferometer. It uses a direct implementation of the Fourier transform (not FFT-based), making it suitable for irregular uv-coverage.

Optionally, it precomputes and stores the sine and cosine terms used in the transform, which can significantly improve performance for repeated operations but at the cost of memory.

Parameters:
  • uv_wavelengths (ndarray) – The (u, v) coordinates in wavelengths of the measured visibilities.

  • real_space_mask (Mask2D) – The real-space mask that defines the image grid and which pixels are valid.

grid#

The unmasked real-space grid in radians.

Type:

ndarray

total_visibilities#

The number of measured visibilities.

Type:

int

total_image_pixels#

The number of unmasked pixels in the real-space image grid.

Type:

int

preload_real_transforms#

The precomputed cosine terms used in the real part of the DFT.

Type:

ndarray, optional

preload_imag_transforms#

The precomputed sine terms used in the imaginary part of the DFT.

Type:

ndarray, optional

real_space_pixels#

Alias for total_image_pixels.

Type:

int

adjoint_scaling#

Scaling factor applied to the adjoint operator to normalize the inverse transform.

Type:

float

__init__(uv_wavelengths, real_space_mask)[source]#

A direct Fourier transform (DFT) operator for radio interferometric imaging.

This class performs the forward and inverse mapping between real-space images and complex visibilities measured by an interferometer. It uses a direct implementation of the Fourier transform (not FFT-based), making it suitable for irregular uv-coverage.

Optionally, it precomputes and stores the sine and cosine terms used in the transform, which can significantly improve performance for repeated operations but at the cost of memory.

Parameters:
  • uv_wavelengths (ndarray) – The (u, v) coordinates in wavelengths of the measured visibilities.

  • real_space_mask (Mask2D) – The real-space mask that defines the image grid and which pixels are valid.

grid#

The unmasked real-space grid in radians.

Type:

ndarray

total_visibilities#

The number of measured visibilities.

Type:

int

total_image_pixels#

The number of unmasked pixels in the real-space image grid.

Type:

int

preload_real_transforms#

The precomputed cosine terms used in the real part of the DFT.

Type:

ndarray, optional

preload_imag_transforms#

The precomputed sine terms used in the imaginary part of the DFT.

Type:

ndarray, optional

real_space_pixels#

Alias for total_image_pixels.

Type:

int

adjoint_scaling#

Scaling factor applied to the adjoint operator to normalize the inverse transform.

Type:

float

Methods

__init__(uv_wavelengths, real_space_mask)

A direct Fourier transform (DFT) operator for radio interferometric imaging.

image_from(visibilities[, ...])

Computes the real-space image from a set of visibilities using the adjoint of the DFT.

transform_mapping_matrix(mapping_matrix[, xp])

Applies the DFT to a mapping matrix that maps source pixels to image pixels.

visibilities_from(image[, xp])

Computes the visibilities from a real-space image using the direct Fourier transform (DFT).

__init__(uv_wavelengths, real_space_mask)[source]#

A direct Fourier transform (DFT) operator for radio interferometric imaging.

This class performs the forward and inverse mapping between real-space images and complex visibilities measured by an interferometer. It uses a direct implementation of the Fourier transform (not FFT-based), making it suitable for irregular uv-coverage.

Optionally, it precomputes and stores the sine and cosine terms used in the transform, which can significantly improve performance for repeated operations but at the cost of memory.

Parameters:
  • uv_wavelengths (ndarray) – The (u, v) coordinates in wavelengths of the measured visibilities.

  • real_space_mask (Mask2D) – The real-space mask that defines the image grid and which pixels are valid.

grid#

The unmasked real-space grid in radians.

Type:

ndarray

total_visibilities#

The number of measured visibilities.

Type:

int

total_image_pixels#

The number of unmasked pixels in the real-space image grid.

Type:

int

preload_real_transforms#

The precomputed cosine terms used in the real part of the DFT.

Type:

ndarray, optional

preload_imag_transforms#

The precomputed sine terms used in the imaginary part of the DFT.

Type:

ndarray, optional

real_space_pixels#

Alias for total_image_pixels.

Type:

int

adjoint_scaling#

Scaling factor applied to the adjoint operator to normalize the inverse transform.

Type:

float

visibilities_from(image, xp=<module 'numpy' from '/home/docs/checkouts/readthedocs.org/user_builds/pyautolens/envs/latest/lib/python3.12/site-packages/numpy/__init__.py'>)[source]#

Computes the visibilities from a real-space image using the direct Fourier transform (DFT).

This method transforms the input image into the uv-plane (Fourier space), simulating the measurements made by an interferometer at specified uv-wavelengths.

Parameters:

image (Array2D) – The real-space image to be transformed to the uv-plane. Must be defined on the same grid and mask as this transformer’s real_space_mask.

Return type:

The complex visibilities resulting from the Fourier transform of the input image.

image_from(visibilities, use_adjoint_scaling=False, xp=<module 'numpy' from '/home/docs/checkouts/readthedocs.org/user_builds/pyautolens/envs/latest/lib/python3.12/site-packages/numpy/__init__.py'>)[source]#

Computes the real-space image from a set of visibilities using the adjoint of the DFT.

This is not a true inverse Fourier transform, but rather the adjoint operation, which maps complex visibilities back into image space. This is typically used as the first step in inverse imaging algorithms like CLEAN or regularized reconstruction.

Parameters:
  • visibilities (Visibilities) – The complex visibilities to be transformed into a real-space image.

  • use_adjoint_scaling (bool) – If True, the result is scaled by a normalization factor. Currently unused.

Returns:

  • The real-space image resulting from the adjoint DFT operation, defined on the same

  • mask as this transformer’s real_space_mask.

transform_mapping_matrix(mapping_matrix, xp=<module 'numpy' from '/home/docs/checkouts/readthedocs.org/user_builds/pyautolens/envs/latest/lib/python3.12/site-packages/numpy/__init__.py'>)[source]#

Applies the DFT to a mapping matrix that maps source pixels to image pixels.

This is used in linear inversion frameworks, where the transform of each source basis function (represented by a column of the mapping matrix) is computed individually. The result is a matrix mapping source pixels directly to visibilities.

Parameters:

mapping_matrix (ndarray) – A 2D array of shape (n_image_pixels, n_source_pixels) that maps source pixels to image-plane pixels.

Returns:

  • A 2D complex-valued array of shape (n_visibilities, n_source_pixels) that maps source-plane basis

  • functions directly to the visibilities.