--- title: Jellyscope emoji: 🔭 colorFrom: indigo colorTo: pink sdk: docker app_port: 5000 pinned: false --- # Jellyscope Interactive web application for visualizing JWST jellyfish galaxy datacubes. Jellyscope lets you explore multi-filter NIRCam datacubes, select regions of galaxies (clumps, tails, disk), and inspect their physical properties. **Live demo:** ## Requirements - Python 3.13+ - [uv](https://docs.astral.sh/uv/) package manager ## Installation ```bash uv sync --extra dev ``` ## Usage ```bash uv run jellyscope --data-dir data ``` Then open in your browser. ### Options ```plaintext --host HOST Server host (default: 127.0.0.1) --port PORT Server port (default: 5000) --data-dir DIR Path to data directory (default: data) ``` ## Run with Docker Alternatively, run Jellyscope as a containerized service via Docker Compose. No local Python or `uv` required — only Docker. ```bash just docker build # docker compose build just docker up # docker compose up -d ``` Then open . The local `./data/` directory is bind-mounted read-only at `/data` inside the container. Override CLI flags ad-hoc: ```bash docker compose run --rm jellyscope --help ``` Tear down with `just docker down`. ## Data Format Place your data in the `data/` directory: - **FITS datacubes** — 3D arrays with shape `(n_filters, ny, nx)` and `FILTER1..FILTERn` header keys - **clumps_properties.csv** — Columns: `clump_id, area_pix, area_arcsec2, r_eff_arcsec, x0, y0, area_kpc2, r_eff_kpc, inside, component` - **clumps_pixels.csv** — Columns: `clump_id, x, y` ## Development This project uses modern Python tooling managed via [uv](https://docs.astral.sh/uv/) and a [`justfile`](https://just.systems/) (install with `brew install just` on macOS). ```bash just # List available recipes just install # Install deps + set up pre-commit hooks just check lint # Run ruff linter just check lint-fix # Auto-fix lint issues just check format # Format code with ruff just check typecheck # Run mypy type checking just check test # Run tests with coverage just check test-fast # Quick test run (no coverage, stop on first failure) just check all # Run ALL checks (lint + format + typecheck + tests) just check spellcheck # Check for typos in code/docs just serve # Start the dev server just docker build # Build the Docker image just docker up # Start the containerized service just docker down # Stop the containerized service just docker logs # Tail container logs just clean # Remove build artifacts ``` ### Tooling | Tool | Purpose | | ------ | --------- | | [uv](https://docs.astral.sh/uv/) | Package management, venv, lockfile | | [ruff](https://docs.astral.sh/ruff/) | Linting + formatting | | [mypy](https://mypy.readthedocs.io/) | Static type checking | | [pre-commit](https://pre-commit.com/) | Git hooks (lint, format, typecheck before each commit) | | [codespell](https://github.com/codespell-project/codespell) | Typo detection | ## Project Structure ```plaintext src/jellyscope/ ├── config.py # Configuration ├── data/ # FITS I/O, clump catalog, data store ├── model/ # Pydantic request/response schemas ├── visualization/ # Plotly figure builders (image, RGB) ├── web/ # FastAPI app, REST API, frontend └── cli.py # Command-line entry point ``` ## License MIT