How to setup program

Most Linux users should just:

  1. download/install the pre-compiled binary code
   apt install
  1. install the star map data necessary to solve images.
   apt install astrometry-data-2mass-08-19 astrometry-data-tycho2-10-19

Alternative: copy the star index files with


The major steps in achieving a useful WCS starfield polynomial fit are: 1. source extraction (identifying star position in image frame) 2. quad asterism hashing, including tolerance for star position wiggling due to noise. 3. Match hash to star catalog, at least 3 choices are available: * USNO-B * Tycho-2 * 2MASS (longwave infrared) 4. Bayesian decision process, find extremely high probability solution or reject.

Here are tips at each stage of the solve-field process.

Tips and Tricks

Noisy images, including typical DSLR images of the night sky can have too many (false) sources detected in step 1. This can be observed in the *-objs.png files generated early in the solve-field processing chain. A reasonable goal for the number of sources detected is about 100. The default source count limit is 1000, but this is way too many for a practical solution time (or indeed, a solution at all). Adjusting the --sigma parameter is a useful way to control for noisy image. An image that at a glance looks high SNR upon closer inspection (e.g. a 3D intensity plot) may reveal a lot of false source detection potential. DSLR images especially should use --downsample 2 or --downsample 4. Thus typically two of the first lines you should see upon running solve-field should be like:

Downsampling by 2...
simplexy: found 129 sources.

Looking at the *-objs.png file should quickly reveal that mostly stars are highlighted. If there is debris, clouds, reflections, etc. that cause more than several false detections, this could drive failure to calibrate. In the gallery, that are images with a large planetary body in view from a satellite and other false detections, that still work. But in general too much junk in the image causes more difficulty in solving.

Once a hash comes over about odds of about 1e6 (exp(1)14) – log-odds 14, solve-field attempts to enhance the match. The default log-odds threshold to solve is 1e9 (exp(1)20) – log-odds 20, solve-field declares the image field solved. If the image solves, one of the lines will be like:

log-odds ratio 35.9538 (4.11658e+15), 31 match, 0 conflict, 70 distractors, 123 index.

One of the most major improvements in speeding solution time, from impossibly long to say 10 seconds or less, is to set a minimum image field width with the -L parameter. is a blind solver, so it doesn’t know if you have the Hubble Telescope or a cell phone in the night sky. Obviously that is an extremely wide range of field of view (FOV) to cover. Why not make an obvious lower limit on your image FOV and speed image solution time by a factor of 20 or more. Don’t worry about fine adjustment to -L, being within 25-50% is more than adequate. So if I think my lens/camera setup gives a 10 degree FOV, I’ll set -L 5.

The *-indx.png shows good and bad sources. The *-ngc.png shows constellations and star names. This is readily confirmed with Stellarium should there be doubt.

In short: * --sigma and --downsample help reduce extraneous sources – try to get a little over 100 sources detected and manually see that most of them are stars * -L will greatly speed solution, particularly if you have DSLR, auroral camera, etc. imagery * is made for tangential plane images, but extensions exist to calibrate all-sky images. * Distortion of even prosumer lens may be too much for solve-field to handle over the entire image. Try cropping the image to a region of interest, save as .png and use solve-field on that.


[Optional] compile

This is normally not necessary, unless you want to customize/optimize.

  1. Prereqs:
   apt install libcairo2-dev libnetpbm10-dev netpbm libpng12-dev libjpeg-dev zlib1g-dev swig libcfitsio-dev
  1. Install: If you have Anaconda/Miniconda Python as your default, will use them (or whatever your default Python is). Back to at least 0.70, is Python 3 compatible.

   tar xf*.gz


   make py
   make extra

   make install INSTALL_DIR=~/
  1. add to ~/.bashrc
   export PATH="$PATH:$HOME/"

do not use ~ or you’ll get error > cannot find executable astrometry-engine 4. uncomment inparallel in ~/ (or /etc/astrometry.cfg) 5. Copy the star index files with



If it can’t find the index file, be sure ~/ contains

add_path /home/username/astrometry/data

~ or $HOME will NOT work!

Reference paper