|
Iris
This and following steps are all done in Iris, a
powerful freeware astronomy image processing program. The possibility
to use the command line interface contributes to its power and flexibility,
but does make learning it a challenge. More on Iris can be found
here.
|
|
An important concept in Iris is that the image that you
see on screen is just a visualisation of an underlying .fit file that has 16
bit depth, ie 32676 levels. What you see depends on the visualisation
threshold that you set. Look at the Threshold dialog box in the
diagram below. Any part of the image above the level set in the upper
slider is displayed as pure white. Any level below the number set in
the lower slider is displayed as pure black. This is useful because
astronomical images have huge dynamic range. The bright core of the
galaxy used in the example is at 19300 levels, but the faint arms are only
4300 levels over a background of 3700 levels. Taking the summed image,
see further down this page, if you type the command;
visu 20000 0
ie. setting the higher threshold to 20000 and the lower
to 0, you will see just the core. The visual information on the arms
will be in the lowest few percent of the image and will not be visible.
The command;
visu 8000 2000
gives a good balance and shows both the core
(overexposed) and the galaxy arms well. To examine the arms in more
detail, use the command;
visu 5000 3700
This shows the core completely overexposed with no
detail, but the arms will be visible in great detail.
None of these operations has changed the underlying file
in any way.
|
|
Convert to FITS format
In Iris, the .bmp files that are
exported from K3CCDTools are converted to FITS using the convertbmp
and convertbmp24 commands for the Y (grayscale) and RGB
frames respectively.
I end up with 4 sets of image and dark frames in FITS format, for each of
the Y, R, G and B channels.
|
 |
Subtract dark frames
Obviously dark frames do not need to
be aligned before stacking, so the Y dark frames are added together and
averaged and the same is done for all of the R, G and B dark frames.
I mainly use the command console - Iris was designed that it's best used
that way. The commands I use are (eg. for 30 frames, named dy1.fit,
dy2.fit .... dy30.fit);
add2 dy 30
mult 0.0333
(this gives the average dark frame)
save darky
(saves the file darky.fit)
To make the R dark frame simply move the cursor in the Command box back
up to the commands above and for each command in turn, change the letter 'y'
to 'r', then press Enter. This assumes that the raw dark frames for
the R component are named dr1.fit etc. One of the nice things about
Iris is the ability to reuse commands in this way.
The appropriate averaged dark frame is
then subtracted from each of the Y, R,
G and B frames. Here, the averaged dark frame darky.fit is subtracted
from the set of files ay1.fit to ay93.fit. The resulting files are
named dy1.fit to dy93.fit.
A consistent file naming convention helps to simplify work in Iris.
The convention I use is as follows;
Raw frames; Ay1.fit etc. , Ar1.fit , Ag1.fit ,
Ab1.fit
Dark subtracted frames; dy1.fit etc., dr1.fit,
dg1.fit, db1.fit
Registered frames; ry1.fit etc.
Sum of registered frames; addy.fit, addr.fit,
addg.fit, addb.fit
The simple change of a letter for each of the channels enables me to work
quickly at the Iris command line by reusing commands.

|
Aligning and Stacking
The Y image frames are aligned in
Iris. This is usually done using the register command after
selecting an isolated star.
Here I am registering the images dy1.fit to dy93.fit with reference to
the star within the drawn rectangle. The aligned images will be
written to the files ry1.fit to ry93.fit.
|
 |
Alternative methods for aligning
In cases where an isolated star
is not present on the image, or if the image is that of the moon or a
planet, the pregister command is used. This uses a Fast Fourier
Transform to match high contrast features on each frame - not necessarily a
single star.
If I am aligning images taken on different nights, or if image rotation
has otherwise occurred, I use the coregister command. This
powerful command will even compensate for some optical distortion, or
different scale in the images, such as if the images were
taken through different telescopes.
On alignment of the Y frames, Iris creates a file that records the
translation applied to each frame. So all that has to be done to align
each of the R, G and B frames (because they were each extracted from the
same exposure as the corresponding Y frame) is to use the file_trans
command. 
|
Summing the image
This is the magical part, where faint details previously hidden in the raw frames
appear. I use the
add2 or add_norm commands in Iris to add together each set of Y,
R, G and B images.
This is what the summed Y image of M83 looked like.
The maximum brightness level in this FITS image is 19296 and the
background level is about 3700. In terms of dynamic range this is a
very deep image. The upper threshold visualisation level set for this
image on the right is 8000, ie. all levels above 8000 are represented here
by pure white. The brighter stars appear bloated because of
this, but careful post processing will aim to reduce this and to show more
detail in the galactic core region.
|
 |
Checking for noise, or uneven background
At this point I
check the Y image for noise, or an uneven background. Even if not
apparent in the summed image slight problems will become magnified when
histogram stretching is applied to bring out faint details.
Usually I use the log command in Iris as a crude histogram stretch to see
if any corrections need to be done. Here's part of the log image for M83.
Note that fainter features in the arms are now clearer,
but noise has increased. The fine bands are still present, but are not too bad, and the image background looked
fine, so in this case nothing more was done. If unacceptable noise had
been present the wavelet_filter command would have been used. (New:
for an alternative method of removing the banding, see the
Advanced Processing page.) For
correction of an uneven sky background see the Iris website, in particular
the synthe command. In the R, G and B summed images, I usually do
not worry too much about noise as this will be eliminated in the process of
making the YRGB composite. However an uneven sky background if present
in any of the colour channels will result in an unpleasant colour cast in
part of the final image, so should be removed. |
|

|
Export to Photoshop
The next steps will be carried out in Photoshop, but first we have to get
the summed images into a suitable format. Doing histogram stretching on 8 bit depth images is very unsatisfactory.
The resulting images will lack smooth gradations of tone as the stretching
process causes gaps to appear in the image histogram.
The problem is that the normal image file formats that Photoshop uses to
talk to other programs, eg. .bmp or .jpg are 8 bit ones. Photoshop
does handle 16 bit images, but only in the native .psd format as well as RAW
and TIFF.
Iris is able to export files in RAW format.
Since Iris uses FITS standard signed 16 bit integers, but Photoshop expects
only the positive half of this range (so actually only 15 bits), it is
necessary to ensure that there are no negative numbers in the exported
image. The command line "clipmin 0 0" does this - it sets any
value below 0 to 0.
To export, the command Iine is
"export y.raw 0 2 0". The first parameter is the file name for the
exported image, the 2nd is the size of the header block, the 3rd indicates a
two byte per pixel format, and the 4th specifies IBM byte order (as opposed to the
Motorola, reversed, order).
I export each of the R, G, B images as individual RAW files. As
Photoshop is not able to combine different 16 bit channels, these 3 files
need to combined into a single RAW file that Photoshop will read as an RGB
image. I do this at Windows XP's Command Prompt using the command
"copy /b red.raw + grn.raw + blu.raw rgb.raw". This combines the 3 individual files into a new file, rgb.raw, that has
the RGB data in contiguous blocks.

Jan Timmermans
has produced an Excel file which shows tabulates the steps above and which
shows, step by step, the input and output files. You can download this
file by clicking
here.
I have made very little change to Jan's file so that the naming convention
used and the exact procedure will be a little different from that described
above. Nevertheless it provides good detail of the process. |
(Part 1, Introduction)
(Part 4, Noise Reduction and Colour)
(Advanced Processing)
|