invert

ska_sdp_func_python.xradio.imaging.invert(xds: Dataset, backend: InvertBackend, *, num_pixels_l: int, num_pixels_m: int, pixel_size_radians: float) Dataset

Invert an xradio visibility dataset into a dirty image cube, using one of the supported invert backends/gridders. The time and frequency resolution of the output image cube, as well as the distribution pattern, are controlled by the chunking of the input dataset. See notes at the end.

Warning

This function is experimental and its interface may change.

Parameters:
  • xds – Input xradio visibility Dataset.

  • backend

    Configuration options for the invert backend to use, e.g. pass a DuccInvert instance to use DUCC. Supported backends:

    • DUCC

    • W-towers. ska-sdp-func must be installed. Restrictions: square images only, requires visibilities with uniformly spaced frequency channels.

  • num_pixels_l – Number of pixels in the l direction (east-west). Must be an even number.

  • num_pixels_m – Number of pixels in the m direction (north-south). Must be an even number.

  • pixel_size_radians – The size of a pixel in radians at the centre of the field of view.

Returns:

The resulting dirty image cube as an Image xarray Dataset.

Note

  • The output image has a number of time and frequency channels equal to the number of time and frequency chunks of the input dataset. Polarization channels are always imaged separately, regardless of chunking.

  • This function uses xarray.map_blocks() under the hood, and generates one task per (time, frequency, polarization) chunk.

  • Chunking along the baseline_id dimension is not allowed (yet), as it would require dealing with groups of baselines in the Image data model.

  • Natural weighting is used; support for other weighting modes will be added later.