A classic star detector and astrometry tool.
SENPAI is built off of the algorithm descriptions in Gazak et al. 2026, PASP, 138, 014502 — see Citation below if you use this software.
Is SENPAI the tool I'm looking for? SENPAI processes FITS imagery from ground-based telescopes and provides:
- ✔️ Astrometric fitting (WCS) — from a sidereal image, a list of extracted star positions, a sidereal + rate-track series, or a single or series of rate-track images with no prior WCS
- ✔️ Point source detection — stars in sidereal frames, satellites in rate-track frames
- ✔️ Streak detection — satellite/debris trail detection and measurement, with multi-frame confirmation
- ✔️ Photometry — aperture photometry with star catalog cross-matching (Gaia, SDSS, SSTRC7)
- ✔️ Batch processing — process whole directories of imagery via CLI or REST API
- ✔️ ML dataset export — export detections as COCO-format datasets for model training
- astroeasy - Handles all Astrometry.net considerations (installation, index files). See its README for setup and getting your config right
- Star catalogs - See senpai/catalog/README.md for setup and usage
Install from PyPI (package name astro-senpai, imports as senpai):
pip install astro-senpaiThis repo uses uv to manage python dependencies. First, install uv. Then,
make syncor
uv sync --all-extrasthen
source .venv/bin/activateWhen you run the SENPAI api, it loads a config file, which you can specify on command line (or use default resources/config/local.yaml)
you can always provide your own config.yaml with --config <your_config.yaml> flag.
I want to:
- fit a single sidereal image:
python -m senpai.cli.single --image <your_fits_file> --output_dir <your_output_directory> --plotWhen you run the SENPAI api, it loads a config file, which you can specify on command line (or use default resources/config/local.yaml)
- the default config is resources/config/local.yaml
- on startup, SENPAI will check for downloaded indices files
make runor
uv run python -m senpai.api.main --config resources/config/local.yamldocker build -t senpai .Or, if you have a custom base image:
docker build --build-arg BASE_IMAGE=<your-custom-base-image> -t senpai .- config this container builds with resources/local/containerize.yaml
- port runs on 8000 in container
Run like this, noting that target is the path to your indices in the container, and must match your config file (containerized.yaml by default).
docker run -p 8000:8000 --mount type=bind,source=/path/to/indices/5000/5200,target=/home/starman/indices/5000/5200 senpai:latestIf you want to use a different config file (to specify different indices or other settings), you can do so like this:
docker run -p 8000:8000 \
--mount type=bind,source=/path/to/indices/5000/5200,target=/home/starman/indices/5000/5200 \
--mount type=bind,source=/path/to/your/config.yaml,target=/app/resources/config/containerized.yaml \
senpai:latestThis will mount your custom config file in place of the default containerize.yaml. Make sure your custom config file follows the same format as the default configuration.
SENPAI implements the algorithms described in:
Gazak, J. Z., Fisher, L., Phelps, M., Swindle, R., Baruela, L., & Fletcher, J. 2026, "SENPAI: Sidereal Enriched Rate-track Astrometry in Deep Imagery of Solar System Bodies", PASP, 138, 014502. doi:10.1088/1538-3873/ae2b35
If you use SENPAI in your research, please cite this paper:
@article{Gazak2026SENPAI,
title = {SENPAI: Sidereal Enriched Rate-track Astrometry in Deep Imagery of Solar System Bodies},
author = {Gazak, J. Zachary and Fisher, Lauren and Phelps, Matthew and Swindle, Ryan and Baruela, Leonard and Fletcher, Justin},
journal = {Publications of the Astronomical Society of the Pacific},
volume = {138},
number = {1},
pages = {014502},
year = {2026},
doi = {10.1088/1538-3873/ae2b35}
}