healpix_convert.generate_pyramids#
- healpix_convert.generate_pyramids(cache, settings, output_path, *, output_storage_options=None)[source]#
Aggregate the converted data onto the coarser HEALPix refinement levels of the pyramids.
Run it once the data has been converted. It writes the arrays of the derived level groups that
prepare_healpix_dataset()has created, one group per derived refinement level of each multiscale group with pyramid settings (pyramid_groups, seemultiscale_settings). It does nothing if no group has pyramid settings.The derived levels written here are not in the consolidated Zarr metadata of the output dataset:
finalize_healpix_dataset(), the last stage of the conversion, writes it.- Parameters:
cache (
ConvertStagingCache) – A data cache containing information extracted from the input dataset(s) and/or pre-computed for the output dataset, as returned bycreate_staging_cache()for the samesettings.output_path (
str) – Path to the converted HEALPix output Zarr dataset, updated in place.output_storage_options (
dict, optional) – Storage options passed to Zarr for reading the converted dataset and writing the pyramids (useful for, e.g., writing on S3 object store).
- Returns:
xarray.DataTree– The output Zarr dataset with the pyramids, returned as an Xarray DataTree object.