astap.png ASTAP, the Astrometric STAcking Program                        ASTAP Forum
             astrometric (plate) solver, stacking of images, photometry and FITS viewer


For MS Windows 64 bit:

For MS Windows 32 bit:

For Linux 64 bit:           
For Linux 32 bit:
For Raspberry PI, 32 bit: 
For Raspberry PI, 64 bit: 

For MacOS 64 bit:
  Donations are welcome:

ASTAP introduction

ASTAP is a free stacking and astrometric solver (plate solver) program for deep sky images. In works with astronomical images in the FITS format, but can import RAW DSLR images or XISF, PGM, PPM, TIF, PNG and JPG  images. It has a powerful FITS viewer and the native astrometric solver can be used  by CCDCiel, NINA, APT or SGP imaging programs to synchronise the mount based on an image taken.

Main features:
  1. Native astrometric solver, command line compatible with PlateSolve2.
  2. Stacking images including Dark Frame and Flat Field correction. 
    • Filtering of deep sky images based on HFD value and average value.
    • Alignment using an internal star match routine,  internal astrometric solver or a call to a local version of
    • Mosaic building covering large areas using the astrometric linear solution WCS or WCS+SIP polynomial. 
    • Background equalizing.
  3. FITS viewer with swipe functionality, deep sky and star annotation, photometry and CCD inspector.
    • FITS thumbnail viewer.
    • Results can be saved to 16 bit or float (-32) FITS file.
    • Export to 16 bit PNG, 16 or 32 bit integer TIFF files, 16 bit PPM/PGM  files for best preservation or simple 8 bit PNG, BMP or JPEG.
    • FITS header edit.
    • FITS crop function.
    • Automatic photometry calibration against Gaia database, Johnson -V or Gaia Bm
    • CCD inspector
    • Deepsky and Hyperleda annotation
  4. Some pixel math functions and digital development process
  5. Blink routine.
  6. Photometry routine
  7. Available for 32 & 64 bit MS-Windows and Linux 64 bit., MacOS, Raspberry-Pi

Stacking of images:

Stacking of astronomical images is done to achieve a greater signal to noise ratio, prevent sensor saturation and correct the images for dark current and flat field. Additional imperfect images due to guiding, focus  problems or clouds can be removed.

This is a screen short of the stack menu. It contains several tabs for the file list and settings. File can be sorted on quality and values.The image can be visually inspected in the viewer by a double click on the file or using the pop-up menu.

Program requires FITS images or RAW files as input for stacking, but it can also view 16 bit PGM /PPM files, XISF files or  in 8 bit  PNG, TIFF or BMP files. For importing DSLR raw images  the program
DCRAW from David Coffin is used.
For stacking the internal routine compares the image star positions to align.

To uncheck/untick poor images there is an option to do that automatically. First check mark the option "After analyse untick worst images". Then press button "analyse images". The images will be analysed and the images with abnormal (outliers) HFD values or  "Number of star detected" will be unchecked. The adjustable factor used is the standard deviation represented by the Greek lower case sigma σ letter. To undo you have to check the images manually again, e.q. with the popup menu of the right mouse button.

For a normal distribution you could expect the following:

Confidence interval Proportion within
1σ 68%
1.5σ 87%
2σ 95 %
2.5σ 98.8%
3σ 99.7%

Astrometric Solving:

ASTAP can be
used as astrometric solver to synchronise the telescope mount position with center position of an image taken with the telescope. Existing images can be solved to annotate, for photometry or the measure positions of unknown objects.

The ASTAP solver aims at a robust star pattern recognition using the catalog star coordinates in Equinox J2000. The solution is not corrected for optical distortion, refraction, proper  motion  of  stars and other minor effects all to be very minor.

The process astrometric solving is often referred to as a "plate solve". That was a correct description in the past, but in modern times there are no photographic plates involved in the process.

For the astrometric solution it can use either the internal solver or a local version of 

ASTAP is not:
A post processing software with advanced options like noise reduction and unsharp mask. It is only intended for convenient stacking of astronomical deep sky images.

Back to index

Program installation:


The installer will defaullt install it at c:\Program Files\astap . The single executable astap.exe can be used anywhere. 

Linux installation:

The program is provide as an debian archive astap_amd64.deb which can be installed with the default installer.  Executable will be placed in /opt/astap

MacOS installation:

The program is provide as pkg file. If MacOS doesn't allow to install, go to Apple Icon, System preferences, Security & Privacy and allow astap.pkg to be installed. The G17 star database and HyperLeda deep sky database are included.  

Program operation, stacking astronomical images:

The purpose of the stacking routine is to combine astronomical images to reduced noise and to flatten the image.

 Ideally you should have collected

Only light frames are essential.

The automatic stacking process in ASTAP goes through the following steps:
  1. The flats will be combined to an average and the combined average flat-darks will be subtracted to  have a near ideal presentation of the vignetting called the master flat frame.
  2. The combined dark frames called master dark will be subtract from the light frames to extract the pure deep sky signal.
  3. The combined light frames, dark compensated in 2) will be flattened by dividing it by the master-flat resulting in the final deep sky image. Prior to this a small 2x2 or 3x3 median filter is applied  the master flat to reduce noise.

Operation of the stacking program

Start the ASTAP program. (In MS-Windows astap.exe, in Linux astap)

Call up the stack window using the Σ button.

a) Select frames
In tab
images, dark, flats, flat darks, select the select the images, dark, flats, flat darks (bias) frames. In most cases you could select all frames in tab images. The program will move the fames to the corresponding tab during analyse.

