GridData

class ska_sdp_datamodels.gridded_visibility.GridData(data_vars=None, coords=None, attrs=None)[source]

Bases: Dataset

Class to hold Gridded data for Fourier processing

  • Has four or more coordinates: [chan, pol, z, y, x]

    where x can be u, l; y can be v, m; z can be w, n. Note: current implementation only uses 4 coordinates: [nchan, npol, v, u]

The conventions for indexing in WCS and numpy are opposite:

  • In astropy.wcs, the order is

    (longitude, latitude, polarisation, frequency);

  • in numpy, the order is

    (frequency, polarisation, depth, latitude, longitude).

Warning

The polarisation_frame is kept in two places, the WCS and the polarisation_frame variable. The latter should be considered definitive.

Here is an example:

<xarray.GridData>
Dimensions:       (frequency: 3, polarisation: 4, v: 256, u: 256)
Coordinates:
  * frequency     (frequency) float64 1e+08 1.01e+08 1.02e+08
  * polarisation  (polarisation) <U1 'I' 'Q' 'U' 'V'
  * v             (v) float64 -3.333e+04 -3.307e+04 ...  3.307e+04
  * u             (u) float64 3.333e+04 3.307e+04 ...  -3.307e+04
Data variables:
    pixels        (frequency, polarisation, v, u)
                    complex128 0j 0j 0j ... 0j 0j
Attributes:
    data_model:           GridData
    _polarisation_frame:  stokesIQUV

Methods Summary

constructor(data[, polarisation_frame, grid_wcs])

Create a GridData

Methods Documentation

classmethod constructor(data, polarisation_frame=None, grid_wcs=None)[source]

Create a GridData

Parameters:
  • data – pixel data array; dims: [“frequency”, “polarisation”, “v”, “u”]

  • polarisation_frame – PolarisationFrame object

  • grid_wcs – astropy WCS object

Returns:

GridData