RIMEScan#

class pyvisgen.simulation.scan.RIMEScan(ft, mode, obs, lm, rd, eps=1e-08)[source]#

Bases: object

Apply the Radio Interferometry Measurement Equation (RIME) to sky images.

This class handles the calculation of visibilities from sky images using either direct Fourier transforms or Non-Uniform Fast Fourier Transforms (FINUFFT). Depending on the observation settings it also applies telescope beam effects or feed rotation.

Parameters:
ftstr

Fourier transform method to use (‘default’, ‘reversed’, or ‘finufft’).

modestr

Observation mode, can be ‘full’, ‘grid’ or ‘dense’. Dense is only suitable for debugging and disables feed rotation calculation.

obsObservation

Observation class object containing observation parameters such as the source position.

lmTensor

Direction cosines (l, m) grid for the field of view.

rdTensor

Right ascension and declination grid corresponding to the field of view.

epsfloat, optional

Tolerance for the cuFINUFFT. Default: 1e-8.

Methods Summary

__call__(img, bas, spw_low, spw_high)

Process the input sky image to produce visibilities.

default(X1, X2, bas, spw_low, spw_high)

Evaluate default the RIME Jones chain.

finufft(X1, X2, bas, spw_low, spw_high)

Evaluate RIME using cuFINUFFT.

reversed(X1, X2, bas, spw_low, spw_high)

Compute the default RIME Jones chain in reversed order.

Methods Documentation

__call__(img: Tensor, bas, spw_low: Tensor, spw_high: Tensor) Tensor[source]#

Process the input sky image to produce visibilities.

Parameters:
imgTensor

Input sky image tensor.

basValidBaselineSubset

Subset of valid baselines containing uvw coordinates.

spw_lowTensor

Lower spectral window frequencies/wavelengths.

spw_highTensor

Higher spectral window frequencies/wavelengths.

Returns:
Tensor

Calculated complex visibilities for the given baselines.

default(X1: Tensor, X2: Tensor, bas: Tensor, spw_low: Tensor, spw_high: Tensor) Tensor[source]#

Evaluate default the RIME Jones chain.

Calculates direct Fourier kernels, applies feed rotation and beam effects, and integrates over the image.

Parameters:
X1Tensor

Sky tensor for the lower spectral window.

X2Tensor

Sky tensor for the higher spectral window.

basValidBaselineSubset

Subset of valid baselines containing uvw coordinates.

spw_lowTensor

Lower spectral window frequencies/wavelengths.

spw_highTensor

Higher spectral window frequencies/wavelengths.

Returns:
Tensor

Visibilities calculated with the default RIME Jones chain.

finufft(X1: Tensor, X2: Tensor, bas: Tensor, spw_low: Tensor, spw_high: Tensor) Tensor[source]#

Evaluate RIME using cuFINUFFT.

Utilizes GPU-accelerated non-uniform FFTs for faster visibility computation.

Parameters:
X1Tensor

Sky tensor for the lower spectral window.

X2Tensor

Sky tensor for the higher spectral window.

basValidBaselineSubset

Subset of valid baselines containing uvw coordinates.

spw_lowTensor

Lower spectral window frequencies/wavelengths.

spw_highTensor

Higher spectral window frequencies/wavelengths.

Returns:
Tensor

Visibilities computed with cuFINUFFT.

Raises:
RuntimeError

If cuFINUFFT package is not successfully loaded or available.

reversed(X1: Tensor, X2: Tensor, bas: Tensor, spw_low: Tensor, spw_high: Tensor) Tensor[source]#

Compute the default RIME Jones chain in reversed order.

Applies feed rotation and primary beam effects before calculating Fourier kernels and integrating.

Parameters:
X1Tensor

Sky tensor for the lower spectral window.

X2Tensor

Sky tensor for the higher spectral window.

basValidBaselineSubset

Subset of valid baselines containing uvw coordinates.

spw_lowTensor

Lower spectral window frequencies/wavelengths.

spw_highTensor

Higher spectral window frequencies/wavelengths.

Returns:
Tensor

Visibilities calculated with the reversed RIME Jones chain.