cngi.dio.read_vis
¶
-
read_vis
(infile, partition=None, chunks=None, consolidated=True, overwrite_encoded_chunks=True, **kwargs)[source]¶ Read zarr format Visibility data from disk to xarray Dataset
- Parameters
infile (str) – input Visibility filename
partition (string or list) – name of partition(s) to read as returned by describe_vis. Multiple partitions in list form will return a master dataset of datasets. Use ‘global’ for global metadata. Default None returns everything
chunks (dict) – sets specified chunk size per dimension. Dict is in the form of ‘dim’:chunk_size, for example {‘time’:100, ‘baseline’:400, ‘chan’:32, ‘pol’:1}. Default None uses the original zarr chunking.
consolidated (bool) – use zarr consolidated metadata capability. Only works for stores that have already been consolidated. Default True works with datasets produced by convert_ms which automatically consolidates metadata.
overwrite_encoded_chunks (bool) – drop the zarr chunks encoded for each variable when a dataset is loaded with specified chunk sizes. Default True, only applies when chunks is not None.
s3_key (string, optional) – optional support for explicit authentication if infile is provided as S3 URL. If S3 url is passed as input but this argument is not specified then only publicly-available, read-only buckets are accessible (so output dataset will be read-only).
s3_secret (string, optional) – optional support for explicit authentication if infile is provided as S3 URL. If S3 url is passed as input but this argument is not specified then only publicly-available, read-only buckets are accessible (so output dataset will be read-only).
- Returns
New xarray Dataset of Visibility data contents
- Return type
xarray.core.dataset.Dataset