b) Analyse and remove bad frames
n tab images (for the light frames), press analyse and remove manually any poor image. Poor images can be detected by a too high HFD (Half flux diamater stars), low number of stars or high background value( by clouds) .
Loss of tracking could result in too low HFD value. If required inspect each image by double on the file name. The list can be sorted by clicking on the corresponding columns. Using the pop-up menu selected bad frames can be renamed to *.bak for deletion later.

c) Set parameters in tab stack method
In tab stack method select the stacking method, average or sigma-clip-average. For OSC camera images  select "Convert OSC images to colour". Select the correct Bayer pattern (4 options). Test the required pattern first in the viewer with a single image. The source images should be raw (gray)  without colour produced by  astronomical camera's.

d) Set parameters in tab alignment
Leave this to the default star alignment. Leave the parameters "star alignment and astrometric alignment at default values.

e) Classify by check marks
Leave all check marks 
initially unchecked. These classify options can be used later to combine the correct darks and flats and to stack several image series in one operation.

f) Press the stack button.
The darks and flats & flat-darks will be combined in a master dark and master flat frame. Then the program will combine the light frames to the final image and save it automatically. This will take some time.

g) Export
Use the resulting FITS file. Crop the sides if required using the pop-up menu. Equalise the back ground if required using the tool in tab pixel math. Export as stretched JPG or 16 bit bit stretched TIFF.  The stretched export follows the gamma and stretch setting of the display.


All the program settings and file selections will be save by leaving the program or click on the stack button.

Back to index

Back to index

The stack menu:

Images, darks, flats can be added using the browse button or can be drag dropped on the form.

For a generic description how to stack see
Program operation, stacking astronomical images

Poor images can be filtered by either 1) HFD value,  2) Star detections,  3) Star-level or  4) Background value.

Stack multiple objects: Several objects can be stacked in one run. If the classify-by-object is check-marked, the program will stack all objects and save the results using the available darks and flats.

Analysing and removing of the bad ones: Before stacking the images can be analysed with the analyse button. Images with a high HFD value are most likely unsharp and can be inspected in the viewer by double click on the filename. The file can be renamed to *.bak by the pop-up menu to be removed later. Images with a high background indicating clouds or twilight should be removed/renamed to *.bak.

Sorting: Images can be sorted on any of the columns. For example if you click on HFD, the images will be sorted on HDF. You could then remove the images with the highest value or inspect them by double click on the file name.

Dark classification: If classify by exposure time and/or exposure time is check-marked the program will automatically select the correct darks or master dark. So it is possible to keep several dark files check-marked in the darks tab and the correct master dark will be selected automatically.

Colour stack and Colour filter classification: If
the classify-by-filter is check-marked, the stack routine will combine the available filters to a RGB image. If only Red + Green +Blue image are available they will be combined in a RGB image. If Luminance images are available it will first stack the RGB colors and then apply a most-common-filter and Gaussian blur on the RGB result. Finally the luminance image is coloured with the RGB result. The filter factor should be set typically near 20.

For nebula you could combine RGB or LRGB. If a luminance filter is detected the LRGB mode is used. First the RGB is combined, stars are removed using a most common filter, the image is then blurred with a Gaussian blur and and the colour is then applied luminance channel. Star colour is lost with this process. The filter names can be set in tab alignment

To record star colours use RGB only.

It could be better to stack in two steps. First prepare the Red, Green, Blue and Luminance stacks. Then run a stack again with the 
Red, Green, Blue and optional Luminance. Or if you could revisit the produced interim results in the RESULTS tab en copy them to the IMAGES tab using the pop-up menu. You could try different colout factors.

Image file names containing "_stacked" will be
un-checked by default to prevent stacks by accident are re-used. If required, just select the file and check-makr it again.

Organising images, darks, flats and flat-darks: Images placed in the first tab will be organised based on the FITS header keyword
IMAGETYP. So as soon you click on the image analyse button, dark and flats and flat darks/bias images will be move to the corresponding tab.

Keyword modification: The pop-up menu has option to update a keyword of multiple files if required.

OSC images (one shot colour images): To import raw files from digital camera, ASTAP can execute the command line program DCRAW from David Coffin. This program is included with the ASTAP Windows version. For Linux install by e.g. "sudo apt-get install dcraw.  See import
The stacking of  OSC images works best if you start with raw image before it is converted to colour. The raw colour images look mono, but the program will convert them later in the stacking process. There are 4 different Bayer pattern. They are identified as 00, 1,0, 0,1, 11 and can be set in
the stack tab "stack method". Try emperish which will result in the correct colours. Load a raw image in the viewer and convert it using tools menu option "convert bayer matrix"(CTRL+0). If the colours are not correct, just hit CTRL-Z to recover and try an other bayer pattern setting in stack tab "stack method"

Select for OSC image 2x2 mean for flats, see tab stack method. This will prevent any interfering patterns due to the 2x2 Bayer matrix.

Power down option after completion:  If stacking takes a long time you could activate this option and the program will be power-down the computer after completion.

  Clear  , button to remove all files from the list.

   ||        , button to stop blinking cycle.

    >>    , starts a continuous un-aligned blinking cycle. This is intended to find visually outlier images where guiding has briefly failed.

Results tab.

The stack results are reported in the results tab. By a double click they can be viewed the viewer. The number of files and exposure times are given. With the pop-up menu it is possible to copy the image file path to the clipboard for use in a file explorer.

Back to index

Stack method tab

Master flat:         Typical setting 2x2 mean

Darks filter:         Typical setting, apply Gaussian blur of 3.0 below
the noise standard deviation σ =2.5. For noise  CMOS sensor you could select restore hot pixel above σ.

Stacked image:    Best option is "Sigma clip average". For only 2 or 3 images or when you are in a hurry "average"will do.

