General Description
    Known Users
Keywords Reference
I/O Formats

PreProcess version 2.08 is the most recent release of a CLI (Command Line Interface) tool for processing FITS format astronomical images.

PreProcess is an Open-Source software distributed under the GPL License and is available both as sources or executables for both Windows and Linux.

PreProcess exists since astronomical electronic sensors often produce huge amounts of raw images that all need very similar processing. PreProcess deals with such a high data rate performing fast and accurate reduction up to measurement ready scientific images. PreProcess is also optimized to run on multiprocessor systems (or HyperThreading ones).

PreProcess is a single executable software capable of composing or simply recentering sets of images, allowing simultaneously to apply filtering, perform supersampling or crop. It also performs basic calibrations such as astrometric and photometric reduction or generates colour images from multi-wavelengths source images.

Results supplied by PreProcess are even more impressive if simple of configuration and execution speed are taken into account.


Example 1: COMPOSING
Having the following samples from a dithered set of images of the M31 Galaxy (Andromeda Nebula) obtained at the Campo Imperatore Observatory:
Set of dithered images
Images samples and flat field

plus the flat field image and the bad pixels file (an ASCII list), issue the command:
prompt> preprocess compose.ppr
The following image is created:
FITS result image
Final image
Each image has been flat-fielded before composing and data redundancy is used to remove bad pixels and to improve signal to noise ratio. The improvement is more evident looking at details:
FITS raw image detail
Detail from the first original image

FITS processed image detail
Detail from the final image

Suppose to have the same input data as example 1, since dithering usually does not offset image by an exact number of pixels, the set of images contains somewhat more spatial resolution than it is simply represented by it pixel size. Preprocess could reveal this information by issuing:
prompt> preprocess subpixeling.ppr
The output image in this case has four time more pixels:
FITS result image
Final image
In this case before composing the images like in example 1 each pixel from each image has been mappend on four pixel (two by two array) obtaining a real resolution gain. To have good results from this method many images are required and a uniform subpixel level dithering is reccomended. Notice that fluxes are exactly maintained making the image photometrically identical to the one of example 1. Looking at images detail is more instructive:
FITS raw image detail
Detail from the first original image

FITS image detail
Detail from example 1 final image

FITS processed image detail
Detail from supersampled final image

Example 3: DETECTING
Suppose to have the following couple of images obtained from two dithered set obtained at different nights on galaxy NGC3190 with the AZT-24 telescope of the Campo Imperatore Observatory:
J band image on
J-band image
on March 13th, 2002
J band image on
J-band image
on May 14th, 2002
then issuing:
prompt> preprocess detection.ppr
the following image is created:
FITS result image
This is the difference of the original images resized to match the reference image (and its astrometric info), it clearly shows a new object to the N-W of the galaxy (SN2002CV) and an old disappeared object to the S-E (SN2002BO). The same two objects are barely visible in the original images.

Example 4: TRUECOLOR
Suppose to have the following set of Infrared images of the Trapezium region (Orion Nebula) obtained at the Campo Imperatore Observatory:
J band image
J-band image
H band image
H-band image
K band image
K-band image
It is possible to obtain a "real" color image by issuing:
prompt> preprocess color.ppr
This creates the following image:
FITS result image
Blue has been used for the shorter wavelength filter (J-band) and red for the longer (K-band).

General Description

PreProcess allows accurate and efficient astronomical images reduction.
To use PreProcess it is necessary to have one or more FITS format images to be processed and an ASCII configuration file describing the operations to be performed.

The allowed operations range from basic activities such as:

to recentering capabilities based on stellar sources with the possibility of scaling fluxes to match a fixed image and to resize images, to composing techniques such as: to some more specialized options such as distortion correction.

There also exist some useful calibration activities performed by PreProcess. The astrometric reduction is performed according to the original images WCS data and instrument capabilities as retrieved from the configuration file and obtaining stars true position from both professional or user defined catalogs. The best matching coordinates are calculated just moving and rotating the image in the hypothesis that any distortion has already been corrected using the dedicated option. If photometric data is available from the same catalog also the zero point is calculated.

Note that all operations performed on each image are registered inside FITS header.

The best starting point after running some of the supplied samples is to issue the following command:

prompt> preprocess -t

it creates a file called template.ppr to be used as starting point for any configuration file creation.
template.ppr contains all the available keywords with a short explanation, a more detailed explanation could be found in the PreProcess Keywords reference page.
Used I/O file formats are explained in PreProcess IO page.

PreProcess uses a special version of SExtractor to extract sources catalogs.

If you have any problem or question read the PreProcess FAQ or send me an e-mail at dipaola(at) using "PREPROCESS" as subject.


PreProcess is distributed both as source and binaries:
At first unpack the content of the PreProcess archive in a newly created directory and run the makefile to build executables. Then copy binaries and the content of the param directory to the final program directory. Add the directory to the PATH system variable and create a new variable named PPRPATH again with directory full pathname. On Linux if the installation is done in the standard directories (/usr/local/bin for executables and /usr/local/preprocess for the rest) it is not necessary to setup any system variable.
The Linux distribution consists of a RPM file that is installed typing rpm -i ppr-xxx.rpm.
The Windows distribution consists of an executable self-installing program.


PreProcess only handles images with square pixels and NOT accepts multi extention FITS images.
Besides all predefined parameters ($ImgFilter, $ImgTelescope and $ImgInstrument) are evaluated only once on the first processed image of the sequence.


PreProcess has been successfully tested on Windows and Linux PCs as well as on MacOS-X.
Sources and binaries are available for download for some systems.
Each sample archive contains images and a preconfigured script ready to run.

PreProcess changes log is available here.

(ver. 2.08)
Old Version
(ver. 2.06)
Sources none ZIP ()
Binaries Windows32 ()
Windows32 ()
Linux ()
Samples Example_1-2 (1146766 bytes)
Example_3 (116907 bytes) Example_4 (889223 bytes)


Staff Astronomer
INAF - Rome Astronomical Observatory
I-00040 - Monte Porzio Catone

Known Users

Rome Astronomical Observatory (IT), Campo Imperatore Astronomical Observatory (IT), Collurania Astronomical Observatory (IT), Pulkovo Astronomical Observatory (RU), St.Petersburg Astronomical Institute (RU), Crimean Astrophysical Observatory (UA) and REM Observatory (CL)