Public API Documentation
This section lists the functions implemented, using the same interface as DUCC/nifty gridder, by Martin Reinecke.
Note
Only square images are supported at the moment, so, pixsize_x_rad and pixsize_y_rad must be equal, and npix_x and npix_y must be equal.
Functions
- cuda_nifty_gridder.ms2dirty(uvw, freq, ms, weight, npix_x, npix_y, pixsize_x_rad, pixsize_y_rad, epsilon, do_wstacking=True)[source]
Converts visibilities to a dirty image.
- Parameters
uvw (numpy.array((nrows, 3), dtype=numpy.float32 or numpy.float64)) – (u,v,w) coordinates.
freq (numpy.array((nchan,))) – Channel frequencies.
ms (numpy.array((nrows, nchan), dtype=numpy.complex64 or numpy.complex128)) – The input measurement set data. Its data type determines the precision used for the gridding.
weight (numpy.array((nrows, nchan), same precision as ms), optional) – If present, its values are used to multiply the input.
npix_x (int) – x dimension of the dirty image (see Note above).
npix_y (int) – y dimension of the dirty image (see Note above).
pixsize_x_rad (float) – Angular x pixel size (in radians) of the dirty image (see Note above).
pixsize_y_rad (float) – Angular y pixel size (in radians) of the dirty image (see Note above).
epsilon (float) – Accuracy at which the computation should be done. Must be larger than 2e-13. If ms has type numpy.complex64, it must be larger than 1e-5.
do_wstacking (bool) – If True, the full improved w-stacking algorithm is carried out, otherwise the w values are assumed to be zero.
- Returns
The dirty image.
- Return type
numpy.array((nxdirty, nydirty), dtype=float of same precision as ms)
- cuda_nifty_gridder.dirty2ms(uvw, freq, dirty, weight, pixsize_x_rad, pixsize_y_rad, epsilon, do_wstacking=True)[source]
Converts a dirty image to visibilities.
- Parameters
uvw (numpy.array((nrows, 3), dtype=numpy.float32 or numpy.float64)) – (u,v,w) coordinates.
freq (numpy.array((nchan,))) – Channel frequencies.
dirty (numpy.array((npix_x, npix_y), dtype=numpy.float32 or numpy.float64)) – The dirty image. Its data type determines the precision used for the degridding.
weight (numpy.array((nrows, nchan), same precision as dirty), optional) – If present, its values are used to multiply the input.
pixsize_x_rad (float) – Angular x pixel size (in radians) of the dirty image (see Note above).
pixsize_y_rad (float) – Angular y pixel size (in radians) of the dirty image (see Note above).
epsilon (float) – Accuracy at which the computation should be done. Must be larger than 2e-13. If dirty has type numpy.float32, it must be larger than 1e-5.
do_wstacking (bool) – If True, the full improved w-stacking algorithm is carried out, otherwise the w values are assumed to be zero.
- Returns
The visibility data.
- Return type
numpy.array((nrows, nchan), dtype=complex of same precision as dirty)