Raw one shot colour images (OSC):
RAW images of  DSLR cameras /One shot color cameras are monochrome and have to be converted into colour images (after applying darks and flats). This converson is called demosaic or debayer. First set Bayer pattern correctly by loading a raw image (grayscale) in the viewer and try one of the bayer patterns till the image colours match in viewer. If not hit CNTRL-Z to undo and try a different Bayer pattern.

There are several methods to convert (demosaic/debayer ) the raw image  to colour:
  • AstroC, colour for saturated stars, as bilinear method but for saturated stars the program tries reconstruct the star colour. Select the range which matches with the value of brightest stars.
  • AstroM, white stars, as bilinear method but if there is an unbalance between the 4 red, 4 blue or 2 green pixels it uses luminance only. Effective for unsampled images and stacks of a few images only. Star colour is lossed if undersampled but star will become white.
  • Bayer drizzle, no interpolation but large amount of images are required. The raw image is coloured depending on the Bayer pattern and used in stacking. When sufficient images are stacked and there is some natural drift each position will get red, green or blues values averaged. For good stack result at least 100 images are required and the sky background and transparancy should be stable.
  • Malvar-He-Cutler 1), advanced method for interpolation developed for terrestial images but less suitable for OSC astro images. The background noise is lower.
  • Super-pixel, This simple and method reduces the image size to half. Super-pixel could be used if the images are near or over-sampled. If your using a H-alpha filter in front of an OSC camera, by using the super-pixel de-mosaic method, you could just remove the green and blue signal to create a noise free red image and then convert it to mono. This makes processing simpler. There is no interpolation between the R,G,G and B pixels, so any noise from G an B pixels can be separated from the red.

What to select:

The background colour noise can be removed with option "Background colour removal" in the pixel math tab of the stacking menu.

The DSLR OSC images will be automatic converted to FITS files by the DRAW program included (Windows, MacOS) or for Linux install by  command line "sudo apt-get install dcraw".

Oversize: This could be 0, 100 or larger. This overlap was introduced to show overlapping images. If you don't want a black area around the image set this value to zero.

If your using a monochrome filter like H-alpha, use the viewer Tool menu to split the images in R, G, G, B before stacking and use the R=red image for future processing.

The program settings will be saved automatically if your either exit the program or start a stack.

There is a test button for the flat filter. It will be applied on the image in the viewer, so load the flat first by double click on the fat file name.

Image stiching method (Mosaic)

Astrometric image stiching is possible with the internal astrometric solver or local version of The reference of each pixel is the astronomical position. So stacking is not done against a reference image but against an position array set by the first image.  You have to set the in tab alignment the settings for "Image stiching (method)" correctly. If you stitch 4 images, you have set "Mosaic width/height  in tiles:" at 2. This will provide enough space to place for the 2x2 mosaic.

Here a suggested work method:
  1. Stack the tiles separately using method "SIGMA-CLIP-average" and use for the alignment the internal STAR alignment method.  Inspect the resulting tiles and crop them if required. You can also crop them later automatically with "Mosaic skip outside pixels" Do this for each color separately if you have separate files.
  2. In tab  "stack method" select option "IMAGE STICHING METHOD" and select astrometic alignment using either the internal or the local for solving. (option --downsampling 2). 
  3. In tab "stack method", set the "mosaic width/height" correct and check-mark the option "equalise background".  If the input images have poor borders, set option crop images larger then 0%.
  4. Select the files. Most likely the files names contain "_stacked, so you have the check-mark the files after selection.
  5. Click on the button "Stack check marked images"
  6. Crop the stacked result using the image crop option in the viewer mouse pop-up menu.
  7. Adjusted the stretch range and save as JPEG, 90% quality.
Here an example mosaic x 4 of M31 made with ASTAP:

Here an example of a mosaic build of DSS images:

The size can be reduced by a crop function (right mouse button) later. Making the oversize too large could result in memory overload.

Back to index

The alignment menu tab:

For alignment there are three options, internal star alignment,  native astrometric solver or a local version of For mosaic building you have to use the internal astrometric solver or

 Internal star alignment

This internal star matching alignment is the best and fastest option to stack images. It is not suitable for mosaics. No settings, fully automatics alignment for shift in x, y, flipped or any rotation using the stars in the image. It will work for images of different size/camera's with some limitations.

