Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

science_catalogs

science_catalogs is a reusable Python library for building science-ready catalogs with LSDB-oriented workflows. The package focuses on the reusable core of the processing stack:

  • column selection
  • column transformations
  • row filtering
  • output materialization to memory, partitioned files, or HATS catalogs

The package is published on PyPI as science-catalogs and imported in Python as science_catalogs.

Installation

pip install science-catalogs

For local development:

pip install -e '.[dev]'
pre-commit install --hook-type pre-commit --hook-type pre-push

The commit hook runs fast formatting, lint, and configuration checks. The pre-push hook runs the unit-test suite without coverage overhead. Run every commit-stage check on demand with pre-commit run --all-files; run the documentation build explicitly with pre-commit run --hook-stage manual sphinx-docs-build.

Or, if you prefer a requirements file for a full developer environment including build and PyPI publication tools:

pip install -r requirements-dev.txt

Main API

from science_catalogs import (
    build_catalog,
    materialize_catalog,
    materialize_lsdb_catalog,
    open_lsdb_catalog,
    prepare_catalog,
    write_catalog,
)

Beta API

The beta public API is:

  • prepare_catalog
  • materialize_catalog
  • write_catalog
  • materialize_lsdb_catalog
  • open_lsdb_catalog
  • build_catalog

Legacy names based on pipeline are not part of the beta API.

Usage

Command-line interface

Installing the package provides the science-catalogs command. The command executes the complete pipeline described by a YAML file and writes the resulting artifact:

science-catalogs CONFIG_PATH [OUTPUT_DIR] [--output-format {parquet,hats}]

Use the output configuration from the YAML:

science-catalogs examples/configs/lsst_dp1_cmodel_mag_dered.yml

Write to an explicit directory:

science-catalogs examples/configs/lsst_dp1_cmodel_mag_dered.yml ./output/dp1

Override the configured format and build a HATS collection:

science-catalogs examples/configs/lsst_dp1_to_hats.yml ./output/dp1_hats \
  --output-format hats

OUTPUT_DIR takes precedence over output.base_path. The CLI requires one of these destinations to be explicit, preventing large catalogs from accidentally filling the current filesystem. The Python API retains ./data as its fallback. Without --output-format, the command uses output.save_as from the YAML, defaulting to Parquet. The CLI format override accepts parquet and hats; CSV and HDF5 remain available through output.save_as in the YAML.

Run science-catalogs --help for the complete command synopsis. Configuration is validated before execution, so unknown keys and scientifically inconsistent photometric transformations fail before catalog materialization begins.

Large HATS imports use bounded task submission and extended Dask communication timeouts by default. An incomplete HATS collection can be resumed with output.on_existing: reuse when its primary catalog is already valid.

A YAML file may also contain a batch section with shared defaults and a list of named catalogs. Batch entries run one at a time on the same Dask executor and the command reports the artifact produced for each catalog. See docs/configuration.rst and examples/configs/dp2/all/lsst_dp2_to_hats.yml for the full layout. Standalone configurations for each DP2 catalog are available in examples/configs/dp2/individual.

Python API

Prepare a catalog from a catalog-processing YAML configuration:

from science_catalogs import prepare_catalog

prepared = prepare_catalog("configs/catalog.yml")

Materialize the processed data in memory and keep track of the written output paths:

from science_catalogs import materialize_catalog

result = materialize_catalog(prepared, "./output")
frame = result["data"]
paths = result["path"]

Write the result to disk. The write mode follows the output configuration, including HATS when output.save_as: hats is selected:

from science_catalogs import write_catalog

written_paths = write_catalog(prepared, "./output")

Open the final result as an LSDB catalog after writing HATS output:

from science_catalogs import materialize_lsdb_catalog

result = materialize_lsdb_catalog(prepared, "./output")
catalog = result["data"]
hats_path = result["path"]

Execute the full flow from configuration and persist parquet output in one call:

from science_catalogs import build_catalog

paths = build_catalog("configs/catalog.yml", output_dir="./output")

Or force a HATS artifact from the same flow:

hats_path = build_catalog(
    "configs/catalog.yml",
    output_dir="./output",
    output_format="hats",
)

If you already have a HATS catalog on disk, you can open it directly:

from science_catalogs import open_lsdb_catalog

catalog = open_lsdb_catalog("./output/my_catalog")

Metadata

Release files for science-catalogs 0.1.0b9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for science-catalogs 0.1.0b9
File Size Uploaded Provenance
science_catalogs-0.1.0b9.tar.gz 322.4 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for science-catalogs 0.1.0b9
File Interpreter ABI Platform
science_catalogs-0.1.0b9-py3-none-any.whl Python 3 none any Details

Total release size: 362.3 kB

Release files / science_catalogs-0.1.0b9.tar.gz

Download URL science_catalogs-0.1.0b9.tar.gz
Size 322.4 kB
Tags Source
SHA-256 checksum
How to use checksums
11578f56496db0daca375a6119b14940276ad6f8d6ef1bc28abb8b55768476d0
BLAKE2b-256 checksum
How to use checksums
18b98b981617a8ef1e2bb1a7f141bc688f263fde6044228ae0a1ed294e2b7ed2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 15, 2026.

Transparency log

Release files / science_catalogs-0.1.0b9-py3-none-any.whl

Download URL science_catalogs-0.1.0b9-py3-none-any.whl
Size 39.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fcf2c43c0835e840bb2c4cc37ac82a203bb444562b5d333aba069d2f43d1ce69
BLAKE2b-256 checksum
How to use checksums
9592271d06252d20e1d46b064273657b3b95e5b71b37781ff26a2b56a706811f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 15, 2026.

Transparency log

Security for science-catalogs 0.1.0b9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for science_catalogs-0.1.0b9.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 15, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page