W-stacking with w-towers functions

These functions wrap the gridding kernel functions described on the page W-tower gridder kernel functions. They provide a convenient way to call the w-towers gridder, where sub-grids are handled internally.

Some notes on the parameters passed to these functions:

  • The spacing (in wavelengths) between small w-layers within each tower is given by the w_step parameter, while the spacing between the large w-layers used for w-stacking is given by w_tower_height multiplied by w_step.

  • The oversampling factors oversampling and w_oversampling, which are used to tabulate the convolution kernels, should be large enough. Values of 16384 for both are sensible.

  • The kernel support sizes support and w_support should be even. Values of 8 or 10 for both are sensible.

  • The fraction of the sub-grid that should actually be used for (de)gridding is given by the subgrid_frac parameter, which should typically be set to 2/3 (or 0.66). The remaining 1/3 is the border, which will overlap with neighbouring sub-grids.

C/C++

void sdp_grid_wstack_wtower_degrid_all(const sdp_Mem *image, sdp_GridProjection proj, double freq0_hz, double dfreq_hz, const sdp_Mem *uvw, int subgrid_size, int support, int oversampling, int w_support, int w_oversampling, double subgrid_frac, int w_tower_height, int verbosity, sdp_Mem *vis, int num_threads, sdp_Error *status)

Degrid visibilities using w-stacking with w-towers.

Parameters:
  • image – Image to degrid from.

  • proj – Image grid projection to assume.

  • freq0_hz – Frequency of first channel (Hz).

  • dfreq_hz – Channel separation (Hz).

  • uvwfloat[uvw_count, 3] UVW coordinates of visibilities (in m).

  • subgrid_size – Sub-grid size in pixels.

  • support – Kernel support size in (u, v).

  • oversampling – Oversampling factor for uv-kernel.

  • w_support – Support size in w.

  • w_oversampling – Oversampling factor for w-kernel.

  • subgrid_frac – Fraction of subgrid size that should be used.

  • w_tower_height – Height of w-tower to use.

  • verbosity – Verbosity level.

  • viscomplex[uvw_count, ch_count] Output degridded visibilities.

  • num_threads – The number of CPU threads to use. Automatic if <= 0.

  • status – Error status.

void sdp_grid_wstack_wtower_grid_all(const sdp_Mem *vis, double freq0_hz, double dfreq_hz, const sdp_Mem *uvw, sdp_GridProjection proj, int subgrid_size, int support, int oversampling, int w_support, int w_oversampling, double subgrid_frac, int w_tower_height, int verbosity, sdp_Mem *image, int num_threads, sdp_Error *status)

Grid visibilities using w-stacking with w-towers.

Parameters:
  • viscomplex[uvw_count, ch_count] Input visibilities.

  • freq0_hz – Frequency of first channel (Hz).

  • dfreq_hz – Channel separation (Hz).

  • uvwfloat[uvw_count, 3] UVW coordinates of visibilities (in m).

  • proj – Image grid projection to assume.

  • subgrid_size – Sub-grid size in pixels.

  • support – Kernel support size in (u, v).

  • oversampling – Oversampling factor for uv-kernel.

  • w_support – Support size in w.

  • w_oversampling – Oversampling factor for w-kernel.

  • subgrid_frac – Fraction of subgrid size that should be used.

  • w_tower_height – Height of w-tower to use.

  • verbosity – Verbosity level.

  • image – Output image.

  • num_threads – The number of CPU threads to use. Automatic if <= 0.

  • status – Error status.

Python

ska_sdp_func.grid_data.wstack_wtower_degrid_all(image: ndarray, proj: GridProjection, freq0_hz: float, dfreq_hz: float, uvw: ndarray, subgrid_size: int, support: int, oversampling: int, w_support: int, w_oversampling: int, subgrid_frac: float, w_tower_height: float, verbosity: int, vis: ndarray, num_threads: int | None = None)

Degrid visibilities using w-stacking with w-towers.

Parameters:
  • image – Image to degrid from.

  • proj – Image grid projection to assume.

  • freq0_hz – Frequency of first channel (Hz).

  • dfreq_hz – Channel separation (Hz).

  • uvwfloat[uvw_count, 3] UVW coordinates of visibilities (in m).

  • subgrid_size – Sub-grid size in pixels.

  • support – Kernel support size in (u, v).

  • oversampling – Oversampling factor for uv-kernel.

  • w_support – Support size in w.

  • w_oversampling – Oversampling factor for w-kernel.

  • subgrid_frac – Fraction of subgrid size that should be used.

  • w_tower_height – Height of w-tower to use.

  • verbosity – Verbosity level.

  • viscomplex[uvw_count, ch_count] Output degridded visibilities.

  • num_threads – Number of threads to use. If 0 or None, all available threads will be used.

ska_sdp_func.grid_data.wstack_wtower_grid_all(vis: ndarray, freq0_hz: float, dfreq_hz: float, uvw: ndarray, proj: GridProjection, subgrid_size: int, support: int, oversampling: int, w_support: int, w_oversampling: int, subgrid_frac: float, w_tower_height: float, verbosity: int, image: ndarray, num_threads: int | None = None)

Grid visibilities using w-stacking with w-towers.

Parameters:
  • viscomplex[uvw_count, ch_count] Input visibilities.

  • freq0_hz – Frequency of first channel (Hz).

  • dfreq_hz – Channel separation (Hz).

  • uvwfloat[uvw_count, 3] UVW coordinates of visibilities (in m).

  • proj – Image grid projection to assume.

  • subgrid_size – Sub-grid size in pixels.

  • support – Kernel support size in (u, v).

  • oversampling – Oversampling factor for uv-kernel.

  • w_support – Support size in w.

  • w_oversampling – Oversampling factor for w-kernel.

  • subgrid_frac – Fraction of subgrid size that should be used.

  • w_tower_height – Height of w-tower to use.

  • verbosity – Verbosity level.

  • image – Output image.

  • num_threads – Number of threads to use. If 0 or None, all available threads will be used.