Platesolving

The platesolving is a major step in astronomical image processing. It allows images to be associated with celestial coordinates, giving the ability to know what object is in the observed field of view. Many of Siril's tools, such as the Spectrophotometric or Photometric Color Calibration (SPCC or PCC) tools, need to know the coordinates of the image with sufficient accuracy in order to work.

Astrometry in Siril can be performed in two different ways:

  • Using the dedicated tool accessible via the menu Tools ‣ Astrometry ‣ Image Plate Solver, or using the shortcut Ctrl + Shift + A.

Astrometry dialog

Platesolving dialog

  • Using the platesolve command, introduced in Siril 1.2.

    Siril command line

    platesolve [image_center_coords] [-noflip] [-nocrop] [-force] [-focal=] [-pixelsize=] [-limitmag=[+-]] [-catalog=] [-localasnet [-blindpos] [-blindres]] [-downscale] [-order=] [-radius=]
    
    Plate solve the loaded image.
    If the image has already been plate solved nothing will be done, unless the -force argument is passed to force a new solve. If WCS or other image metadata is erroneous or missing, arguments must be passed:
    the approximate image center coordinates can be provided in decimal degrees or degree/hour minute second values (J2000 with colon separators), with right ascension and declination values separated by a comma or a space (not mandatory for astrometry.net).
    focal length and pixel size can be passed with -focal= (in mm) and -pixelsize= (in microns), overriding values from image and settings. See also options to solve blindly with local Astrometry.net

    Images can be either plate solved by Siril using a star catalog and the global registration algorithm or by astrometry.net's local solve-field command (enabled with -localasnet).

    The following options are common to both solvers:
    Unless -noflip is specified, if the image is detected as being upside-down, it will be flipped.
    For faster star detection in big images, downsampling the image is possible with -downscale.
    The solve can account for distortions using SIP convention with polynomials up to order 5. Default value is taken form the astrometry preferences. This can be changed with the option -order= giving a value between 1 and 5.
    When using Siril solver local catalogues or with local Astrometry.net, if the initial solve is not successful, the solver will search for a solution within a cone of radius specified with -radius= option. If no value is passed, the search radius is taken from the astrometry preferences. Siril near search can be disabled by passing a value of 0. (cannot be disabled for Astrometry.net).

    The following options apply to Siril's plate solve only:
    The limit magnitude of stars used for plate solving is automatically computed from the size of the field of view, but can be altered by passing a +offset or -offset value to -limitmag=, or simply an absolute positive value for the limit magnitude.
    The choice of the star catalog is automatic unless the -catalog= option is passed: if local catalogs are installed, they are used, otherwise the choice is based on the field of view and limit magnitude. If the option is passed, it forces the use of the remote catalog given in argument, with possible values: tycho2, nomad, gaia, ppmxl, brightstars, apass.
    If the computed field of view is larger than 5 degrees, star detection will be bounded to a cropped area around the center of the image unless -nocrop option is passed.

    The following options apply to Astrometry.net solver only:
    Passing options -blindpos and/or -blindres enables to solve blindly for position and for resolution respectively. You can use these when solving an image with a completely unknown location and sampling

Since version 1.2, plate solving can be done by two different algorithms. The first was the only one in Siril until this version, it is based on the global registration star matching algorithm, trying to register images onto a virtual image of a catalog with the same field of view. The second is new, it is using an external program called solve-field from the Astrometry.net suite, installed locally. For Windows platforms, the simplest way to get it is to use ansvr.

Since version 1.3, Siril internal solver will also look within a cone around the initial target coordinates if it did not find a match. This is only available when using local star catalogues. The log will show this information when that happens:

Initial solve failed
Attempting a near solve with a radius of 10.0 degrees

Astrometric solutions require a few parameters to be found, like image sampling. The window of the tool helps gathering those parameters, we will now see how to fill them correctly.

Image parameters

Target coordinates

Finding an astrometric solution is easier and faster when we roughly know were we are looking. Siril's plate solver, as it's comparing a catalog with the image, needs to know approximately the position of the center of the image to get the catalog excerpt. Astrometry.net has all the catalogs it needs locally, so it can browse through all of it to find a solution, but it is of course much faster to tell it where to start.

