cngi¶
CNGI Package
Module functions with blank descriptions have not been completed yet. As each function is completed, its description will be populated.
conversion¶
Legacy CASA uses a custom MS format while CNGI uses the standard Zarr format. These functions allow conversion between the two as well as directly from the telescope archival science data model (ASDM) (future growth). Note that both the MS and Zarr formats are directories, not single files.
This package has a dependency on legacy CASA / casacore and will be separated in the future to its own distribution apart from the rest of the CNGI package.
To access these functions, use your favorite variation of:
import cngi.conversion
Convert legacy CASA or FITS format Image to xarray Image Dataset and zarr storage format |
|
Convert legacy format MS to xarray Visibility Dataset and zarr storage format |
|
Convert casacore table format to xarray Dataset and zarr storage format. |
|
Summarize the contents of an MS directory in casacore table format |
|
Read legacy format MS to xarray Visibility Dataset |
|
Read generic casacore table format to xarray Dataset |
dio¶
Most CNGI functions operate on xarray Datasets while the data is stored on disk in Zarr format. These functions allow the transition back and forth between the two.
To access these functions, use your favorite variation of:
import cngi.dio
Append a list of dask arrays to a zarr file on disk. If a data variable with the same name is found it will be overwritten. |
|
Summarize the contents of a zarr format Visibility directory on disk |
|
Read xarray zarr format image from disk |
|
Read zarr format Visibility data from disk to xarray Dataset |
|
Write image xarray dataset to zarr format on disk. When chunks_on_disk is not specified the chunking in the input dataset is used. |
|
Write xarray dataset to zarr format on disk. When chunks_on_disk is not specified the chunking in the input dataset is used. |
direct¶
These functions allow direct access to the underlying Dask processing engine.
To access these functions, use your favorite variation of:
import cngi.direct
Initialize the CNGI framework |
|
Return the CNGI framework scheduler client |
image¶
These functions examine or manipulate Image data in the xarray Dataset (xds) format. They take an xds as input and return a new xds or some other structure as output. Some may operate directly on the zarr data store on disk.
The input xarray Dataset is never modified.
To access these functions, use your favorite variation of:
import cngi.image
Continuum subtraction of an image cube |
|
Fit one or more elliptical gaussian components on an image region |
|
Fit one or more elliptical gaussian components on an image region |
|
Construct a gaussian beam of image dimensions from specified size or beam attribute |
|
Plot a preview of Image xarray DataArray contents |
|
Create a new mask Data variable in the Dataset |
|
Collapse an n-dimensional image cube into a moment by taking a linear combination of individual planes |
|
Rebin an n-dimensional image across any single (spatial or spectral) axis |
|
Change the velocity system of an image |
|
Create a new region Data variable in the Dataset |
|
Smooth data along the spatial plane of the image cube. |
|
Perform gaussian spectral line fits in the image cube |
|
Generate statistics on specified image data contents |
|
Convert polarization data from Stokes parameters to the correlation basis. |
vis¶
These functions examine or manipulate Visibility data in the xarray Dataset (xds) format. They take an xds as input and return a new xds or some other structure as output. Some may operate directly on the zarr data store on disk.
The input xarray Dataset is never modified.
To access these functions, use your favorite variation of:
import cngi.vis
Apply flag variables to other data in Visibility Dataset |
|
Average data across the channel axis |
|
Apply a smoothing kernel to the channel axis |
|
Join together two visibility zarr directories. |
|
Concatenate together two Visibility xds’s of compatible shape from the same mxds |
|
Transform channel labels and visibilities to a spectral reference frame which is appropriate for analysis, e.g. from TOPO to LSRK or to correct for doppler shifts throughout the time of observation |
|
Pull the xds visibilites out with the mxds, preserving only that information in the subtables that is related to the given visibilities. |
|
Average data across the time axis |
|
Fit a polynomial regression to source data and return model values to target |
|
Plot a preview of Visibility xarray DataArray contents |