sirius.dio
¶
-
make_time_xda
(time_start='2019-10-03T19:00:00.000', time_delta=3600, n_samples=10, n_chunks=4)[source]¶ Create a time series xarray array. :param ——-: :param time_xda: :type time_xda: xarray.DataArray
-
make_chan_xda
(spw_name='sband', freq_start=3 * 10 ** 9, freq_delta=0.4 * 10 ** 9, freq_resolution=0.01 * 10 ** 9, n_channels=3, n_chunks=3)[source]¶ Create a channel frequencies xarray array. :param ——-: :param chan_xda: :type chan_xda: xarray.DataArray
-
write_to_ms_daskms
(vis_xds, time_xda, chan_xda, pol, tel_xds, phase_center_names, phase_center_ra_dec, auto_corr, save_parms)[source]¶ Write out a MeasurementSet to disk using dask-ms
- Parameters
vis_xds (xarray.Dataset) –
time_xda (xarray.DataArray) –
chan_xda (xarray.DataArray) –
pol (list) –
tel_xds (xarray.Dataset) –
phase_center_names (numpy.array) –
phase_center_ra_dec (numpy.array) –
auto_corr (bool) –
save_parms (dict) –
------- –
xarray.Dataset –
-
write_to_ms_daskms_and_sim_tool
(vis_xds, time_xda, chan_xda, pol, tel_xds, phase_center_names, phase_center_ra_dec, auto_corr, save_parms)[source]¶ Write out a MeasurementSet to disk using dask-ms
This first implementation is kept only temporarily, until performance comparisons are completed.
-
read_zarr
(infile, sel_xds=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
sel_xds (string or list) – Select the ddi to open, for example [‘xds0’,’xds1’] will open the first two ddi. 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.
- Returns
New xarray Dataset of Visibility data contents
- Return type
xarray.core.dataset.Dataset
-
write_zarr
(mxds, outfile, chunks_on_disk=None, partition=None, consolidated=True, compressor=None, overwrite=True, graph_name='write_zarr')[source]¶ Write xarray dataset to zarr format on disk. When chunks_on_disk is not specified the chunking in the input dataset is used. When chunks_on_disk is specified that dataset is saved using that chunking.
- Parameters
mxds (xarray.core.dataset.Dataset) – Dataset of dataset to write to disk
outfile (str) – outfile filename, generally ends in .zarr
chunks_on_disk (dict of int) – A dictionary with the chunk size that will be used when writing to disk. For example {‘time’: 20, ‘chan’: 6}. If chunks_on_disk is not specified the chunking of dataset will be used.
partition (str or list) – Name of partition xds to write into outfile (from the mxds attributes section). Overwrites existing partition of same name. Default None writes entire mxds
compressor (numcodecs.blosc.Blosc) – The blosc compressor to use when saving the converted data to disk using zarr. If None the zstd compression algorithm used with compression level 2.
graph_name (string) – The time taken to execute the graph and save the dataset is measured and saved as an attribute in the zarr file. The graph_name is the label for this timing information.