Acquisition software often also control the telescope nowadays and should know the approximate coordinates where the image was taken. In that case, using a FITS format, these coordinates will be provided in the image metadata, the FITS header. This is not always the case, and clearly not the case when RAW DSLR images are created instead of FITS.

When opening the plate solver or PCC windows, the current image's metadata is loaded and displayed in the window. If no coordinates appear at the top, or if RA and Dec remain zero, some user input is needed. If you don't know at all what the image is, use a blind solve with astrometry.net. Otherwise, provide equatorial J2000 coordinates corresponding to as close as the center of the image as possible, either by filling the fields if you already know the coordinates, or by making a query with an object name (not yet possible from the command).

The text field at the top left of the window is the search field, its goal being to convert an object name to its coordinates. Pressing ENTER or clicking the Find button will first search the object in the local annotation catalogues. If not found, a Web request will be made to obtain its coordinates. Several results may be found for the entered name, they will be displayed in the list below. Selecting one updates the coordinates at the top, the first is selected by default.

It is also possible to choose the server on which you want to execute the query, it does not change the results much, but sometimes one of them can be online, so others would act as a backup, between CDS, VizieR and SIMBAD (default).

Note

If the object is not found, please try with the full name or with the name from a catalogue. The annotation catalogues contain a few common names, the online services too, but not all, and they don't find partial answers. For example, for the Bubble Nebula, please enter NGC 7635 or bubble nebula, not bubble.

The coordinate fields are filled in automatically, but it is possible to define your own. Don't forget to check the S box if the object you are looking for is located in the southern hemisphere of the sky (negative declinations).

Image sampling

Image sampling is the most important parameter for plate solving. Given in arcseconds per pixel in our case, it represents how much zoomed on the sky the image is, so how wide a field to search for.

It is derived from two parameters: focal length and pixel size. They are often available in the image metadata as well. When not available from the image, the values stored in the settings are used. The values of the images and of the preferences can be set using the Information dialog. In any case, check the displayed value before plate solving and correct if needed. If an astrometric solution is found, the default focal length and pixel size will be overwritten. This behavior can be disabled in the settings.

Warning

If binning was used, it should be specified in the FITS header, but this can take two forms: the pixel size can remain the same and the binning multiplier should be used to compute the sampling, or the pixel size is already multiplied by the acquisition software. Depending on the case you are facing, either of the forms can be chosen from the preferences or from the Information window.

Pixel size is given in the specification of astronomical cameras, and can generally be found on the Web for DSLR or other cameras. The number of sensors is limited and most of them are known.

Focal length depends on the main instrument, but also on backfocus and correcting or zooming lenses used. Give a value as close as what you believe the effective focal to be, if an astrometric solution is found, the computed focal length will be given in the results and you will be able to reuse that in your acquisition software and for future uses of the tool.

When either of the fields is updated, the sampling is recomputed and displayed in the window (called 'resolution' here). Make sure the value is as close to reality as possible.

Tip

Data written in orange color in the GUI indicates values which could not be retrieved from the image header. It does not mean they are wrong (they could have been loaded from the preferences values and be valid) or mandatory (you could blind-solve), this color is just here to differentiate from values read from the header.

Solver parameters

Since Siril 1.2, Siril can use two different solvers, its internal solver and Astrometry.net local installation. The interface differs depending on whether one or the other is selected in the dedicated drop-down list.

Siril solver options

Siril internal solver options

Distortions

The option Solution order, selected via the drop-down list, specifies the order of the platesolving solution. When selecting Linear, the solver will try to fit a solution assuming there are no distortions in the image (i.e. the field is optically flat). However, this assumption may not be true in presence of optical aberrations (wrong backfocus, no field-flattener etc...). Since version 1.3, the platesolver can try to fit up to fifth-order polynomial distortions, following the SIP convention. By default, the platesolver uses Cubic (SIP) distortions, which should fit most use cases. This default can be changed in the Preferences. This option is available with both solvers.

Search radius

When local catalogues are installed or when using Astrometry.net, a cone around the target position will be searched. The size of this cone in degrees can be changed using the Search radius control, which default value can be changed in the Preferences. For Siril solver, this feature can be disabled by ticking the disable near search box.

Astrometry.net blind solve

