healpix_convert.prepare_healpix_dataset#

healpix_convert.prepare_healpix_dataset(cache, settings, output_path, *, output_storage_options=None, dry_run=False)[source]#

Create a new Zarr dataset without any data resampled on the HEALPix grid (yet).

All output groups and arrays are created along with their metadata. Arrays having a HEALPix cell dimension are still empty.

The groups of the derived levels of the pyramids and the multiscales metadata describing them are created as well; their arrays are written by generate_pyramids().

Useful for multi-stage conversion workflows:

Parameters:
  • cache (ConvertStagingCache) – A data cache containing information extracted from the input dataset(s) and/or pre-computed for the output dataset, as returned by create_staging_cache().

  • settings (dict or object) – Healpix conversion settings.

  • output_path (str) – Path to the HEALPix output Zarr dataset.

  • output_storage_options (dict, optional) – Storage options passed to Zarr for the dataset creation (useful for, e.g., writing on S3 object store).

  • dry_run (bool, optional) – If True, only display what would have been done. The output dataset also won’t be written to a persistent storage but instead will be created in-memory. No data conversion will happen (convert_data set to False). Default: False.

Returns:

xarray.DataTree – The output Zarr dataset with HEALPix metadata and empty data, returned as an Xarray DataTree object.