The program combines four close stars into an irregular 2D tetrahedron or kite like figure (and compares the six irregular tetrahedron dimensions with irregular tetrahedrons of the first/reference image. It selects at least the six best matches and uses the centre position of the irregular tetrahedrons in a least square fitting routine for alignment. 

There is only two settings relevant but normally you don't have to change them.

The following image shows the irregular tetrahedrons used in an astronomical image:

Background info: A irregular tetrahedron (or triangular pyramid) drawn from 4 star positions has six edges. The five shortest edges are divided by the longest side to scale them independent of the image scale.  The final irregular tetrahedron definition is then the scaled length of the five edges, the centre mean position and the pixel length of the longest edge. For tetrahedron matching the scaled five edges are used. There scaled lengths will be independent on the image scaling. This will give a number of tetrahedron matches. From the matching tetrahedrons list,  the not scaled sixth edge is used to calculate the mean and 
standard deviation and outliers of more then 3 * σ are removed. (three times the standard deviation). From the remaining list of tetrahedrons, the central mean positions are used for LSQ fitting in two dimensions.

For each star, the  tetrahedron is constructed from the nearest stars. Some edges could overlap. Duplicates are removed. Duplicates could occur from four close but lonely stars. The tetrahedron selection can be demonstrated by the "draw tetrahedrons"button in the alignment tab. You could reduce the number of tetrahedrons drawn by the setting"maximum number stars used".

The process is described here
Background info, how does the ASTAP astrometric solving works internally

Astrometric alignment.

There are two option for astrometric alignment. The internal solver is quicker and adequate for most stacking. If somehow the alignment is not working it is possible to use a local version of  ""

   Internal astrometric solver (plate solver). The works with the same four star tetrahedrons as for the Star alignment option. The tetrahedrons are compared with the G17 star database (to be installed in the program directory). It has the following settings:

The internal plate solver works best with raw unstretched and sharp images of sufficient resolution where stars can be very faint. Exposures 5 to 300 seconds. Heavily stretched or photo shopped images are problematic. 

For those are interested:  
Background info, how does the ASTAP astrometric solving works internally local solver:

   Some guidelines for astrometric stacking using

Manual alignment.

This option allows alignment of the images based on a single star, asteroid or comet. If this option is activated, the list of images in the image tab turns red. Double click on each image in the list and click on the star/comet of asteroid to be used as reference. This object is then marked with a little purple circle. The position will be auto centered. (and the X,Y position will be added to the list) A poor lock is indicated by a square. If so try again till it is a circle. If all images in the list are turned green, so contain a value, then click on the stack button.

For objects which are moving in the sky, select the stack option "average" and not option "sigma clip".

Back to index

Blink tab

This tab allows to blink images and to measure variable stars. 

Blink comparator

This option allows rapidly cycle (blinking) through the images taken of the same area of the sky at different times. This will allow the user to spot easier moving objects. 

     ||      , button stops the blink cycle.  

     >      , button starts one blink cycle.

     >>   , starts a continuous blink cycle.

☑ Align images. With this option check-marked,the images will be aligned using star alignment.  The alignment will be refreshed after pressing "clear alignment"

☑ Filter out stars based on first image,  With this option check-marked,the stars will covered with a black circle allowing easier to spot moving objects.. The black cover size can be increased with option "star suppression diameter".  The star detection can be optimised with the  factor".

  Clea  r, button to remove all files from the list.

Export aligned This button allow the creation of aligned FITS images. If  blinking with alignment works well, stop blinking and hit this button  All images will be aligned copied to new files ending Alignment will be done against the first image in the list

Photometry tab

This tab allows measuring the magnitude change of one object in a series of images and detects automatically the four most variable objects.  The butttons work the same as in the blink tab.

Select the images to analyse. Click on one of the arrow buttons to cycle trough the images. Initially it will  go a little slow till all data is analysed.  The program will do the following:

  1. Cycle 1, Find an astrometric solution for all selected images and write the solution to the FITS file header. 
  2. Cycle 2. In a second cycle, the program will identify stars in the image and measure the star flux against the star database. The median flux/magnitude factor will be used later to measure the magnitude of any object in the image series. So prior to this install and use the G16,  Johnson-V version of the star Gaia database provided.
  3. At the end of cycle 2, it will mark the four most variable stars with a yellow circle.
  4. Click on any of the stars. A purple circle will mark the object. The measured magnitude of each image in the series will be written to the file list. This complete list can be exported to a spreadsheet using the pop-up menu allowing the creation a magnitude curve over time.
For maximum accuracy it is better to first to calibrate the images with darks,  flats & flat darks. This can be done using  the "calibration only"option in tab "stack method" and then executing the regular stack procedure.

Note that the measured star flux is compared and calibrated with the star database. For most cases you should install the G16 version containing the Johnson-V magnitudes. At the HNSKY  web page a Johnson-V version of the G17 is available. After stopping the cycle it is possible to measure any object using the mouse pointer.

Alignment of the images is done using the astrometric (plate) solution.  The photometric solution is stored in seperate files. The astrometric solution is written to the orginal file header. You can refresh the photometric and astrometricc calibration using the dedicated buttons for this.

The list contains three dates:
To convert the Julian Day to a date and time in the spreadsheet, subtract the Julian Day by -2415018.5 and format as date or time.

For a series of images, the standard deviation of the measured star magnitudes is typical better then 0.02 magnitudes. The star flux values should be below saturation (65500)  but reasonable high.

Note that it is beneficial to de-focus an image a little to prevent pixel saturation and spread the flux measurement over more pixels. It also allows longer exposure times. However the image should reasonable focused to allow solving.

Here an example of an exoplanet transit measured using the blink&photometry tab:

A demonstration is available at YouTube:

Measure variable stars

Back to index

Live stacking tab.

All file(s) in the specified directory will be stacked live. If it is finished it will wait for new file(s). If a file is detected which is 0.2 away from the previous files a new stack will be started automatically. You can save the stack results from the viewer menu .

To identify files which are processed , they are renamed to the extension *.fts. You can rename them back with the button at the bottom.

Back to index

Pixel math tab.

 Several options including background equalising.

Background equalization tool:

Back to index

Export FITS data to a spreadsheet:

To analyse the relation between the HFD value, focuser position, temperature and altitude it is possible to copy the data from a FITS image list to the operating system clipboard.

Just select a number of images, click on the analyse button. Then select all relevant files and copy the data with right mouse button. Then copy the data into a spreadsheet for analysis.

Here and example of the result in a spreadheet:

Back to index


If the program is associated with FITS image files or any other format, it will show the image as soon you click image file. Only one instance of ASTAP will be allowed. After clicking on the second image it will be show in the first instance of ASTAP. If you want to open a second instance, just start ASTAP. If the program is started without parameters, you can open more instances.

Images can be loaded from the file menu or can be drag dropped on the main form.

Besides all FITS formats, the viewer support most image formats in 8/24 bit of 16/48 bit format. It can export to any FITS format and 16/48 bit PNG and TIFF formats.

This ASTAP version can import raw images from almost any digital camera, For this ASTAP executes the  DCRAW program from Dave Coffin. DCRAW is included with the ASTAP Windows edition and can be installed in Linux by the "sudo apt-get install dcraw" command. 

The viewer has a preview function. After opening select "Preview FITS files". The preview is displayed in the ASTAP viewer. The current zoom and position is maintained so you could study the corner of a series images on image quality.

The file open menu with preview selected:

Thumbnail viewer for FITS files

ASTAP has a FITS thumbnail viewer (ctrl-T). This could be useful to browse your FITS files. By clicking on the thumbnail it will be opened in the viewer. With a right mouse button click some options are available as changing directory, copy, move, rename or rename to *.bak.

The thumbnail size is depending on the form size. Make it larger, the thumbnails will follow. Thumbnails are organized in 3*X. So the thumbnails are pretty big by purpose. The images are fully loaded in memory so it will consume some memory and time. So don't try get thumbnails of 400 images.

Back to index

ASTAP viewer screen shot:

Astrometric solving the image in the viewer

With the solve button it is possible to find an astrometric solution of the image loaded. For this the estimated celestial center position α, δ should be available. This position is normally retrieved from the FITS header. Secondly the estimated image height in degrees should be specified in the stack menu, tab alignment.  In the same tab alignment you can specify the search radius and down sampling. For successful solving see conditions required for solving.

For solving JPG, PNG or RAW files it is possible to add the object position as center position using the deep sky database. Double click on RA position in viewer and enter the object name. The position will be retrieved from the database. This position will be used as a start point for the solver.

Back to index

Batch conversion of  raw images from digital cameras

The viewer menu tools has a batch convert option. ASTAP will execute DCRAW with parameters -D -4 and this will produce 16 bit PGM raw files. ASTAP can read these PGM files and convert them to a 16 bit FITS. After conversion the intermediate PGM are no longer required and can be deleted manually. The FITS can be used in the stacking. The Bayer matrix conversion to colour will be applied later in ASTAP. With this method the full depth of the original RAW files will be preserved

This conversion is not required for ASTAP. Automatic conversion is integrated in the menus.
Back to index

Deep sky annotations  

If the image is solved, it is possible to add deep sky annotations. See pull-down menu TOOLS:

Back to index

Star annotation and photometry

A second menu option is to annotate the stars and auto calibrate the program for photometry. This can be done either by the G17 or G18 star database (G- magnitudes) or if you replace them by the G16. This database contains the calculated Johnson-V magnitudes.

Below, the image is 1) solved, 2) auto calibrated (using the G16)   The cursor is at a star and based on the flux of all know stars, the star Johnson-V mangitude is estimated to be 16.1. The stars are marked with the Johnson-V magnitude and  Bp-Rp color indication,