When Astrometry.net solver is selected, two additional options are available:

  1. Ignore position (blind solve) enables to ignore the position specified in the Target coordinates control.

  2. Ignore sampling (blind solve) enables to ignore the resolution computed from the pixel size and focal length.

Astrometry.net solver options

Astrometry.net solver options

Use these two options together if the location and resolution of the image are completely unknown.

Warning

There is no magic happening here. In order to solve for any field of view, you will need to have the necessary indexes installed that cover the actual field of view of the image being solved.

Other parameters

Finally, there are three toggle buttons at the bottom of the frame:

  1. The option Downsample image downsamples the input image to speed-up star detection in it. The downside is that it may not find enough stars or give a less accurate astrometric solution. The size of the output image remains unchanged.

  2. If the image is detected as being upside-down by the astrometric solution, with the option Flip image if needed enabled, it will be flipped at the end. This can be useful depending on the capture software, if the image has not the right orientation when it is displayed in Siril (see more explanations).

  3. When the option Auto-crop (for wide field) is applied, it performs a platesolve only in the center of the image. This is only done with wide field images (larger than 5 degrees) where distortions away from the center are important enough to fool the tool. Ignored for astrometry.net solves.

Catalogue parameters

This section is relevant for Siril internal solver only.

Using online catalogues

By default, this section is insensitive because everything is set to automatic. By unchecking the auto box, however, it is possible to choose the online catalog used for the platesolve, which may depend on the resolution of the image. The choice is done between:

  • TYCHO2, a catalogue containing positions, proper motions, and two-color photometric data for 2,539,913 of the brightest stars in the Milky Way.

  • NOMAD, a merge of data from the Hipparcos, Tycho-2, UCAC2, Yellow-Blue 6, and USNO-B catalogs for astrometry and optical photometry, supplemented by 2MASS near-infrared. The almost 100 GB dataset contains astrometric and photometric data for about 1.1 billion stars.

  • Gaia DR3, released on 13 June 2022. The five-parameter astrometric solution, positions on the sky (α, δ), parallaxes, and proper motions, are given for around 1.46 billion sources, with a limiting magnitude of G = 21.

  • PPMXL, a catalog of positions, proper motions, 2MASS- and optical photometry of 900 million stars and galaxies.

  • Bright Stars, a star catalogue that lists all stars of stellar magnitude 6.5 or brighter, which is roughly every star visible to the naked eye from Earth. The catalog contains 9,110 objects.

  • APASS, a star catalogue that lists all stars of stellar magnitude 6.5 or brighter, which is roughly every star visible to the naked eye from Earth. The catalog contains 9,110 objects.

Note

An internet connection is required to use these online catalogs.

All these catalogs are made available through VizieR catalogue access tool, CDS, Strasbourg, France (DOI:10.26093/cds/vizier). The original description of the VizieR service was published in 2000, A&AS 143, 23.

The Catalogue Limit Mag is an option that allows you to limit the magnitude of the stars retrieved in the catalog. The automatic value is calculated from the image resolution.

Using local catalogues

With version 1.1, starting in June of 2022, it was possible to rely on a locally installed star catalogue, for disconnected or more resilient operation. The star catalogue we found to be the most adapted to our needs is the one from KStars. It is in fact composed of four catalogues (documented here in KStars), two of them not being directly distributed in the base KStars installation files:

  • namedstars.dat, the brightest stars, all of them have names

  • unnamedstars.dat, also bright stars, but down to magnitude 8

  • deepstars.dat, fainter stars extracted from The Tycho-2 Catalogue of the 2.5 Million Brightest Stars, down to magnitude 12.5

  • USNO-NOMAD-1e8.dat, an extract of the huge NOMAD catalogue limited to B-V photometric information and star proper motion in a compact binary form, down to magnitude 18.

When comparing these catalogues with the online NOMAD, we can easily see that many stars are missing. If not enough are found for your narrow field, you should still use the remote queries. A nice thing to check when the catalogues are installed is highlighting which stars of the image will be used for the PCC, those available with photometric information in the catalogues, using the conesearch command.

conesearch -phot

Download

