Description
Local plate solving (astrometry.net or ASTAP), NGC/IC/Messier annotation with an RA/Dec grid, spectrophotometric colour calibration (SPCC) against Gaia DR3 stars, and a search for the asteroids expected in the field (MPC / SkyBoT).
What it does
The plugin provides four global stages. platesolve computes the astrometric solution (WCS) of the image; the other three rely on it.
platesolve — plate solving
Determines the sky coordinates of every pixel of the current image (WCS: centre, scale, rotation, parity, and SIP distortion).
- Hints taken from the header of the reference frame: pixel scale (
SCALE/PIXSCALE, otherwise 206.265 ×XPIXSZ/FOCALLEN, corrected for binning,superpixeldebayering anddrizzle), and approximate position (CRVAL1/2,RA/DEC,OBJCTRA/OBJCTDEC, or failing that the object nameOBJECTlooked up in the embedded catalogue: "M 42", "NGC 7000"…). Thescale_arcsec,raanddecparameters override these values. - Engine:
autopicks astrometry.net if theastrometryPython package is installed, otherwise ASTAP if it is found.- astrometry.net (local, offline once the index files are downloaded): the luminance is downsampled to ~2000 px, the
max_starsbrightest stars are detected (SEP) and passed to the solver, which looks for star "quads" matching the index files. Index scales are chosen from the field of view (quads between 30 and 70 % of the short side): series 4100 (Tycho-2, fields > ~1°) and/or 5200 (Gaia, small fields). Missing files are downloaded once into~/.cache/astrostack/astrometry. - ASTAP (external executable, with its star database D20/D50…): the image is written to a temporary 16-bit FITS and solved by
astap_cli, with the field-of-view and position hints.
- astrometry.net (local, offline once the index files are downloaded): the luminance is downsampled to ~2000 px, the
- Blind search: if
blindis enabled and solving with the position hint fails, a second attempt is made without the hint (can be very slow). - Solving the raw frames (
frames: true): each frame is solved from the stars already measured byquality, using the stack's solution as a hint. These WCS are used in particular byregister: {method: wcs}.
annotate — annotated chart
Draws on the image the deep-sky objects (NGC, IC, Messier) at their true size and orientation (ellipse projected from the major axis, minor axis and position angle), bright named stars, and an RA/Dec grid with a "round" spacing suited to the field (poles are handled). Colours distinguish galaxies, nebulae, clusters, planetary nebulae and stars. Catalogue: the full OpenNGC downloaded on demand into ~/.cache/astrostack/catalogs or, offline, an embedded extract (the 110 Messier objects and about 210 bright or extended NGC/IC objects, plus about 190 bright named stars). A linear image is automatically stretched for display; an already stretched image is used as is.
spcc — spectrophotometric colour calibration (Gaia DR3)
White balance based on the actual photometry of the stars in the field, rather than on the "average star is white" assumption of the core color stage:
- Queries Gaia DR3 (ESA archive, via
astroquery) in the cone covering the field, down to magnitudegmax; the response is cached (~/.cache/astrostack/gaia) so the stage can be replayed offline. - Detects the stars in the image, projects the Gaia stars with the WCS and matches them by nearest neighbour (unique in both directions).
- Aperture photometry (SEP, radius 1.5 × FWHM, local background subtracted in an annulus) in each R, G, B channel.
- Robust regression (iterative 3 σ rejection) of ln(R/G) and ln(B/G) against the Gaia BP−RP colour index, over the
bp_rp_rangeinterval. - R and B factors that make a reference star white (R = G = B): G2V (solar type, BP−RP = 0.82), average spiral galaxy (0.90), or a custom
bp_rpindex. - Applies the factors, with background neutralisation (the three channel backgrounds brought to the same level) if requested.
- Computes a photometric zero point in the G band (median of G + 2.5 log₁₀ flux), later used by
snr_analysis(plugin "analysis") for a calibrated limiting magnitude. On a monochrome image, only the zero point is computed.
asteroids — asteroids expected in the field
Computes the median time of the session (middle of the accepted frames, from DATE-OBS and exposure time, or the date parameter), then queries the Minor Planet Center's MPChecker (web form) or, as an automatic fallback, IMCCE's SkyBoT service (via astroquery) for the cone covering the image. Objects inside the image down to limit_mag are placed with the WCS, listed (name, V magnitude, proper motion in ″/h) and circled on a check image. Responses are cached on disk.
When to use it
platesolve: prerequisite for all the other stages of the plugin; also gives a final FITS with a WCS header usable in other software (Aladin, Siril, PixInsight, Stellarium…). Useful with every setup: Vespera/Seestar (scale and coordinates are often in the header), refractor or telescope with a dedicated camera (FOCALLEN/XPIXSZ filled in by the capture software), camera on a mount (givescale_arcsecandra/decor an object name if the header is sparse).annotate: identifying faint galaxies in a field, preparing a labelled image to share, checking the framing. The JSON file feeds the annotation overlay of the interface.spcc: faithful colours with a colour sensor (OSC, smart telescopes) or an RGB series, especially under light-polluted skies where classic neutralisation is skewed by the background cast, or in nebula-dominated fields (where the "average white star" is biased). Replaces thecolorstage.asteroids: finding out whether a moving dot is a known asteroid, preparing an observation, complementing thetransientsanalysis (plugin "analysis").
Do not use it:
- on the Moon, planets or the Sun (no star field to solve);
spccwith a narrowband or dual-band (Hα/OIII) filter: the BP−RP model assumes a broadband continuum; usecoloror thedualband/narrowbandstages (plugin "color-tools") instead;spccon an already stretched image: calibration must be done on linear data;asteroidswithout a network connection and without a prior cache for that field.
Installation
astrostack plugin install astrometry --deps
Or from the application: Plugins view, "Astrometry & catalogues" page, Install button, then install the dependencies offered on the page.
Python dependencies (python_deps), never installed automatically without --deps or confirmation:
astrometry>=4.1: embedded astrometry.net solver (PyPI packageastrometry), required for the astrometry.net engine;astroquery>=0.4: Gaia DR3 queries (spcc) and SkyBoT queries (asteroids).
Other optional prerequisites:
- ASTAP (https://www.hnsky.org/astap.htm) and a star database (D20, D50…), if you prefer this engine or if the
astrometrypackage is not installed. The executable is looked up in thePATH, in/Applications/ASTAP.appand in/usr/local/bin,/opt/astap; otherwise setastap_path. - astrometry.net index files: downloaded automatically on first use (a few hundred MB depending on the scales); a connection is needed the first time.
- Network for
spcc(first query of a field),asteroidsand the first OpenNGC download.
Parameters
platesolve
| Parameter | Type | Default | Description |
|---|---|---|---|
engine |
choice: auto, astrometry, astap |
auto |
Engine: auto = astrometry.net if installed, otherwise ASTAP. |
scale_arcsec |
float (0.05 to 200, optional) | none | Scale (″/px) of the current image; empty = computed from FOCALLEN/XPIXSZ in the header. |
scale_tolerance |
float (0.05 to 0.9) | 0.3 |
Relative tolerance on the scale. |
ra |
float (0 to 360, optional) | none | Hint: RA of the centre (degrees); empty = header (RA, OBJCTRA, OBJECT). |
dec |
float (−90 to 90, optional) | none | Hint: Dec of the centre (degrees). |
radius |
float (0.5 to 180) | 10.0 |
Search radius around the position hint (degrees). |
blind |
boolean | false |
If solving with the position hint fails, retry blind (can be slow). |
downsample |
integer (0 to 8) | 0 |
Downsampling before detection (0 = auto: ~2000 px). |
max_stars |
integer (20 to 1000) | 150 |
Number of stars sent to the solver. |
threshold |
float (2 to 50) | 5.0 |
Star detection threshold (σ). |
series |
choice: auto, 4100, 5200 |
auto |
Index series: 4100 (Tycho-2, fields > 1°), 5200 (Gaia, small fields). |
scales |
text (optional) | "" |
Forced index scales (e.g. "8,9,10"); empty = based on the field. |
sip_order |
integer (0 to 5) | 2 |
SIP distortion order (0 = none). |
frames |
boolean | false |
Also solve each raw frame (stars from the quality stage). |
astap_path |
text (optional) | "" |
Path of the ASTAP executable (empty = automatic search). |
timeout |
float (5 to 3600) | 120.0 |
Maximum ASTAP run time (s). |
cache_dir |
text (optional) | "" |
Index folder (default ~/.cache/astrostack/astrometry). |
annotate
| Parameter | Type | Default | Description |
|---|---|---|---|
catalog |
choice: auto, openngc, embedded |
auto |
Catalogue: auto = downloaded OpenNGC, otherwise the embedded extract. |
max_mag |
float (4 to 20) | 14.0 |
Limiting magnitude of deep-sky objects. |
stars |
boolean | true |
Show named stars. |
star_mag |
float (−1 to 7) | 6.0 |
Limiting magnitude of named stars. |
grid |
boolean | true |
RA/Dec grid. |
common_names |
boolean | true |
Show common names ("Andromeda Galaxy"). |
max_size |
integer (512 to 12000) | 2400 |
Maximum size of the annotated image (px). |
font_scale |
float (0.2 to 5, optional) | none | Text size (empty = automatic). |
formats |
list: png, jpg |
[png, jpg] |
Files produced. |
spcc
| Parameter | Type | Default | Description |
|---|---|---|---|
reference |
choice: G2V, average_spiral_galaxy |
G2V |
White reference: G2V star or average spiral galaxy. |
bp_rp |
float (−0.5 to 4, optional) | none | Custom reference: BP−RP index rendered white (takes precedence over reference). |
gmax |
float (8 to 20) | 15.0 |
Limiting G magnitude of the Gaia stars. |
threshold |
float (3 to 50) | 8.0 |
Star detection threshold (σ). |
max_stars |
integer (50 to 20000) | 3000 |
Maximum number of detected stars. |
match_radius |
float (0.5 to 20, optional) | none | Matching radius (px); empty = max(2, FWHM). |
min_stars |
integer (5 to 1000) | 20 |
Minimum number of matched stars. |
bp_rp_range |
2 numbers | [-0.2, 3.0] |
BP−RP range used for the fit. |
neutralize_background |
boolean | true |
Neutralise the background (grey). |
offline |
boolean | false |
Only use the Gaia cache (no network query). |
cache_dir |
text (optional) | "" |
Gaia cache (default ~/.cache/astrostack/gaia). |
asteroids
| Parameter | Type | Default | Description |
|---|---|---|---|
limit_mag |
float (8 to 24) | 19.0 |
Limiting V magnitude. |
service |
choice: mpc, skybot |
mpc |
Ephemeris service queried first (automatic fallback to the other). |
observatory |
text | 500 |
MPC observatory code (500 = geocentric). |
date |
text (optional) | "" |
UTC date/time in ISO format (default: middle of the session, from DATE-OBS). |
cache_dir |
text | ~/.cache/astrostack/mpc |
Disk cache for the responses. |
timeout |
float (5 to 300) | 60.0 |
Maximum query time (s). |
None of these stages has a mask parameter.
YAML examples
Recommended position: platesolve after crop (and after drizzle if enabled), because the WCS describes the geometry of the image at that point; any later stage that crops or resamples the image invalidates it. spcc instead of color, on the still-linear image, after background/gradient; annotate and asteroids at the end of the chain, before export.
Typical chain for a smart telescope (Vespera, Seestar) or a refractor with a colour sensor:
pipeline:
- stack: {method: sigma_clip}
- crop: {min_coverage: 0.9}
- platesolve: {engine: auto}
- channel_align: {}
- background: {}
- spcc: {reference: G2V} # replaces color
- scnr: {amount: 0.8}
- stretch: {method: auto}
- annotate: {max_mag: 14}
- export: {formats: [fits, tiff16, png]}
Sparse header (camera on a mount): hints given by hand, galaxy as white reference:
pipeline:
- crop: {}
- platesolve:
scale_arcsec: 3.2
ra: 83.82
dec: -5.39
radius: 5
blind: true
- background: {}
- spcc: {reference: average_spiral_galaxy, gmax: 14}
- stretch: {}
Asteroids and per-frame solving (WCS-based registration), with an observatory code:
pipeline:
- quality: {}
- stack: {}
- crop: {}
- platesolve: {frames: true, engine: astrometry, series: 5200}
- asteroids: {limit_mag: 18, observatory: "500"} # replace 500 with your site's MPC code
- annotate: {formats: [jpg], star_mag: 4}
- export: {}
Outputs
| Stage | Files (in output.dir) |
ctx.state keys |
|---|---|---|
platesolve |
<name>.wcs (FITS header of the solution); the core also writes the WCS into the header of the exported FITS |
wcs (FITS WCS keywords, with IMAGEW/IMAGEH), wcs_info (centre, scale, rotation, field, flip), wcs_frames (per-frame WCS, with frames: true) |
annotate |
<name>_annotated.png, <name>_annotated.jpg, <name>_annotations.json (objects, pixel outlines, grid, WCS, for the GUI) |
annotations: json, images, count |
spcc |
<name>_spcc.csv (stars used: position, G, BP−RP, R/G/B fluxes, ratios); Gaia cache in ~/.cache/astrostack/gaia |
spcc: n_stars, gaia_stars, matched, reference, bp_rp_ref, fit (slope, intercept, scatter per channel), factors, background, zeropoint, zeropoint_std, aperture_px |
asteroids |
<name>_asteroids.json, <name>_asteroids.png; cache in ~/.cache/astrostack/mpc |
asteroids: n, json, png, service, date (or error if the service cannot be reached) |
spcc modifies the current image (colour factors and background); the other stages leave it untouched. None of them saves a checkpoint. asteroids is excluded from the interactive preview (preview = False).
Limitations
- Plate solving: a correct estimate of the scale (±
scale_tolerance) and, unlessblind, of the position (±radius) is required. Blind search can be very slow; it is disabled by default. astrometry.net index files weigh 165 MB and more: the first run is slow and needs the network. The ASTAP engine has only been tested with a simulated executable. - The WCS is invalidated by any later crop or resampling:
annotateandspccstop with a warning if the image size no longer matches. annotate: without network access on first use, only the embedded extract is available (bright or extended objects only). OpenNGC sizes are catalogue dimensions, not the outline visible in the image.spcc: linear model in BP−RP, without filter transmission or sensor response curves; requires at leastmin_starsmatched unsaturated stars; stars in very crowded fields may be mismatched. The first Gaia query is online (ESA archive) and can be slow or unavailable; afterwards the cache is enough.asteroids: requires a WCS, an observation date and the network (or a cache). MPChecker is queried through its web form: a change in the page format can break parsing (the SkyBoT fallback then takes over). Positions are computed at a single instant (middle of the session): a fast asteroid moves during the session. Code500= geocentric, so parallax of nearby objects is not corrected: give your observatory code if you have one.
Licences
- Plugin: MIT licence, © Erwan Sturzenegger.
astrometryPython package (neuromorphicsystems, PyPI): GPL-3.0. It embeds the astrometry.net code (D. Lang, D. W. Hogg et al.; mostly BSD-3-Clause, some components under the GPL). The package is not redistributed with the plugin: it is installed separately by the user.- astrometry.net index files 4100 (built from Tycho-2) and 5200 (built from Tycho-2 and Gaia): distributed by astrometry.net; for publications, cite Lang et al. 2010 (AJ 139, 1782) and the source catalogues.
- ASTAP (Han Kleijn) and its star databases: external software, distributed separately under its own licence.
- astroquery: BSD-3-Clause.
- OpenNGC (Mattia Verga): CC-BY-SA 4.0; the extract embedded in the plugin is derived from it and remains under that licence (attribution: OpenNGC, https://github.com/mattiaverga/OpenNGC).
- Bright named stars: positions and magnitudes from SIMBAD (CDS, Strasbourg); cite SIMBAD in publications.
- Gaia DR3: data from the ESA Gaia mission, processed by the Gaia DPAC; the acknowledgement "This work has made use of data from the European Space Agency (ESA) mission Gaia, processed by the Gaia Data Processing and Analysis Consortium (DPAC)" and citations of Gaia Collaboration 2016 and 2023 (DR3) are required in publications.
- MPChecker (Minor Planet Center, IAU) and SkyBoT (IMCCE, Paris Observatory): public online services; follow their terms of use and cite SkyBoT (Berthier et al. 2006) in publications.
- Core dependencies used: NumPy, SciPy, Astropy (BSD-3-Clause), OpenCV (Apache 2.0), SEP (LGPL-3.0, parts BSD/MIT).
Steps provided
This plugin adds 4 steps to the pipeline.
| Step | Type | Role |
|---|---|---|
platesolve Plate solving | Analysis | Computes the image WCS (local astrometry.net or ASTAP): required for annotation, SPCC and asteroids. |
annotate Annotate the field | Analysis | NGC/IC/Messier objects, named stars, RA/Dec grid. |
spcc Photometric colour calibration (SPCC) | Post-processing | Colours calibrated on the Gaia DR3 stars of the field; replaces “Calibrate colours”. |
asteroids Asteroids | Analysis | Asteroids expected in the field (MPC, network required). |
- Analysis Measurement or annotation, writes result files.
- Post-processing On the stacked image, replayable in the live preview.
Dependencies
Required Python modules, never installed automatically: the application and the CLI detect them and offer to install them.
Also install the Python dependencies:
astrostack plugin install astrometry --deps With pip, in the CelestiaX environment:
pip install "astroquery>=0.4" "astrometry>=4.1" Versions
- 1.0.0 current
Initial release (extracted from the astrostack core)