No project description provided
Project description
hipscatalog-gen
This project was created following the LINCC Frameworks Python Project Template (https://lincc-ppt.readthedocs.io/en/latest/).
Overview
hipscatalog-gen is a Python package for building HiPS-compliant catalog hierarchies from large astronomical tables using Dask and LSDB. It is inspired by and extends the logic of the CDS Hipsgen-cat.jar tool, providing a scalable and parallelized Python implementation suitable for large-scale workflows. Documentation: https://linea-it.github.io/hipscatalog_gen/
The pipeline supports three selection modes, configured in the YAML file under algorithm.selection_mode:
- mag_global — global magnitude-complete selection.
- score_global — global selection driven by an arbitrary score/expression.
- score_density_hybrid — density-driven depths 1–3 with score-based distribution afterwards.
Quick Start
Recommended (conda + Python 3.13):
git clone https://github.com/linea-it/hipscatalog_gen.git
cd hipscatalog_gen
conda create -n hipscatalog-gen python=3.13
conda activate hipscatalog-gen
pip install -e .[dev]
Then run:
python -m hipscatalog_gen.cli --config config.yaml
Environment Setup (conda)
Create an isolated environment (example with Python 3.13), then install inside it:
conda create -n hipscatalog-gen python=3.13
conda activate hipscatalog-gen
pip install -e .[dev]
Optionally expose the env as a Jupyter kernel:
python -m ipykernel install --user --name hipscatalog-gen --display-name "hipscatalog-gen"
Configuration
The pipeline is fully configured through a YAML file.
A complete annotated template is provided in ./examples/configs folder as:
- config.template.yaml
To create your own configuration:
cp config.template.yaml config.yaml
Then edit config.yaml to match your input catalog and selection preferences. Additional examples are available under ./examples/configs/.
Selection modes live under algorithm.selection_mode:
mag_global,score_global,score_density_hybrid. Mode-specific parameters live inside blocksalgorithm.mag_global,algorithm.score_global, andalgorithm.score_density_hybrid(with optional shared defaults inalgorithm.selection_defaults).
Running
The pipeline can be executed either as a Python library or from the command line.
Run as a library
from hipscatalog_gen.config import load_config, load_config_from_dict, display_available_configs
from hipscatalog_gen.pipeline.main import run_pipeline
cfg = load_config("config.yaml")
run_pipeline(cfg)
Run from the command line
List available selection modes:
python -m hipscatalog_gen.cli --list-modes
Run with a config file:
python -m hipscatalog_gen.cli --config config.yaml
Validate a config without running:
python -m hipscatalog_gen.cli --check-config config.yaml
Enable JSON logs (process.jsonl) via CLI flag (when running the pipeline):
python -m hipscatalog_gen.cli --config config.yaml --json-logs
Summarize an existing telemetry.json:
python -m hipscatalog_gen.cli --telemetry /path/to/telemetry.json
Output Structure
Each run generates a HiPS-compliant directory structure under output.out_dir:
- Norder*/Dir*/Npix*.tsv → Per-depth tiles.
- Norder*/Allsky.tsv → Optional all-sky tables.
- densmap_o.fits → Density maps for all depths up to level_limit.
- Moc.fits / Moc.json → Multi-Order Coverage maps.
- properties / metadata.xml → HiPS metadata descriptors.
- process.log / arguments → Run logs and configuration snapshot (optional process.jsonl when
--json-logs). - telemetry.json → Run summary with per-stage durations and input/output counts.
- Existing
output.out_dircauses an error; setoutput.overwrite: trueto clear it before writing.
Mode Summary
- mag_global: magnitude-complete slices across all depths.
- score_global: score-based slices across all depths.
- score_density_hybrid: density-driven tiles for depths 1–3, then score slices for deeper levels.
- Ordering and ties:
order_desccontrols ascending/descending (default ascending); optionaltie_columnbreaks ties before falling back to RA/DEC. - Invalids:
keep_invalid_values(per mode or inselection_defaults) can map NaN/Inf to a sentinel whenadaptive_range=complete, sending them to the last slice; rejected forhist_peak.
Development and Contributing
This project follows the LINCC Frameworks Python Project Template.
To set up a development environment:
pip install -e .[dev]
pre-commit install
pytest
Contributions, bug reports, and pull requests are welcome via GitHub Issues: https://github.com/linea-it/hipscatalog_gen/issues
Acknowledgments
This project acknowledges the foundational work of the CDS HiPS Catalog Tool (Hipsgen-cat.jar) developed by the Strasbourg Astronomical Data Center (Unistra/CNRS, 2016), which inspired aspects of the software design. More information: https://aladin.cds.unistra.fr/hips/HipsCat.gml.
The mag-global mode builds on an idea originally suggested by Julia Gschwend.
Citation
If you use this package in your research, please cite:
Silva, L. L. C., et al. (2025). hipscatalog-gen: A Python HiPS Catalog Pipeline. LIneA – Laboratório Interinstitucional de e-Astronomia. Available at: https://github.com/linea-it/hipscatalog_gen
License
This project is licensed under the MIT License. See the LICENSE file for details.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file hipscatalog_gen-0.1.0.tar.gz.
File metadata
- Download URL: hipscatalog_gen-0.1.0.tar.gz
- Upload date:
- Size: 65.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0e3bbba77050c052268c075b1120c7e3f8d6679ca0f562996327afa068af8ccc
|
|
| MD5 |
2ff2edf6feab969c49a44a0298c2640f
|
|
| BLAKE2b-256 |
dd0bc1a83afe585c8cb01c1dd9bcdcc8d009c76725dcd4b610a67c03af85f4cd
|
Provenance
The following attestation bundles were made for hipscatalog_gen-0.1.0.tar.gz:
Publisher:
publish-to-pypi.yml on linea-it/hipscatalog_gen
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
hipscatalog_gen-0.1.0.tar.gz -
Subject digest:
0e3bbba77050c052268c075b1120c7e3f8d6679ca0f562996327afa068af8ccc - Sigstore transparency entry: 782522108
- Sigstore integration time:
-
Permalink:
linea-it/hipscatalog_gen@c9e3d0074fad5675490478490123d854f6933230 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/linea-it
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@c9e3d0074fad5675490478490123d854f6933230 -
Trigger Event:
release
-
Statement type:
File details
Details for the file hipscatalog_gen-0.1.0-py3-none-any.whl.
File metadata
- Download URL: hipscatalog_gen-0.1.0-py3-none-any.whl
- Upload date:
- Size: 70.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
975131c08b1941126c6681d8338e6034db5be936f22491c9e86dbaded4c06ae8
|
|
| MD5 |
e1b100245e65408852e1367a40e073ae
|
|
| BLAKE2b-256 |
1c5df2ea1449ae051428d061f4bc4ab4de43fe8f19f428e8bae6cfad5df458d9
|
Provenance
The following attestation bundles were made for hipscatalog_gen-0.1.0-py3-none-any.whl:
Publisher:
publish-to-pypi.yml on linea-it/hipscatalog_gen
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
hipscatalog_gen-0.1.0-py3-none-any.whl -
Subject digest:
975131c08b1941126c6681d8338e6034db5be936f22491c9e86dbaded4c06ae8 - Sigstore transparency entry: 782522109
- Sigstore integration time:
-
Permalink:
linea-it/hipscatalog_gen@c9e3d0074fad5675490478490123d854f6933230 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/linea-it
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@c9e3d0074fad5675490478490123d854f6933230 -
Trigger Event:
release
-
Statement type: