AstroResolver

AstroResolver


Generate astrometric data for almost any image, even jpg/png files from the web, from its stars alone. [more]

Categories: Astrometry, DeepSkyColors

Keywords: plate solving, astrometry, WCS, blind solve, Gaia, SIMBAD object search, asterism matching, distortion correction.

Author: Rogelio Bernal Andreo (DeepSkyColors.com).

Contents

[hide]

1 Introduction

[hide]

AstroResolver computes an astrometric solution (a WCS) for the active image and writes it back into the image, so that every other astrometry-aware tool in PixInsight, such as image annotation or a finding chart, knows exactly where each pixel points on the sky.

AstroResolver solves an image from its stars alone. We don't tell it what the image shows or where it points: no object name, no coordinates, no focal length, no pixel size, no image scale, and no astrometric or instrumentation metadata of any kind. We open the image, click Solve, and a few seconds later the image carries a complete solution, with a distortion model accurate from the center to the corners. This works on almost anything with stars in it: our own calibrated masters, a camera-lens frame of the Milky Way, or a jpeg found on the web.

To find where an image points with no clue at all, AstroResolver uses a set of index files of star patterns, which it builds once on our computer from the Gaia catalog configured in PixInsight. No network connection is involved and nothing is downloaded. Two sets cover fields from about 0.2 to 60 degrees: practically every telescope and camera-lens image.

When we do know something about the image, we can use it. An object name or designation, such as M31, or approximate center coordinates, gives AstroResolver a position to solve from; that is also how we solve images narrower than the index files reach, or before the index files are built. A known image scale is welcome too, but never required. And for images no automatic method can solve, we can identify a few objects by hand and AstroResolver fits the solution from them.

AstroResolver is fully self-contained. It does not use the ImageSolver script or the StarAlignment process behind the scenes; it detects stars, searches its index files, queries the Gaia catalog, matches the field, and fits the solution with its own engine. The result is a standard WCS, including a distortion model for wide fields, written directly to the target image.

From a picture to a solution:

A jpeg of the Pleiades downloaded from the Internet (1), solved (3) with AstroResolver (2). AstroResolver adds a WCS to the image that FindingChart (4) and other processes can read directly.

2 Setup and Installation

[hide]

AstroResolver is installed and updated through PixInsight’s own update system. We add the Deep Sky Colors repository in RESOURCES > Updates > Manage Repositories, then run RESOURCES > Updates > Check for Updates, and PixInsight installs the module, verifying our signatures before it completes. PixInsight verifies the module’s signature again every time it loads it.

https://repo.deepskycolors.com/AstroResolver/

Keeping that repository in the list is how updates arrive: PixInsight checks it with the others. If we already use the address of a Deep Sky Colors bundle that includes AstroResolver, that address is all we need.

AstroResolver uses the Gaia catalog as set up in PixInsight's Gaia process, so the Gaia DR3 database files must be installed and configured there. AstroResolver checks for them when its interface opens and warns us if none is available.

2.1 Launching AstroResolver

Once installed, AstroResolver appears under the PROCESS > DeepSkyColors and PROCESS > Astrometry menus, and in the Process Explorer under the same categories. As with most processes, we open its interface, set its parameters, and apply it to a view. AstroResolver always operates on the active image. There is no file list and no batch mode; we solve one open image at a time.

2.2 Building the index files

Solving from the stars alone needs AstroResolver's index files, which we build once, right after installing. We click Blind solving data... in the AstroResolver interface. The first time in a session, the dialog can take a few seconds to open: it asks PixInsight's Gaia process which Gaia files are installed, and the first run of the Gaia process in a session is slow. The dialog lists two sets of index files:

  • Wide: fields of about 1.5 to 60 degrees (camera lenses and short focal lengths). It needs the Gaia DR3 catalog to magnitude G 15, which every Gaia installation has. About 85 MB.
  • Standard: fields of about 0.2 to 4 degrees (most telescope images). It needs the deeper Gaia DR3 files, to magnitude G 17.65. About 1.3 GB.

Most of us want both. If our Gaia installation is not deep enough for Standard, the dialog says so; Wide still works.

The Blind Solving Data dialog:

Both sets built. The last line of the text shows how deep the configured Gaia DR3 files go.

We select a set and click Build. AstroResolver reads the whole sky from our Gaia files through PixInsight's Gaia process. The progress line shows how far it is and about how long is left. Wide takes a few minutes; Standard takes much longer, about half an hour on a fast computer, and uses up to about 2.5 GB of memory while it is built. While it builds, the AstroResolver window is hidden; it comes back when the build ends. Stop ends a build; nothing incomplete is used, and Build starts again from the beginning.

No network connection is used: the files are built from the Gaia catalog already on our computer. They are stored outside the PixInsight installation, in this folder:

  • Windows: %LOCALAPPDATA%\DeepSkyColors\Astrometry\index
  • macOS: ~/Library/Application Support/DeepSkyColors/Astrometry/index
  • Linux: ~/.local/share/DeepSkyColors/Astrometry/index (or $XDG_DATA_HOME/DeepSkyColors/Astrometry/index)

Change... picks another folder (never one inside the PixInsight installation), and Default returns to this one. Delete removes a set's files; solving from the stars alone then needs them built again.

2.3 Licensing

AstroResolver is free and fully functional. There is no trial period and nothing expires: every feature, including the distortion model, is available to everyone, forever.

The free version shows a small advertisement banner at the bottom of the interface, usually promoting other Deep Sky Colors tools for PixInsight. The banner is a single clickable image; it never interrupts our work and it makes no attempt to track us. If we click on the banner, AstroResolver opens our default browser with the direct destination link, without saving nor tracking any information about the click at all.

Registering AstroResolver removes the banner. To register, we click the wrench (Preferences) button on the process panel, enter the e-mail and license key from our purchase confirmation, and click Register. The banner disappears immediately and stays gone.

3 The AstroResolver Interface

[hide]

The interface is deliberately minimal. From top to bottom: Find by name (optional), with the name box, the Solve button and a list of matching objects; Or by center coordinates, for when we know where the image points; Image scale (optional), a collapsible section for a scale hint; and two buttons, Manual solve... and Blind solving data....

The AstroResolver interface:

The name box, with its matches from the built-in catalog below it.

3.1 Solve

With the name box empty, Solve (or Enter) solves the active image from its stars alone, using the index files (see Building the index files). This is how we solve most images: nothing to type, nothing to look up.

Until the index files are built, the group is titled Find by name and Solve asks for a name; the console says how to build the index files.

3.2 Name and coordinates (optional)

Find by name. Although we don't need to enter a name for an accurate and fast solution, we can type the name or identifier of an object in our image, such as M31, NGC 7000 or Pleiades. As we type, the list below the box shows the matching objects of AstroResolver's built-in catalog (about 14,400 objects: Messier, NGC, IC, Caldwell, Sharpless, Barnard, van den Bergh and named stars), each with its catalog identifiers. A click on a match fills the box; a double-click, or Enter, solves. Tab completes the name to the best match, and the Down arrow moves into the list. Then we click Solve or press Enter.

A name in the built-in catalog is resolved instantly and with no internet connection. A name the catalog does not know (the list says so) is looked up online through SIMBAD, which needs an exact designation such as HD 37742. If a SIMBAD server does not answer within 15 seconds, AstroResolver tries a different SIMBAD server. The console says where the position came from: the built-in catalog, SIMBAD, or typed coordinates. If neither the catalog nor SIMBAD knows the name, AstroResolver says so and leaves the image untouched.

Or by center coordinates. Center RA and Center Dec are an approximate sky position (ICRS) of any point inside the image; it does not need to be the exact center of the frame. Both fields accept decimal degrees as well as sexagesimal notation, with or without unit markers: 10 44 2.38, 10h 44m 2.38s, 10:44:02.38 or -59° 30' 29.55" are all understood. This group has its own Solve button, which needs both fields filled in.

A name or coordinates are how we solve fields narrower than about 0.2 degrees, which the index files do not reach, and any image before the index files are built.

The object name is a process parameter, so a saved process icon carries it, and an image can be solved again by name later or from a script. From a process icon or a script, the blindSolve parameter requests a solve from the stars alone; the object name and the center coordinates are then ignored.