A third tools option is "Annotate stars with measured magnitude". The measured star flux is calibrated with the star database. If the Johnson-V version of the star database is used, the results match very accurate with AAVSO charts as demonstrated below. Camera was an ASI1600 with only an UV-IR block filter:

For best accuracy the image should be monochrome and one of the Gaia Johnson-V star databases should have been installed and selected (G16 or G17 Colour/Johnson-V). The image should have  taken with a Johnson-V filter or none (clear). The measured pixel values should be below saturation.

See also blink and photometry

Back to index

CCD inspector

The viewer has a CCD inspector under menu tools.  By reporting the median HFD value, sensor tilt and curvature the inspector will quickly show any problem of the imaging system. 

The image used for testing should be a single raw image with sufficient stars and not containing a disturbing large and bright deep sky object.  The exposure length should be long enough to image many stars but not too long preventing star saturation.

The routine will detect and annotate the stars with their HFD value and plot a tilt indicator in the image.

The following will be reported:

In addition an HFD plot is available. White areas indicate a star with an high HFD value. Darker areas indicate a lower value.

View menu

This menu has the following options:
Back to index

Batch conversion:

With the batch routine several FITS image can be "astrometric solved".   Raw images of OSC (color) sensors using a Bayer matrix can be converted to color.

Command line options:

ASTAP can imitate PlateSolve2 and add the plate solution to the FITS header. Also PNG, JPEG, TIF, BMP files can be plate solved if an estimate of the center position is given. See  Usage as astrometric solver and command line options:.

There is a big variation in FITS file keywords and usage. If your FITS file is not read, please send me the file for testing.

Back to index

Viewer popup menu:

Add label,  free text label at a x,y position. Not persistent

Add marker,
square marker at x,y position. Not persistent

Add object position, Enabled after astrometric solve. Will add the α,  δ at the mouse position. Orange if a lock is possible. Not persistant.

Add marker at  α,  δ position, Enabled after astrometric solve. Will add square marker at  α,  δ position. Persistent. Position will be save with "save settings"

Measure total magnitude within rectangle, Enabled after astrometric solve. The program will measure the flux and try to estimate the magnitude. Hold the right mouse down and pull a rectangle around the deep sky object, release mouse button and then select this menu.  For best accuracy the image should be monochrome and one of the Johnson-V star databases should have be installed and selected (G16 or G17 Colour/Johnson-V). The image should have been taken with a Johnson-V filter or none. The measured pixel values should be below saturation.

A demonstration is available at YouTube:  Photometry in the viewer

Remove all markers and labels. Will remove all none persistent labels.

Copy position to clipboard, Enabled after astrometric solve. Copies the α,  δ position to the clipboard.
Copy position to clipboard in  , Enabled after astrometric solve. Copies the α,  δ position in degrees to the clipboard.
Copy position to clipboard in radians, Enabled after astrometric solve. Copies the α,  δ position in radians to the clipboard.

