astrometry¶
astrometry finds the WCS of a frame, so that every pixel gets a sky position.
It pairs the stars detected on the frame with a reference catalogue (or an already calibrated frame), fits a projection to those pairs, and writes the result into the primary header. The image data are not changed.
If the header already has a rough WCS, or you know where the telescope pointed, the match uses that and is fast. Otherwise it searches blindly. Each solution is checked against chance coincidences before it is saved.
Usage¶
munipack astrometry [options] file(s)
munipack astrometry [options] 'input.fits output.fits'
Files are updated in place. To keep the original, give the input and output
name as one quoted argument, or write into a directory with -t. A list of
files can be read with @list.txt, or from standard input with -. If one
frame fails, the others are still processed and the exit status is 1.
Before you start, run find (required) and
aphot (strongly recommended) on the frame, and get a reference
catalogue, for example with cone. astrometry uses the photometry
to pick the brightest stars and to weight the fit. There is no default catalogue, so a
reference (-c, -r or -R) is always needed, except in manual mode.
Modes¶
Mode |
Use it when |
|---|---|
|
Almost always. Uses the header WCS or your pointing if available, otherwise matches blindly. |
|
You know the calibration approximately (header WCS or |
|
You pair the stars yourself with |
|
You want to write a known WCS by hand, with no catalogue. |
Options¶
Mode and reference¶
Option |
Default |
Description |
|---|---|---|
|
|
|
|
— |
Reference catalogue (FITS table). FITSIO filters work, e.g. |
|
— |
Calibrated frame used as the reference. |
|
— |
Reference frame for relative astrometry (pixel coordinates, no projection). |
|
built-in |
VO catalogue configuration that sets the default column names. |
|
|
Right Ascension column [deg]. |
|
|
Declination column [deg]. |
|
|
Proper motion in RA column. |
|
|
Proper motion in Dec column. |
|
by catalogue |
Epoch of RA column. |
|
by catalogue |
Epoch of Dec column. |
|
by catalogue |
Magnitude column, used to pick the brightest stars. |
Use only one of -c, -r and -R. Proper motions are applied to the
DATE-OBS of the frame when the catalogue gives an epoch.
Projection and pointing¶
Option |
Default |
Description |
|---|---|---|
|
|
|
|
frame centre |
Reference pixel. Give both. |
|
— |
Sky position of the reference pixel; in |
|
— |
Plate scale in pixels per degree (1″/px = 3600). |
|
— |
Rotation, clockwise positive. |
|
off |
The frame is mirrored. |
|
|
Reference system written to the header. |
|
from catalogue |
Reference epoch written to the header. |
Guided match¶
These tune how far the header WCS or your pointing may be off.
Option |
Default |
Description |
|---|---|---|
|
off |
Ignore the header WCS and the pointing ( |
|
0.05 |
Allowed relative error of the known scale; 0 means any scale. |
|
off |
Match with any scale (same as |
|
10% of frame (≥ 100 px) |
Allowed pointing error, in pixels or with a unit: |
|
3 |
Allowed rotation error; 180 means any rotation. |
|
0.03 |
Allowed relative scale error of the header WCS. |
|
off |
The rotation is unknown: try any rotation straight away. |
|
off |
The rotation is known within |
|
off |
Try both mirror orientations. |
Matching¶
Option |
Default |
Description |
|---|---|---|
|
1 |
Position error of the frame stars. |
|
1″ |
Position error of the reference stars. |
|
0.63, 1.58 |
Allowed flux ratio of paired stars (±0.5 mag). Widen it if your filter differs from the catalogue band. |
|
5 |
Fewest stars in a match (at least 5). Use 7 or more on crowded fields. |
|
42 |
Stars per chunk compared at once. |
|
250 |
How many of the brightest stars are used. |
|
3 |
Accept a match once it is this many stars longer than |
|
off |
Stop at the first match found. |
|
off |
Don’t compare fluxes while matching. |
|
off |
Skip the quality checks of the solution. Use with care. |
|
— |
Reference star indices ( |
|
— |
Matching frame star indices ( |
Fit and output¶
Option |
Default |
Description |
|---|---|---|
|
|
|
|
auto |
Units of the RMS in the header comments: |
|
off |
Compute the solution but don’t write it. |
|
off |
Remove the astrometric calibration from the header. |
|
off |
Add an |
|
— |
Print the default parameters and exit. |
|
— |
Write output files into this directory. |
|
off |
Enable advanced output names ( |
|
|
Pattern matched against input names. |
|
— |
Output name from back-references |
|
— |
Numbered output names, e.g. |
|
1 |
Number of parallel processes. |
|
— |
Extra options for |
|
off |
Print details of the match and the fit. |
|
— |
Show help and exit. |
Output¶
The WCS is written to the primary header (CTYPE, CRVAL, CRPIX, CD,
plus PV terms for TPV) and replaces any earlier solution. CRDER1/2 hold
the RMS of the fit, and ASTRMETH records how the match was found
(WCS, POINTING, BLIND, CROSS or SEQUENCE). A COMMENT block
summarises the solution: reference, number of stars, RMS, scale and
rotation. With --report, the ASTROREPORT extension lists each star’s
catalogue and frame coordinates and its residuals.
Examples¶
Calibrate a frame from scratch:
munipack cone -c UCAC5 -r 0.2 -o cone.fits -- 110.25 71.34
munipack find frame.fits
munipack aphot frame.fits
munipack astrometry -c cone.fits frame.fits
You know the pointing and the pixel scale, but not the rotation:
munipack astrometry -c cone.fits --rcen 180.02 --dcen 0.51 --scale 4761.9 \
--wcs-offset 3arcmin frame.fits
Write a known calibration by hand, or remove one:
munipack astrometry -m manual --rcen 30 --dcen 60 --xcen 300 --ycen 300 \
--scale 3600 --angle 20 frame.fits
munipack astrometry --remove frame.fits
Notes¶
Catalogue size. If the pointing is known, a cone larger than the frame is fine, since only stars near the frame are used. For a blind match, make the cone just a bit larger than the field of view (radius about 0.8 × the frame side for a square frame).
Magnitudes. Choose a catalogue magnitude range that matches the stars
that are well exposed but not saturated on your frame, using
cone --magmin/--magmax or a FITSIO filter.
Crowded fields and few stars. At least five stars must be paired; seven
or more is safer, so raise --minmatch to 7 on crowded fields. With few
stars, a tight --wcs-offset helps, because a smaller search is less
likely to be fooled by chance alignments.
Distortion. -p TPV fits a polynomial distortion on top of the
gnomonic projection. It needs plenty of stars: with 25 matched stars or
fewer it falls back to TAN with a warning.
Speed. The blind match runs in parallel threads; set the number with
OMP_NUM_THREADS.
Note
In manual mode, always give --xcen and --ycen. Without them the
reference pixel is written as 0 rather than the frame centre.
Relative astrometry with -R is unreliable in this version; use a
calibrated reference frame (-r) or a catalogue instead.