3.3 The optional scale hint

AstroResolver does not need to know the image scale: by default it discovers it. If we happen to know it, though, supplying it narrows the search to within about 15% of that scale, which makes the solve faster and a little more robust.

We open the Image scale (optional) section, tick I know the image scale, and provide either the Pixel size (in micrometers) together with the Focal length (in millimeters), or, alternatively, the Resolution directly in arcseconds per pixel. If we leave the resolution at zero, it is derived from the pixel size and focal length. When the box is unticked, all of these fields are ignored and the scale is found automatically.

4 Solving an image

[hide]

4.1 A typical session

The workflow is short:

  • Open the image we want to solve and make it the active view.
  • Open AstroResolver and click Solve (or press Enter) with the name box empty.

That's all. AstroResolver detects the stars, searches the index files for the image's star patterns, finds the field center and the image scale, matches the field against the Gaia catalog, fits the distortion model and, on success, writes the solution to the image. (Applying the process with its Execute button does exactly the same thing.) If it cannot find a confident match it reports that and leaves the image untouched. A long solve can be interrupted at any time by pressing the Escape key.

If we know the image scale, we can tick I know the image scale and fill it in before solving. If we prefer to solve from an object in the frame, we type its name (for example, M45) or pick it from the list, or type approximate coordinates into Center RA and Center Dec and click that group's Solve.

The first solve of a session reads the index files into memory, which takes a few seconds (longer from a slow disk). Later solves start right away.

If the active image already carries an astrometric solution, AstroResolver asks whether to replace it before it solves, so an existing WCS is never overwritten by accident. This prompt appears only when we run AstroResolver interactively; during script or batch execution it re-solves without interrupting.

4.2 Fast, then right

The search of the index files takes a few milliseconds, and its answer is already close: within about half a pixel at the image center. A plate solver could stop there. AstroResolver deliberately spends a few more seconds, because that answer is not yet a solution we would want to measure with:

  • It has no distortion model. The index search fits a plain linear transform. Real optics bend the field, so its error grows toward the edges and corners. AstroResolver fits a surface-spline distortion model, accurate from center to edge.
  • It rests on a few bright stars. The index search uses at most about 80 bright stars from the index files. AstroResolver matches hundreds to thousands of Gaia stars across the whole frame, so the fit is far better determined: typically a few tenths of an arcsecond RMS.
  • It is unconfirmed. AstroResolver solves again with different stars and its own matching, an independent check that the match is real before anything is written to the image.

The whole solve, both stages, usually takes a few seconds.

4.3 Solving by hand: manual reference points

Some images defeat any automatic solver: narrowband frames whose bright knots are not in a star catalog, ultra-wide fields that span a whole constellation, or heavily processed pictures where the stars no longer match a catalog's geometry. For these, AstroResolver can solve from points that we identify ourselves.

We click Manual solve... to open a window showing the active image. We click on a feature we can name (a bright star, a catalogued object) and type its name; AstroResolver resolves it through its built-in catalog, or SIMBAD for a name the catalog does not know, and pins a numbered marker at that spot. We repeat for a few more objects, spread as widely across the frame as possible. An existing point can be dragged to fine-tune its position, or removed with Ctrl+click. An optional auto-stretch (off by default) makes faint objects easier to see while we work.

With at least three points in place, AstroResolver fits a WCS directly from the correspondence between our clicked pixels and the objects' catalog coordinates, and writes it to the image. Here the tool trusts us: it runs basic sanity checks and rejects an obviously impossible fit, but it does not cross-check the points against a catalog. The more points we give it, and the wider they are spread, the more accurate and better-conditioned the solution.

Solving by identifying a few well known objects:

AstroResolver had no problems solving this image of Orion on its own, but if it did, we could just identify a few well-known stars, and it would find the right astrometric solution. As always, the more points the better.

Or any known designation!

A very long focal length, narrower than the index files reach. By identifying a few stars with planetarium software, we were able to solve it successfully.

4.4 Reading the results

AstroResolver reports its progress and its result in the Process Console. On success we see the solved field center, the image scale in arcseconds per pixel, the field rotation (and whether the image is mirrored), the number of catalog stars matched, the RMS residual of the fit in arcseconds, and whether a distortion model was fitted. A high star count at a sub-pixel RMS is the signature of a solid solution.

