API Reference

radio_dreams.interferometer.read_layout([…])

Read array layout from txt file.

radio_dreams.interferometer.enh_xyz

Convert from local E, N, H to X, Y, Z coordinates.

radio_dreams.interferometer.xyz_uvw

Convert local XYZ to UVU coordinates.

radio_dreams.interferometer.gauss_kernel

Create 2D gaussian kernel.

radio_dreams.interferometer.uv_degrid

Degrid continuous uv baselines onto regular uv grid.

Imaginary Interferometers.

radio_dreams.interferometer.read_layout(layout_path=None)

Read array layout from txt file.

Antenna positions are defined with respect to the array centre.

E - East of the center in metres N - North of center in metres H - Height above sea level in metres

Parameters

layout_path (str) – Path to file with array layout in E, N, H columns

Returns

Array of shape [3, n], for E, N, H respectively

Return type

ndarray

radio_dreams.interferometer.enh_xyz()

Convert from local E, N, H to X, Y, Z coordinates.

Antenna positions are defined with respect to the array centre.

E - East of the center in metres N - North of center in metres H - Height above sea level in metres

Convert these coordinates to a Earth Centered Earth Fixed (ECEF) cartesian system with axes pointing towards

X - (h = 0, δ = 0) Y - (h = -6, δ = 0) Z - (δ = 90)

h - hour angle δ - declination

Parameters
Returns

Array of shape [3, n], for X, Y, Z respectively

Return type

ndarray

radio_dreams.interferometer.xyz_uvw()

Convert local XYZ to UVU coordinates.

U, V, W are coordinates used to represent interferometric baselines

\[\begin{split}\begin{bmatrix} u \\ v \\ w \end{bmatrix} = \begin{bmatrix} \sin(H_0) & \cos(H_0) & 0 \\ -\sin(\delta_0)\cos(H_0) & \sin(\delta_0)\sin(H_0) & \cos(\delta_0) \\ \cos(\delta_0)\cos(H_0) & -\cos(\delta_0)\sin(H_0) & \sin(\delta_0) \end{bmatrix} \begin{bmatrix} X_\lambda \\ Y_\lambda \\ Z_\lambda \end{bmatrix},\end{split}\]
Parameters
  • xyz (ndarray) – object from enh_xyz()

  • freq (float) – 1D of frequencies in Hz

  • dec0 (float) – Declination of phase centre in radians

  • ha0 (float) – Hour Angle of phase centre in radians

Returns

UVW cube, with 0 axis for frequency and 1, 2 for UVWs

Return type

ndarray

radio_dreams.interferometer.gauss_kernel()

Create 2D gaussian kernel.

Parameters
  • sigma (float) – Standard deviation of gaussian kernel

  • kersize (float) – Kernel size in pixels. Must be odd number for symmetry

Returns

2D gaussian kernal

Return type

ndarray

radio_dreams.interferometer.uv_degrid()

Degrid continuous uv baselines onto regular uv grid.

Parameters
  • max_lambda (int) – Maximum baseline to evaluate, defaults to [1400]

  • nside (int) – Number of pixels per side, defaults to [511]

  • uvw (ndarray) – UVW array object from xyz_uvw()

  • sigma (float) – Standard deviation of gaussian kernel, defaults to [3]

  • kernel (str) – Kernel size in pixel, Must be odd number for symmetry, defaults to [21]

  • kernel – Kernel type, gaussian or None, defaults to [“gaussian”]

Returns

UV grid of size [nside, nside]

Return type

ndarray

radio_dreams.interferometer.radec_lmn()

Calculate LMN direction cosines from Ra/Dec with respect to a phase center.

\begin{eqnarray} & l =& \, \cos \, \delta \sin \, \Delta \alpha \\ & m =& \, \sin \, \delta \cos \, \delta 0 - \cos \delta \sin \delta 0 \cos \Delta \alpha \\ & n =& \, \sin \, \delta \sin \, \delta 0 + \cos \delta \cos \delta 0 \cos \Delta \alpha \\ & =& \, \sqrt{1 - l^2 - m^2} - 1 \end{eqnarray}

Here \(\Delta \alpha = \alpha - \alpha 0\) is the difference between the Right Ascension of each coordinate and the phase centre and \(\delta 0\) is the Declination of the phase centre.

Parameters
  • ra (ndarray) – Right ascension in radians

  • dec (ndarray) – Declination in radians

  • ra0 (float) – Right ascension of phase centre in radians

  • dec0 (float) – Declination of phase centre in radians

Returns

lmn direction cosines of shape (3, n)

Return type

ndarray