The first two files are available in KStars source, the Tycho-2 catalogue from a debian package and the NOMAD catalogue from KStars files too, as documented in this small article for KStars installation. It is has multiple worldwide mirrors as indicated in the articles.

To make things easier to Siril users, and possibly to KStars users too, we redistribute the four files in a single place, and in a more compressed format. With the LZMA algorithm (used by xz or 7zip), the file size is 1.0GB instead of the 1.4GB with the original gzip file.

To make it available from anywhere faster, it is distributed with bittorrent, using this torrent file or the following magnet link.

Slower direct download links are available here (right click on each file name on the left and save the links).

Installation in Siril

The files can be put anywhere and their paths given to Siril in the settings, but there is a default location for the four files: ~/.local/share/kstars/ on Linux. They can be linked there to avoid unnecessary copies. Settings can be changed from the command line now, using the set command.

When available and readable, Siril will not use the Web service to retrieve astrometric or photometric data. See the messages in the log tab or on the console to verify that the catalogue files are used as expected.

From Siril 1.4.0 onwards, Siril will first look in local annotation catalogs to find the coordinates of an object passed in the platesolving dialog, to locate the center of the image. This means that, provided you have the local star catalogues installed, you can solve your images without Internet connection. Of course, this should only be needed if the acquisition software did not record the target coordinates in the FITS header, or when using SER file format which cannot hold this information.

Usage

With the addition of the new link between Siril's plate solver and the local catalogue and the new link between Siril's PCC and the local catalogue, a new command conesearch was created (from Siril 1.4.0) to display catalog objects in a plate solved image. To display stars that contain photometric information (the B-V index) and can be used for calibration, you can for instance use the following:

conesearch -phot

This is a good way to verify that the plate solving and the image are aligned, in addition to the object annotation feature (see annotations).

Preferences with local catalogues

Preferences with local catalogues

Technical information

For photometry, Siril only uses the B-V index, which gives information about star colour. The three image channels are then scaled to give the best colour representation to all stars in the image.

For more information about the KStar binary file type, see this page and this discussion on kstars-devel and some development notes in Siril here and here.

Sha1 sums for the 4 catalogue files:

4642698f4b7b5ea3bd3e9edc7c4df2e6ce9c9f7d  namedstars.dat
53a336a41f0f3949120e9662a465b60160c9d0f7  unnamedstars.dat
d32b78fd1a3f977fa853d829fc44ee0014c2ab53  deepstars.dat
12e663e04cae9e43fc4de62d6eb2c69905ea513f  USNO-NOMAD-1e8.dat

Licenses for the 4 catalogue files.

Using the local astrometry.net solver

Installation

Since version 1.2, solve-field, the solver from the astrometry.net suite, can be used by Siril to plate solve images or sequence of images.

For Windows platforms, the simplest way to get it is to use ansvr. If you did not modify the default installation directory, that is %LOCALAPPDATA%\cygwin_ansvr, Siril will search for it without additional setup. If you have cygwin and have build astrometry.net from the sources, you must specify the location of cygwin root in the Preferences.

For MacOS, please follow these instructions. Install with homebrew and add it to the PATH. Also make sure that the program works for the test images, as indicated in the instructions, and outside of Siril.

For non-Windows OS, the executable is expected to be found in the PATH.

The use of this tool makes it possible to blindly solve images, without a priori knowledge of the area of the sky they contain or its resolution. It's also a good alternative to Siril's plate solver in case it fails, because it's a dedicated and proven tool that also can take field distortion into account.

Default settings should be fine, but can be modified if you really want to, using the set command (default values specified between parens) or in the Astrometry tab of preferences. How wide the range of allowed scales is (15%), how big the radius of the search from initial coordinates is (10 degrees), the polynomial order for field distortion (0, disabled), removing or not the temporary files (yes), using the result as new default focal length and pixel sizes (yes).

Index files

Astrometry.net needs index files to run. We strongly recommend you use the latest index files available from their website, i.e. the 4100 and 5200 series. The field of view of each series is described in their github page. (the official documentation does not yet include this table).

On Unix-based system, you can just follow along the instructions in the documentation.

On Windows, if you are running ansvr, those recent index files will not be made available by the Index Downloader. You can still download them separately and store them where the other index files are kept (would recommend to remove the old files, although it may mess up the Index Downloader).

