region

region(xds, name='region1', ra=None, dec=None, pixels=None, pol=-1, channels=-1)[source]

Create a new region Data variable in the Dataset

Note

This function currently only supports rectangles and integer pixel boundaries

Parameters
  • xds (xarray.core.dataset.Dataset) – input image dataset

  • name (str) – dataset variable name for region, overwrites if already present

  • ra (list) – right ascension coordinate range in the form of [min, max]. Default None means all

  • dec (list) – declination coordinate range in the form of [min, max]. Default None means all

  • pixels (array_like) – array of shape (N,2) containing pixel box. OR’d with ra/dec

  • pol (int or list) – polarization dimension(s) to include in region. Default of -1 means all

  • channels (int or list) – channel dimension(s) to include in region. Default of -1 means all

Returns

New Dataset

Return type

xarray.core.dataset.Dataset