Remove deep sky  object. Removes an deep sky object as part of the pixel math tab routine "equalise background tool".  Hold the right mouse down and pull a rectangle around the deep sky object, release mouse button and then and then select this menu.

Local colour smooth

Local remove colour.

Local Gaussian blur.

Local equalise tool.

Brighten a small area based on the corner values.

Remove borders. This menu allows to remove parts of the image near de borders.

Crop fits image. This allows the crop the image. Hold the right mouse down and pull a rectangle, release mouse button and then and the select this menu

Back to index

Usage as astrometric solver and command line options:

For images in the viewer:

The simplest way to solve an image is just to load an image in the viewer and hit the solve button. Some settings are available in the ∑  menu under tab alignment. 

The solution will be added to the fits header and center of the image will be displayed in the log ∑  menu. Click on the save button to save the FITS file with the solution. With the solution, the status bar will show the astronomical position of the mouse pointer.

Conditions required for solving:

The internal astrometric solver works best with raw unstretched and sharp images of sufficient resolution where stars can be very faint. Heavily stretched, saturated, out-of-focus or photo shopped images are problematic. It requires minimum about 30 stars in the image to solve. Images containing of a few hundred stars stars are ideal. For star rich images, the program will reduce the detection limit to limit the number of stars. This will only work for unstretched images where brighter stars have a greater intensity then fainter stars. So ASTAP requires three star dimensions for solving. The star x, y coordinates and star intensity. Oval stars due to tracking errors or severe optical distortion will be ignored and solving could fail.

