Skip to content

Star patterns

The solver cannot pair individual stars, because one star looks like any other. It pairs patterns of stars instead, described in a way the camera cannot change.

Between the sky and the image, a star pattern is moved (the telescope points somewhere), rotated (the camera is turned), scaled (the focal length and pixel size), and possibly mirrored (a diagonal or a flipped readout). Together these make a similarity transform:

with scale , rotation , shift and a sign for the mirror. A description of a pattern is useful only if it gives the same numbers before and after any such transform: it must be invariant.

Distances between stars are unchanged by moving, rotating and mirroring, and all of them are multiplied by the same when the image is scaled. So any ratio of two distances is invariant to all four.

Take four stars. Between them there are six distances. Sort them from longest to shortest, , and divide each by the longest:

Four stars A, B, C and D joined by their six distances; the longest, A to C, is d1. AB CD d₁
Four stars, six distances. Dividing the other five by the longest, d₁, gives five numbers that do not depend on where the stars are, how the image is turned, how large it is, or whether it is mirrored.

Sorting is what makes it work: the code does not depend on which star is called A, so there is no labelling to get right. Two more numbers are kept with each quad, though not in its code: the longest distance itself, and the direction of that longest side. Two matching quads then also say what scale and rotation turn one into the other, which the next step uses.

Quads are matched with a tolerance on each ratio (-t, 0.007 by default): an image quad and a catalogue quad match if all five ratios agree within .

Three stars give three distances and so only two ratios. That seems nearly as good, but it is not, and the reason is the most useful piece of arithmetic in plate solving.

Suppose each ratio is spread roughly evenly over its range, and matched to . The chance that an unrelated pattern matches on one ratio is about , and on all ratios

With image patterns and catalogue patterns compared, about false matches turn up by chance. With , 500 image patterns and 5000 catalogue patterns ():

Pattern Ratios False matches expected
Triangle 2 about 490
Quad 5 about 0.0001

Each extra ratio divides the false matches by about 70. With triangles, the true matches are buried in hundreds of false ones; with quads, almost every match is real. (The ratios are not really spread evenly, so these are orders of magnitude, but the gap between the two is real.)

Triangles have one advantage: a pattern of three stars survives more often when stars are missing. If a fraction of the catalogue’s stars are detected, a triangle survives with probability and a quad with . arcsec has an experimental triangle mode, --method tetra, which tightens the tolerance to to bring the false matches down and relies on a stricter consensus step; on the test images it solves far fewer fields than quads.

A quad made of four stars from opposite corners of the image is fragile: a little lens distortion changes it, and any one of the four missing from the catalogue loses it. So quads are made from neighbourhoods. For each star, arcsec takes it and its eight nearest neighbours and builds every quad from those nine:

(With fewer than 30 stars the group is smaller.) Many of these are near-copies of each other, and quads whose centres fall within one pixel of an existing quad’s are dropped.

The redundancy matters because the image and the catalogue never agree on which stars are present. ASTAP builds one quad per star, from its three nearest neighbours; if one of those neighbours is missing from the catalogue, that quad is lost. With 126 quads from each neighbourhood, many survive whichever star is missing. It is one of the main reasons arcsec solves fields ASTAP does not, at the cost of more patterns to match.

The catalogue side builds its quads by exactly the same rule, at each place in the sky the search tries.

Next: Searching the sky.