How it works

Just like the internal solver, Siril will proceed with extracting the stars from your images (so as to benefit from internal parallelism) and submit this list of stars to astrometry.net solve-field. If you then want astrometry.net to crawl the index in parallel, you will need to specify it through the astrometry.cfg file.

Solving sequences

When a sequence is loaded, an additional GUI element is present at the bottom of the dialog.

Sequence astrometry options

Sequence astrometry options

You can specify to solve the whole sequence. By default, the images already solved will be solved again unless the Skip already solved images box is ticked. To use Astrometric registration, you will need to process the whole sequence so that useful information is stored with the sequence (FWHM, number of stars, background level...), so leave this box unticked.

When using Siril solver with local catalogues or when using Astrometry.net, the information contained in the header (if present) will be used to update the image target center and resolution for each image. However, when using Siril solver with online catalogues, a single star catalogue will be downloaded by default to avoid too much network traffic and server requests. If the images do not have too much drift and the same resolution, this is normally sufficient. However, if the images do not have enough overlap or different sampling, you can force downloading one star catalogue per image by ticking the Fetch stars for each image box.

Finally, the 3 boxes at the bottom will enable to control if the platesolver should read target coordinates, pixel size and focal from each image header or the values specified in the dialog.

At the end of the sequence solving, the log will report how many images were solved and if any were skipped.

Sequence processing succeeded.
Execution time: 676.35 ms
3 images successfully platesolved out of 3 included
(2 were already solved and skipped)

Solving sequences is also available via the command seqplatesolve.

Note

When solving FITS sequences or a FITSEQ file, the images are directly saved, without creating a new sequence. For FITS sequences, if the sequence was created using symbolic links, the original files are not updated. Instead, the name of the symbolic link is used to create a new FITS file, leaving the original untouched. When solving a SER sequence, a new sequence with the prefix ps_ is created as SER cannot store WCS data.

Star detection

By default, the star detection uses the findstar algorithm with the current settings. It works very well to find many stars, but in some occasions we would like to detect the stars manually, or simply view which are used. A first step would be to open the PSF window and launch star detection, then adjust the settings (see the related documentation documentation).

Another approach would be to select the stars one by one by surrounding them with a selection then via a right click, choose Pick a Star. The more stars selected, the more likely the algorithm is to succeed.

Then in the astrometry window, expand the star detection section and activate the Manual detection. Instead of running findstar, it will use the current list of stars.

Understanding the results

When an astrometric solution is found, we can see in the Console tab this kind of messages:

Up is -5.26 deg ClockWise wrt. N
Resolution:      3.051 arcsec/px
Focal length:  254.21 mm
Pixel size:      3.76 µm
Field of view:    04d 51m 58.27s x 03d 01m 1.21s
Image center: alpha: 21h02m02s, delta: +68°10'48"
Was 119.64 arcmin from initial value
Saved focal length 254.21 and pixel size 3.76 as default values
Flipping image and updating astrometry data.

The astrometric solution gives us the J2000 equatorial coordinates of the image center, the projected horizontal and vertical dimension of the image on the sky, the focal length that could give this field for the given pixel size and consequently the actual image sampling, the angle the image makes with the north axis, the field of view and image center. It also tells what was the distance with the initial specified center.

If it fails, check that start coordinates and pixel size are correct and try changing the magnitude, this will change the amount of stars downloaded from the catalogs, and maybe more stars will be identified. If Siril's plate solve won't find a solution, it is still possible to use an external tool to do it, the solution will be written in the FITS header either way.

Visualizing distortions

To check the validity of the solution, you can use the conesearch command. This should display stars positions found from catalogues and inspect if they match with the actual stars in the image.

The two images below shows annotations in the top right corner of an image with significant distortion. The top one is the linear solution while the bottom one has been solved accounting for cubic polynomials.

Image linear solution

Stars annotations with linear solution

Image cubic solution

Stars annotations with cubic solution

If platesolving with distortions is sucessfull, the disto command can display a representation of the corrections as an overlay on the image.

Siril command line

disto [clear]
Shows distortion field on a plate-solved image which solution includes distortion terms

Pass option clear to disable

An example is shown below.

Image with distortion overlay

Image with distortion overlay