Check list for successful solving with ASTAP:
  1. Estimated celestial center position of  image should be entered/available in the viewer α and δ input or passed by the command line. For FITS file this is normally read from the FITS file header and set automatically. In case you view an an  JPEG, TIFF image, double click on α input to search for a know deep sky object position from the database.
  2. Field of view of the camera should be available. This is the height of the image in degrees. See ∑ window, tab alignment, group-box astrometric settings. For FITS images this is normally automatic calculated from the header.
  3. Image height in pixels after ASTAP subsampling should be somewhere between 1000 and 3000. If it is higher set subsample at 2. If you specify 0 for subsampling, the program will select a subsampling factor automatically.
  4. Search radius should be set large enough. See ∑ window, tab alignment, group-box astrometric settings.  You could set this at 30 or larger up to 180.
  5. Stars in the image should be pretty round and camera in focus. You could verify the star detection by the CCD inspector or by  the "test button to show tetrahedrons" in the  ∑ window, tab alignment). Most stars should be detected.
  6. As a minimum about 30 stars should be visible in the image. They can be very faint stars, barely visible in the noise.
  7. For images filled with stars, only a few stars should be saturated. The total exposure time could be hours as long it is possible to separate the brightest stars from the faint by intensity.
  8. For bayered images (OSC cameras) or  large images use the  factor 2 downsample option. See ∑ window, tab alignment, group-box astrometric settings. Save settings if modified (Viewer pull down menu, file, exit (and save settings). You could also try auto auto selection of binning equals 0.
  9. If your image is full of hot pixels you could try the option "calibrate prior to solving". Select in the darks tab, a dark or darks with similar exposure duration as the lights you trying to solve. If your select several darks with  different exposure length, check-mark the option classify, "Dark exposure time". 
  10. The maximum number of stars to use should be defined. Typical set at 500. See ∑ window, tab alignment. If your images has large dimensions and due to a long exposure time is full of  tiny, stars you could try  increase the maximum number of stars to 1000 or more. For short exposures this is not required.
  11. Tetrahedron tolerance should be defined. Typical set at 0.005. If you expect optical distortion set it higher.  See solver window, tab alignment.  Solving of wide field images covering a field of 10 degrees or more will most likely fail. 
  12. For some failures you could force in ASTAP the option "force large search window" (-speed)  for more reliable solving. The reliability will be very high but speed two or three times slower.
Above options can be set using the ASTAP style command line.

Support is available via the forum

Command line, ASTAP style

The program can be executed using command line options to solve images astrometric . E.g.  ASTAP -f  home/test/2.fits   -r 30 

The program will accept FITS files, JPG, PNG, BMP, XISF or TIF files.

ASTAP astrometric solver command line
The FOV, RA,DEC options are intended for none FITS files.
Not required for FITS files having the values in the header.
parameter unit remarks

help info

help info
-f file_name
File to solve astrometric.
-r radius_search_field degrees The program will search in a square spiral around the start position up to this radius *
-fov field_height_of_image degrees Optional. Normally calculated from FITS header.  *
-ra center_right_ascension hours Optional start value. Normally calculated from FITS header.
-spd center_south_pole_distance
degrees Normally calculated from FITS header *
The declination is given in south pole distance, so always positive.
-z down_sample_factor
0,1,2,3,4 Down sample prior to solving. Also called binning. A value "0" will result in auto selection downsampling. *
-s max_number_of_stars
Limits the number of star used for the solution. Typical value 500. *
-t tolerance
Tolerance used to compare tetrahedrons. Typical values 0.003 to 0.007. *
-speed mode
slow / auto "slow" is forcing of reading a larger area from the star database (more overlap)  to improve detection. *

Name the output files with this base path & file name
-analyseAnalyse only and report in the errorlevel the median HFD * 100M + number of stars used. So the HFD is trunc(errorlevel/1M)/100
-logWrite solver log to file with extension .log

Update the fits header with the found solution *

Produce a deep sky annotated jpeg file with same name as input file extended with _annotated *
-tofits binning 1,2,3,4,6,8 Produce binned FITS file from input png/jpg *

* Defaults can be set in the program. Shortcut CTRL-A, tab alignment

Commandline parameters have priority above fits header values. Front-end programs should provide access to -z and -r options. Default value for -z should be 0 (auto).

Typical command lines:

astap.exe -f image.fits  -r 50 -z 2

astap.exe -f c:\images\image.png  -ra 23.000  -spd 179.000  -fov 1.3  -r 50  -z 2

For most FITS files the command line can be short since telescope position and field of view can be retrieved from the FITS header. If a FITS file is not available, preference is a non lossless image format like .PNG or .TIFF or RAW like .CR2.  If possible in 16 bit or original 12 bit format. Not stretched or saturated, as raw as possible. For formats other then FITS the RA,DEC position and -fov (image HEIGHT in degrees !!) should be added.

Blind solving performance for a 90 degrees offset:

ASTAP blind solver performance. Solving a 50 seconds exposed monochrome image of M24, 2328x1760 pixels covering a field of 1.75 x 1.32 starting 90 degrees more north at position 18:17, +72d 00 

Maximum stars set Tolerance set Astrometric solving  time
500 0.005 147 sec.
250 0.005 103 sec
150 0.005 92 sec
100 0.005 70 sec

Reducing the "maximum number of stars to use" will result in a faster solving but also an increased risk of solve failure.

In command line mode the program produces two output files at the same location as the input image. A .wcs file containing the solved FITS header only and an INI file using the standard FITS keywords.

Example of the INI output file:

PLTSOLVD=T                                     // T=true, F=false
CRPIX1= 1.1645000000000000E+003               
// X of reference & centre pixel
CRPIX2= 8.8050000000000000E+002                // Y of reference & centre pixel  
CRVAL1= 1.5463033992314939E+002                // RA (J2000) of the reference pixel [deg]                   

CRVAL2= 2.2039358425145043E+001                // DEC (J2000)of the reference pixel [deg]                   
CDELT1=-7.4798001762187193E-004                // X pixel size [deg]
CDELT2= 7.4845252983311850E-004                // Y pixel size [deg]
CROTA1=-1.1668387329628058E+000                // Image twist of X axis [deg]
CROTA2=-1.1900321176194073E+000                // Image twist of Y axis [deg]                
CD1_1=-7.4781868711882519E-004                 // CD matrix to convert (x,y) to (Ra, Dec)  
CD1_2= 1.5241315209850368E-005                
// CD matrix to convert (x,y) to (Ra, Dec)                                   
CD2_1= 1.5534412042060001E-005                 
// CD matrix to convert (x,y) to (Ra, Dec)             
CD2_2= 7.4829732842251226E-004
                // CD matrix to convert (x,y) to (Ra, Dec)

The reference pixel is always specified for the centre of the image.

If the ASTAP is command-line executed in MS-Windows, it will be shown by a small ASTAP tray icon on the right side of the status bar. If you move the mouse to the ASTAP tray icon, the hint will show the search radius reached. To refresh the value move the mouse away and back. 

If the search spiral has reached a distance more then 2 degrees from the start position then a popup notifier will show the actual search distance and solver settings:

  1. The first line indicates the search spiral distance (8) from the start position and the maximum search radius (90)
  2. The image height in degrees. 
  3. Downsample setting and the input dimensions of the image to solve. 
  4. The α and δ of the start position. 
  5. Speed normal (▶▶)  or small steps (▶)
See conditions required for solving to fix solve failures.

Tray icons are default off in the latest Win10 version. To set the ASTAP tray icon on, start a solve via the imaging program, go to Windows  "Settings", "Taskbar", "Turn system icons on or off" and set the ASTAP tray icon permanent "on" as shown below:

Usage as a solver with other programs or as PlateSolve2 substitute

Back to index

CCDCIEL, using ASTAP as solver.

ASTAP is a menu option in the CCDCIEL program. Just select ASTAP and follow the guidelines in the help file. 

Progress is shown in tray icon and popup notifier.

Solving should be reliable. In case of failure, have a look to conditions required for solving.

Back to index

APT: using ASTAP as solver

For APT, Astro Photography Tool use it a PlateSolve2 substitute

  1. Install ASTAP and additional install the G17  star database in the same directory. Typical c:\program files\astap
  2. If you images are more then 3000 pixels wide, start ASTAP. and  click on the ∑  button, select alignment tab and set downsample to 2 (or 3). Save settings by selecting menu FILEe, SAVE SETTINGS, or leave program with menu FILE, EXIT.
  3. Rename the ASTAP.EXE program as Platesolve2.exe  Then select in APT, pointcraft, settings, the directory where this surrogate platesolve2.exe ( renamed astap.exe) is located.

That all. You could now test it with a saved image. To modify the ASTAP default settings, see  astrometric_solving


If you want to visualise the images taken in the map of  the HNSKY planetarium do the following:

Start ASTAP manually (PlateSolve2.exe). Click on the ∑  button, select the alignment tab. Check mark "Convert to FITS"  and set "FITS bin" at x4 or x6 r or x8.  Downsample should be set such that the file dimension are near 300 or 400 pixels wide/height for speedy display in the planetarium program.

Note that APT saves the pointcraft image to solve to: .... TemporaryStorage\ImageToSolve.jpg

Set in HNSKY the FITS path to .... TemporaryStorage\ImageToSolve.jpg  (This is the location where APT saves the pointcraft image to solve to)
After solving, either refresh HNSKY with space bar or move to map to the object or open the FITS file in the file menu.

Progress is shown in tray icon and popup notifier.

Solving should be reliable. In case of failure, have a look to conditions required for solving.


  1. ASTAP loads the image specified  in the command line. (from APT)
  2. ASTAP solves the image.
  3. The solution is written to the APM file. APT will read it.
  4. If set in the ∑  alignment menu, the JPG is saved as FITS with binning as specified. The FITS file will also contains the solution and could be displayed in a planetarium program. Downsampling should be set such that the file dimension are near 300 or 400 pixels wide/height for speedy display in a planetarium program.
Screenshot APT using ASTAP:

Back to index

NINA, Nighttime Imaging N Astronomy

For NINA version 1.9
  1. Install ASTAP and additional the G17 star database in the same directory. Typical c:\program files\astap
  2. If the height of your images is more then 2500 pixel, select downsample factor 2 else 1.
  3. Other settings as below:

To modify the ASTAP default settings, see astrometric_solving

Progress is shown in tray icon and popup notifier.

Solving should be reliable. In case of failure, have a look to conditions required for solving.

Back to index

SGP, Sequence Generator Pro:

For SGP use ASTAP as a PlateSolve2 substitute. The orginal PlateSolve2.exe is located at C:\Users\you\AppData\Local\SequenceGenerator\     Where "you" is your user name.  You can access this directory also directly by %LOCALAPPDATA%\SequenceGenerator

  1. Install ASTAP and additional install the G17 star database in the same directory. Typical c:\program files\astap
  2. If you images are more then 3000 pixels wide, start ASTAP.  and  click on the ∑  button, select alignment tab and set downsample to 2 (or 3) 
  3. Copy or move the astap.exe  and all 290 files with extension .290  to C:\Users\you\AppData\Local\SequenceGenerator\
  4. Rename the original Platesolve2.exe to something like PlateSolve2ORG.exe
  5. Rename ASTAP.exe to PlateSolve2.exe
  6. Test it with SGP. The confidence will be always 999. No PlateSolve2 window will be shown.

Progress is shown in tray icon and popup notifier.

If you select in SGP the PlateSolve2 setting "Max Regions" (=3000) this will force a search up to 90 degrees diameter. However the solver will be most likely stopped halfway by a SGP timeout.

Solving should be reliable. In case of failure, have a look to conditions required for solving.

Back to index


For Voyager use ASTAP as a PlateSolve2 substitute. The original PlateSolve2.exe is located at  C:\Program Files (x86)\Voyager 

  1. Install ASTAP and additional install the G17 star database in the same directory. Typical c:\program files\astap
  2. If you images are more then 3000 pixels wide, start ASTAP.  and  click on the ∑  button, select alignment tab and set downsample to 2 (or 3) 
  3. Copy or move the astap.exe  and all 290 files with extension .290  to  C:\Program Files (x86)\Voyager
  4. Rename the original  Platesolve2.exe to something like PlateSolve2ORG.exe
  5. Rename ASTAP.exe to PlateSolve2.exe
  6. Test it with Voyager. E.g. in the OnTheFly section. Confidence will be reported as 999.  E.g. Solved (J2000) => RA 19 59 36,167  DEC 22 42 36,31  PA 277,4 Res. 1,17 [as/px] FL 1131,77 [mm] Star/s 999

Progress is shown in tray icon and popup notifier.

Solving should be reliable. In case of failure, have a look to conditions required for solving.

Back to index


Installation as solver for ModelCreator:

  1. Install ASTAP and additional install the G17 star database in the same directory. Typical c:\program files\astap
  2. If you images are more then 3000 pixels wide, start ASTAP.  and  click on the ∑  button, select alignment tab and set downsample to 2 (or 3) 
  3. Select as solver astap (new) or platesolve2 and set the path to c:\program files\astap\astap.exe.

Solving should be reliable. In case of failure, have a look to conditions required for solving.

Back to index

Installation of the external solver:


Install a local copy of (via ANSVR  or  Astrotortilla)   as the astrometric solver. Or alternatively if you have Win10, 64 bit Creation edition you use the new Linux sub-system

ANSVR: The ANSVR link contains a newer compilation of made for SGP. It runs as a Linux program under Cygwin in MSWindows. Follow up to installation step 9. The link you have to put in ASTAP is as follows:


Adapt "user_name" to the login name used in Windows.

The server program ANSVR is not required. Remove the ANSVR shortcut in the startup menu. Location:

C:\Users\user_name\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup

Alternative Linux sub-system in Win10 64bit Creators edition

Path for the solver program
ANSVR installation:
Astrotortilla installation:
Win10 subsystem:

Linux installation:
The single executable astap could be used anywhere. Standard directory could be c:/opt/astap but also at your home folder.

If you want to use  this is described at installation. To get the solver type: sudo apt-get install libcairo2-dev libnetpbm10-dev netpbm libpng-dev libjpeg-dev python-numpy python-pyfits python-dev zlib1g-dev libbz2-dev swig libcfitsio-dev   You also have to download index files.

Path to the solver program "solve-field" could be:


Appendix 1, the stack process:
The stacking process for one shot color color camera's will be mathematically executed as follows:

The master flat is calculated as:

master flat: = (1/n ∑ [flat] - 1/n ∑ [flat darks] )

Where a bias image could be used as flat-dark image. The master flat should be averaged by a 2x2mean to remove Bayer matrix artifacts.

Each image is calculated as:

(image- {∑ [darks]/n} ) / master flat

Then the Bayer matrix is applied and finally the images are stacked in mode average or sigma clipped.

So for average stack:

final image:= 1/n ∑ Bayer(image)

Back to index

Send a message if you like this free program. Feel free to distribute !

Succes,  Han  K

Counter since 2017-11-15: