healpix_convert.create_healpix_dataset#
- healpix_convert.create_healpix_dataset(input_paths, settings, output_path, *, groups=None, output_extent=None, output_storage_options=None, dry_run=False)[source]#
Create a new Zarr dataset with data resampled on the HEALPix grid.
- Parameters:
input_paths (
listofpaths) – Path(s) to the input Zarr dataset(s) to convert to HEALPix.output_path (
str) – Path to the HEALPix output Zarr dataset.groups (
strorlist, optional) – Groups (paths) in the input datasets to process. It can be either a string (single group or unix-like pattern) or a list of groups. By default, all groups found in input datasets are processed.output_extent (
dictorshapely.Polygon, optional) – Spatial extent of the output HEALPix dataset, given as a (GEOJSON-like or object) polygon with lat-lon coordinates. If not given (default), the spatial extent will be the union of the spatial extents of the input datasets (single polygon).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 data and/or metadata, returned as an Xarray DataTree object.
Notes
This function is meant for quick conversions of small inputs and for test cases. For production conversions of large datasets, prefer the staged API (
create_staging_cache(),prepare_healpix_dataset(),convert_group_to_healpix(),generate_pyramids()andfinalize_healpix_dataset()) and run the stages as the tasks of a workflow orchestration tool (Prefect, Airflow, Argo Workflows, etc.), which handles resource management, task failures and retries.