Skip to main content

Unified dashboard for RAIL photometric redshift estimation

Project description

live-rail

Unified dashboard for RAIL photometric redshift estimation catalog management and visualization.

Overview

live-rail provides a multi-page Dash web application for:

  • CRUD management of photo-z catalog entities (algorithms, bands, catalog tags, datasets, models, estimators, estimates)
  • Estimation workflows — run photo-z PDF estimation, ensemble estimation, and full dataset estimation
  • Interactive visualization — single-catalog and multi-catalog photometric spectrum, color-color diagrams, and redshift PDF comparison

All backed by the pz-rail-svc package, supporting both local SQLite database access and remote FastAPI server access.

Installation

pip install -e '.[dev]'

Quick Start

# Set up test data (downloads data + initializes local SQLite DB)
live-rail setup pzdc

# Or skip the download if data is already present
live-rail setup pzdc --skip-download

# Launch the dashboard (uses local SQLite DB)
live-rail dashboard --backend local --db-url "sqlite+aiosqlite:///rail_svc.db"

# With RAIL catalog config for live estimators
live-rail dashboard --catalog-yaml nb/sandbox_catalogs.yaml

# Connect to a remote rail_svc server
live-rail dashboard --backend remote --server-url http://localhost:8000

Then open http://127.0.0.1:8050 in your browser.

Features

CRUD Tables

  • AG Grid tables with sorting, filtering, and pagination
  • Multi-row selection with select-all checkbox (Bands, Catalog Tags)
  • Click entity names to see full details in a popup
  • Click FK columns (model_id, dataset_id, etc.) to see the referenced entity
  • Create and delete entities via modal forms
  • Band transmission curve visualization for selected bands/catalog tags

Visualizers

  • Single Catalog: Photometric spectrum, color-color diagram (all adjacent pairs), and redshift PDF estimates for any object in a dataset
  • Multi Catalog: Same layout comparing across component catalogs in a matched (collection) dataset
  • Navigate objects with slider or back/next buttons
  • Pre-computed and live estimator PDFs with true redshift overlay

Estimation

  • Run photo-z PDF estimation for a single object
  • Run ensemble estimation for an entire catalog
  • Run full dataset estimation (creates estimates record in DB)

Development

# Run unit tests
pytest

# Run integration tests (requires real DB + data files)
pytest -m integration

# Lint & format
ruff check src/ tests/
ruff format src/ tests/

# Type check
mypy src/

# Pylint
pylint src/live_rail/ --rcfile=pyproject.toml

Data Setup

The live-rail setup command manages data initialization. Setup profiles are extensible — each profile handles downloading data and populating the database.

# List available setup profiles
live-rail setup --list-profiles dummy

# Run a profile
live-rail setup pzdc

# Skip download (data already on disk)
live-rail setup pzdc --skip-download

# Override catalog YAML
live-rail setup pzdc --catalog-yaml path/to/catalogs.yaml

Available profiles:

  • pzdc — Photo-z Data Challenge sandbox data (roman + rubin, 1yr + 10yr)

To add a new profile, create a module in src/live_rail/setup/ that subclasses SetupProfile and decorates with @register.

Project Structure

src/live_rail/
├── backend/          # BackendProvider — switches between local/remote rail_svc
├── cli/              # Click CLI (live-rail dashboard, live-rail setup)
├── dashboard/        # Dash multi-page app
│   ├── pages/crud/   # CRUD pages for each entity
│   ├── pages/estimation/  # Estimation workflow pages
│   └── pages/visualizers/ # Interactive visualizer pages
├── setup/            # Extensible data setup profiles
└── wrappers/         # CatalogWrapper abstractions for data access

License

MIT

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

live_rail-0.3.tar.gz (71.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

live_rail-0.3-py3-none-any.whl (66.4 kB view details)

Uploaded Python 3

File details

Details for the file live_rail-0.3.tar.gz.

File metadata

  • Download URL: live_rail-0.3.tar.gz
  • Upload date:
  • Size: 71.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for live_rail-0.3.tar.gz
Algorithm Hash digest
SHA256 35e8e890ba1d5486d46fceee042d7027a1106cdde13e843b70c735ef93884267
MD5 9a31e9a31237b85cbca2fe23cd982471
BLAKE2b-256 fda7224480ffc4a01682d4751fe6562f7a800b879e7a4fc0172d9e1ba39963d1

See more details on using hashes here.

Provenance

The following attestation bundles were made for live_rail-0.3.tar.gz:

Publisher: publish-to-pypi.yml on LSSTDESC/live-rail

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file live_rail-0.3-py3-none-any.whl.

File metadata

  • Download URL: live_rail-0.3-py3-none-any.whl
  • Upload date:
  • Size: 66.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for live_rail-0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 47dca0eccfc58ff130febf101ec95932652b2da63c686731204d66cc85eb50e2
MD5 a8524defa661fd82afecd3d1a93b57b4
BLAKE2b-256 e1140670091b5cf245e6e0d0f874daa3d7db12d8c2e4cea6592a0753820997ff

See more details on using hashes here.

Provenance

The following attestation bundles were made for live_rail-0.3-py3-none-any.whl:

Publisher: publish-to-pypi.yml on LSSTDESC/live-rail

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page