4.5 Verifying the solution

Because AstroResolver writes a standard WCS, we can verify it with any astrometry-aware tool. For example, the FindingChart process overlays catalog objects, constellation lines, and grids; and it will display the field in context. If FindingChart lands cleanly on the object's FOV across the whole frame, including the corners, the solution is good.

5 How AstroResolver works

[hide]

Understanding the pipeline helps us read the console output and diagnose the rare failure. The solve proceeds in stages:

  • Star detection. AstroResolver detects the stars in the image and measures their positions to sub-pixel accuracy. If the first detection pass does not yield a solution, it automatically retries with a contrast-enhanced detection pass that surfaces fainter, cleaner stars.
  • Index search. Groups of four of the brightest detected stars form patterns whose shape does not depend on where the image points, its scale, rotation or mirroring. AstroResolver looks those patterns up in the index files, and a candidate that lands many more index stars on detected stars than chance would gives the field center, the image scale and the orientation. With a name or coordinates instead, that position is the starting point.
  • Catalog query. Around that position, AstroResolver queries the Gaia catalog as configured in PixInsight's Gaia process, at the field size the image scale gives. Without a known scale, from a name or coordinates, it tries a small ladder of field sizes, from narrow to wide, until one produces a match.
  • Asterism matching. The detected stars and the catalog stars are matched by comparing the shapes of star triangles. Triangle shape is independent of scale, rotation, and mirroring, so the match needs no assumption about the image's orientation. A robust voting and verification step keeps only a transform that lands many catalog stars on real detected stars.
  • Full-frame refinement. Once an initial lock is found, AstroResolver recenters on the real solved position, re-queries the catalog at the now-known field of view, and refines the fit against stars across the entire frame, typically hundreds of them.
  • Distortion model. For wide fields, a linear WCS cannot follow the optics into the corners. AstroResolver fits a surface-spline distortion model from the matched stars, so the solution stays accurate from center to edge.

6 Usage tips and limitations

[hide]

  • Build both sets of index files. Wide covers camera lenses, Standard most telescope images; the two together cover fields of about 0.2 to 60 degrees. Without them, AstroResolver needs an object name or coordinates.
  • Fields narrower than about 0.2 degrees are beyond the index files. We solve those from a name or coordinates; a scale hint helps a lot at long focal lengths.
  • A scale hint helps, but is never required. Supplying it narrows the search and makes the solve quicker.
  • A name or position only needs to be inside the frame. The object we look up does not have to be centered; anywhere in the image is fine. The solved center reported in the console is where the image actually points, which may differ from the object we named by a noticeable amount.
  • The Gaia databases must be configured. AstroResolver uses the Gaia catalog as set up in PixInsight's Gaia process, both to build the index files and to solve, and checks for it when the interface is launched: if no Gaia database is available it warns us right away. The automatic solve cannot work without it, although the manual reference-point solve, which relies on object names rather than Gaia, still can.
  • When the automatic solve just won't lock. Narrowband nebulae with few catalog stars, ultra-wide constellation frames, and heavily reprocessed images are the hard cases. When a name, coordinates or a scale hint do not help either, the Manual solve reference-point method almost always will.
  • When it fails. If too few stars are detected, or the field falls outside the scales covered, AstroResolver reports that no match was found and leaves the image untouched. Making sure the image is reasonably star-rich resolves most failures.

7 Credits

[hide]

The index files are built from the ESA Gaia catalog. This work has made use of data from the European Space Agency (ESA) mission Gaia (https://www.cosmos.esa.int/gaia), processed by the Gaia Data Processing and Analysis Consortium (DPAC, https://www.cosmos.esa.int/web/gaia/dpac/consortium). Funding for the DPAC has been provided by national institutions, in particular the institutions participating in the Gaia Multilateral Agreement. The brightest stars, which Gaia does not measure, come from Hipparcos (ESA 1997, The Hipparcos and Tycho Catalogues, ESA SP-1200). The index search follows the method of Lang, Hogg, Mierle, Blanton and Roweis (2010, AJ 139, 1782), implemented independently.