Skip to main content

UniSky

UniSky

Tiles that carry data, not pictures.

Turn heterogeneous astronomical survey data into an interactive, WCS-aware web map.

PyPI version Python versions License: BSD-3-Clause

unisky.cc · Documentation · Technical report · Source · Changelog

Abell 2744 in UniSky: critical curves and caustics from the UNCOVER lens model over a JWST/NIRCam colour image, with the observed multiple images marked and the Lensing panel open

Abell 2744. Critical curves and caustics from the UNCOVER lens model at zs = 3, over a JWST/NIRCam colour image with the observed multiple images marked.

UniSky puts FITS images on any WCS, colour composites, catalogues, contours, DS9 regions, footprints and strong-lensing models on one map, in the spirit of the DESI Legacy Survey viewer and as a more capable replacement for FitsMap. A build is a folder of static files; serve it from one machine or from object storage.

Install

Python 3.11 or newer.

pip install unisky

Quickstart

No local data and no checkout are needed. Save this as abell2744.yaml: three DESI Legacy Survey DR11 bands and the Tractor catalogue for Abell 2744, downloaded on the first build (about 16 MB, about half a minute) and cached afterwards.

field:
  name: Abell 2744
  grid: {ra0: 3.5862, dec0: -30.4003, scale_arcsec: 0.262, width: 1100, height: 1100}

layers:
  - id: g
    type: image
    title: DESI-LS g
    source: {survey: legacy, release: dr11, band: g, ra: 3.5862, dec: -30.4003, width_arcmin: 5}
  - id: r
    type: image
    title: DESI-LS r
    source: {survey: legacy, release: dr11, band: r, ra: 3.5862, dec: -30.4003, width_arcmin: 5}
  - id: z
    type: image
    title: DESI-LS z
    source: {survey: legacy, release: dr11, band: z, ra: 3.5862, dec: -30.4003, width_arcmin: 5}
  - id: grz
    type: composite
    title: grz
    channels: {r: z, g: r, b: g}
    visible: true
  - id: tractor
    type: catalog
    title: Tractor sources
    source: {survey: legacy, release: dr11, ra: 3.5862, dec: -30.4003, width_arcmin: 5, columns: [mag_r]}
    popup: [ra, dec, mag_r]
unisky build abell2744.yaml -o site/ && unisky serve site/

Then open http://127.0.0.1:8000/. Eight layer types, each one entry in the config: image, composite, catalog, contour, region, prerendered, footprint and lensmodel. The configuration reference has the rest.

Commands

unisky build config.yaml -o site/     # ingest data, write a self-contained site
unisky serve site/                    # static files + the science API
unisky add config.yaml -o site/ ID    # build one more layer into a built site
unisky remove -o site/ ID             # take one back out
unisky capabilities site/             # show or set what a deployment offers (--no-cutout, --static)
unisky refresh site/                  # new viewer, versions, sky; composites drawn live; no tile rebuilt

Each is described in the command-line reference.

What it does

  • Data tiles. Image tiles are quantised 16-bit data, not pictures: black and white point, stretch function (linear, sqrt, log, asinh, power) and colormap change instantly in the browser, with no refetch and no server. The Stretch window draws a histogram of the decoded tiles, with draggable black and white marks.
  • Any WCS in, one map out. Images on TAN, SIN, CAR and other grids are reprojected onto one gnomonic display grid, for display only; science operations use the native pixels.
  • Native-grid cutouts. The cutout API returns FITS whose pixels are bit-identical to the source, with a correctly shifted WCS.
  • Catalogues. Configurable popups, a joined second table, markers coloured by any column and hover highlight. search: columns make sources findable from the go-to box, and the Sources window (T) filters, sorts and steps through the catalogue with the arrow keys, with a preview stamp on hover.
  • Vector overlays. Contours with sigma-scaled levels traced in the native pixel grid, DS9 region files and footprints.
  • Strong lensing, live. Critical curves and caustics with a source-redshift slider, magnification at the cursor, counter-image prediction with time delays when the model carries a potential, and κ and μ as map layers (glafic-convention models).
  • Composite RGB. Each channel is one band or a weighted sum, in the same grammar the viewer's RGB panel reads and prints: a composite designed in the browser pastes into the config. By default the colour needs no tuning: Lupton's rule, with every band balanced from its own sky, noise and bright end and its stretch and Q solved from the noise, so the background is dark and untinted and bright cores keep their hue, for any combination of bands. A matched rule, whose sky's noise is colourful in every hue alike, and per-channel stretches are one key away.
  • Remote data. Legacy Survey cutouts, HiPS and TAP catalogues are downloaded and cached, so a config can name no local file at all.
  • Sky surveys, streamed. Any colour HiPS survey - DSS2, Pan-STARRS, 2MASS, eROSITA, thousands more - drawn live in the map as a backdrop around the field: declared with type: hips, or, on a site that turns the panel on (serve.sky_surveys: true), added by a visitor from the Sky surveys panel (A), which searches the CDS registry for what covers the field.
  • Incremental builds. Add or remove layers of a built site without touching the rest; the display grid is reused exactly, and a conflicting config is refused with the fix spelled out.
  • Deployment. One machine with uvicorn and nginx, or static object storage (Cloudflare R2) with /api through a tunnel. A site declares which of cutout and lensing it offers and the viewer hides what a deployment cannot serve. Tile and overlay URLs are keyed by content, so a rebuilt layer reaches browsers that cached the old one.
  • In the browser. The sky fills the window and the controls float over it in compact islands - black and gold by default, with SlateBlue and a light theme in View → Theme - and H hides them all for the bare sky. Permalinks in the URL hash, so a view is a link; coordinate readout; a go-to box that takes decimal or sexagesimal; uploads of your own regions and catalogues; optional basic auth; and a phone layout at 720 px and narrower in which every panel is a bottom sheet.

Documentation

License

BSD-3-Clause, see LICENSE. Written by Mingyu Li.

Metadata

Release files for unisky 0.4.0

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

Source distribution (sdist)

Source distribution for unisky 0.4.0
File Size Uploaded Provenance Actions
unisky-0.4.0.tar.gz 4.7 MB With provenance Details for unisky-0.4.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for unisky 0.4.0
File Interpreter ABI Platform Actions
unisky-0.4.0-py3-none-any.whl Python 3 none any Details for unisky-0.4.0-py3-none-any.whl

Total release size: 5.2 MB

Release files / unisky-0.4.0.tar.gz

Download URL unisky-0.4.0.tar.gz
Size 4.7 MB
Tags Source
SHA-256 checksum
How to use checksums
3e2a5b0989effb1a8b3df8ad9e980b3265bff88ab410102105b197e8227a23d0
BLAKE2b-256 checksum
How to use checksums
85b6adb8f85b52d09ca2bbaba20820a8f76e20dd6cc7efc27be2e2713b2366db
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 3, 2026.

Transparency log

Release files / unisky-0.4.0-py3-none-any.whl

Download URL unisky-0.4.0-py3-none-any.whl
Size 518.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b1f9c9ab79bef153101bd985739f9c79c3f76cfa3c4ba02236fac32fcb984145
BLAKE2b-256 checksum
How to use checksums
d341e466c43819fc876e6c6d61e8d58d40fb43e6dee0b95149a6066dac7eb905
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 3, 2026.

Transparency log

Security for unisky 0.4.0

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

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for unisky-0.4.0.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 Nov 3, 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