Arcsecond Service: Platesolver (astrometry)
This repository provides a FastAPI plate-solving service for Arcsecond, based on astrometry.net indexes and Neuromorphics Systems' astrometry Python package.
Astrometry index files (~10 GB) are baked into the Docker image at build time
under /opt/astrometry. No downloads occur at container startup.
Run with Docker
docker run --rm \
-p 127.0.0.1:8900:8900 \
arcsecond-service-platesolver-astrometry:latest
Run Natively (Linux/macOS)
python -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
python -m pip install .
python -m arcsecond_service_platesolver.main
Run Natively (Windows)
- Install Python 3.12+.
- Install Microsoft C++ Build Tools (Desktop development with C++).
- Install Rust (
rustup), becauseastrometrymay need a local native build when no matching wheel is available. - This project pins Windows installs to a Windows-compatible astrometry fork commit from
arcsecond-io/astrometry.
py -3.12 -m venv .venv
.venv\Scripts\Activate.ps1
python -m pip install --upgrade pip
python -m pip install .
python -m arcsecond_service_platesolver.main
Tests
uv sync --group dev
uv run pytest
The suite stubs the solver out entirely, so it needs no index files and runs in ~10s. It covers
the deadline machinery (breach, worker kill, respawn, repeated breaches, serialisation) and the
/platesolve response contract.
Configuration
HOST: bind host (default0.0.0.0).PORT: bind port (default8900).LOG_LEVEL: Uvicorn log level (defaultinfo).ARCSECOND_PLATESOLVER_SCALES_5200: comma-separated scale numbers for the 5200 series (default2,3,4,5,6).ARCSECOND_PLATESOLVER_SCALES_4100: comma-separated scale numbers for the 4100 series (default7,8,9,10,11).ARCSECOND_PLATESOLVER_SCALES_4200: comma-separated scale numbers for the 4200 series (default6,7,8). Set to empty string to disable a series entirely.ARCSECOND_PLATESOLVER_SOLVE_DEADLINE_SECONDS: wall-clock ceiling on a single solve (default50). Set to0or an empty string to disable. Keep it below the calling client's HTTP timeout (the Arcsecond backend uses 60s) so a hopeless field returns a cleanno_matchinstead of timing out the connection.
Why solves are fast
The solver stops at the first accepted match. By default astrometry keeps combing the search
cone after it already has a solution and SIP-fits every further match it accepts, which makes a
rich, well-exposed frame slower than a poor one — measured on a clean 50-star field, 169
matches in 40.0s versus 0.23s to stop at the first, for the same centre and scale to five
decimals. That, not pointing error, is what made real solves take 37-47s; a 2 deg pointing
offset only moved a 39.9s solve to 39.1s. Stopping early is safe because a match is only
accepted above odds of 1e9 to 1, and it is what astrometry.net's own solve-field does.
Solve deadline
A blind or badly-hinted solve can run indefinitely: astrometry has no timeout parameter, and
its only early-exit hook (logodds_callback) fires when a match is found — a hopeless 50-star
field was measured running 70s while calling it zero times. The service therefore runs solves in
a dedicated worker process and kills it when the deadline passes, which is the only mechanism
that actually bounds the C solver. The request then returns {"status": "no_match"} and logs
reason=deadline. The worker is respawned on the next request (~0.7s cold start against the
full index set, since indexes are mmapped rather than read).
One consequence: solves are serialised. A solve is CPU-bound, and single-flight keeps the kill unambiguous — it can never destroy a concurrent request's in-flight solve.
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 arcsecond_service_platesolver_astrometry-1.4.0.tar.gz.
File metadata
- Download URL: arcsecond_service_platesolver_astrometry-1.4.0.tar.gz
- Upload date:
- Size: 64.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9034f23ced58a315eed5ce3aa3f4c0195ad474fda24e4ab0fc74f647c83c5378
|
|
| MD5 |
6009caa23312d3029b9cfa7ffc99f0a1
|
|
| BLAKE2b-256 |
c3b31e8e84fd2a3d53f254e088b5cd52113cf4e7c39837cb3ead77fbe618301f
|
Provenance
The following attestation bundles were made for arcsecond_service_platesolver_astrometry-1.4.0.tar.gz:
Publisher:
publish-pypi.yml on arcsecond-io/arcsecond-service-platesolver-astrometry
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
arcsecond_service_platesolver_astrometry-1.4.0.tar.gz -
Subject digest:
9034f23ced58a315eed5ce3aa3f4c0195ad474fda24e4ab0fc74f647c83c5378 - Sigstore transparency entry: 2672928622
- Sigstore integration time:
-
Permalink:
arcsecond-io/arcsecond-service-platesolver-astrometry@3fa240acfa588c217d73ebf098b83e7fe5e1e2dc -
Branch / Tag:
refs/tags/v1.4.0 - Owner: https://github.com/arcsecond-io
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@3fa240acfa588c217d73ebf098b83e7fe5e1e2dc -
Trigger Event:
push
-
Statement type:
File details
Details for the file arcsecond_service_platesolver_astrometry-1.4.0-py3-none-any.whl.
File metadata
- Download URL: arcsecond_service_platesolver_astrometry-1.4.0-py3-none-any.whl
- Upload date:
- Size: 13.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
683b51cfd3f356fb407c277c24618b2f775e7c19b5b8042ad298bd8fd23c12e0
|
|
| MD5 |
7a466935455318ff48159467688789a9
|
|
| BLAKE2b-256 |
8ebf4268204add7209cf8ee8ff6b5753bc4f66f505acde298ed2b89e995b37ca
|
Provenance
The following attestation bundles were made for arcsecond_service_platesolver_astrometry-1.4.0-py3-none-any.whl:
Publisher:
publish-pypi.yml on arcsecond-io/arcsecond-service-platesolver-astrometry
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
arcsecond_service_platesolver_astrometry-1.4.0-py3-none-any.whl -
Subject digest:
683b51cfd3f356fb407c277c24618b2f775e7c19b5b8042ad298bd8fd23c12e0 - Sigstore transparency entry: 2672928671
- Sigstore integration time:
-
Permalink:
arcsecond-io/arcsecond-service-platesolver-astrometry@3fa240acfa588c217d73ebf098b83e7fe5e1e2dc -
Branch / Tag:
refs/tags/v1.4.0 - Owner: https://github.com/arcsecond-io
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@3fa240acfa588c217d73ebf098b83e7fe5e1e2dc -
Trigger Event:
push
-
Statement type: