RIMEScan#
- class pyvisgen.simulation.RIMEScan(ft, mode, obs, lm, rd, eps=1e-08)[source]#
Bases:
objectApply 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.
- obs
Observation Observation class object containing observation parameters such as the source position.
- lm
Tensor Direction cosines (l, m) grid for the field of view.
- rd
Tensor 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:
- img
Tensor Input sky image tensor.
- bas
ValidBaselineSubset Subset of valid baselines containing uvw coordinates.
- spw_low
Tensor Lower spectral window frequencies/wavelengths.
- spw_high
Tensor Higher spectral window frequencies/wavelengths.
- img
- Returns:
TensorCalculated 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:
- X1
Tensor Sky tensor for the lower spectral window.
- X2
Tensor Sky tensor for the higher spectral window.
- bas
ValidBaselineSubset Subset of valid baselines containing uvw coordinates.
- spw_low
Tensor Lower spectral window frequencies/wavelengths.
- spw_high
Tensor Higher spectral window frequencies/wavelengths.
- X1
- Returns:
TensorVisibilities 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:
- X1
Tensor Sky tensor for the lower spectral window.
- X2
Tensor Sky tensor for the higher spectral window.
- bas
ValidBaselineSubset Subset of valid baselines containing uvw coordinates.
- spw_low
Tensor Lower spectral window frequencies/wavelengths.
- spw_high
Tensor Higher spectral window frequencies/wavelengths.
- X1
- Returns:
TensorVisibilities 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:
- X1
Tensor Sky tensor for the lower spectral window.
- X2
Tensor Sky tensor for the higher spectral window.
- bas
ValidBaselineSubset Subset of valid baselines containing uvw coordinates.
- spw_low
Tensor Lower spectral window frequencies/wavelengths.
- spw_high
Tensor Higher spectral window frequencies/wavelengths.
- X1
- Returns:
TensorVisibilities calculated with the reversed RIME Jones chain.