ash's "Diamonds from the Rough" Page
Primer on Processing Deep-Sky DSLR Images with Iris




Before?

After!!!

The art and science of processing astronomical images is a large and demanding subject, especially so for the beginner. With lots of new terminology, the many software packages to choose from, and the bewildering array of processing operations and options, it can leave even the most determined neophyte imager in a stunned stupor. In this article, I wish to share the procedure I use to transform the iffy-looking raw captures I acquire from my Canon Digital Rebel XT into images I can be proud of, using the fabulous image processing application called Iris.

Iris, written by Christian Buil, is truly a master work of software (and, astoudingly, it's freeware!) While it can be overwhelming in it's sophistication (not to mention downright scary in it's archaic dependence on a command-line style interface to access all that wonderful sophistication), it does include a "modern" menu/dialog style of interaction for much of the most-used functionality. In fact, as I will show in this article, you can transform your raw captures into personal masterpieces and only have to resort to the dreaded command-line for just 1 or 2 commands! For the screen shots that follow, I am using Iris version 5.32, so if your version is newer, there may be slight differences in the interface.

In this article, I do not attempt to rigorously convey the "why's" (there are many sources that already do a fine job of that), but rather the "how's", and specifically how with the Iris software. In addition, I intend to show just one possible route that a processing session can take, which is the one I currently favor because it is relatively quick and painless.

I assume you, the reader, have a DSLR (such as a Canon Digital Rebel), and that you have hooked it up to a telescope or lens and are able to acquire images from the equipment. For maximum quality, all images should be captured in the "raw" file format (for example, .CRW or .CR2 files for Canon-type DSLR's). The images can be downloaded from the camera using the camera manufacturer's software, or they may be captured to PC using 3rd party software (such as DSLRFocus that I personally use). Beyond that, I hope to inform! So let's get started!


Prerequisites

For illustration, I will use some raw captures of M31 I acquired the other night, using a Meade 152ED refractor operating at around F/6. I captured 20 frames of 3 minutes exposure each, at ISO1600 (which I found through experience is a good exposure time and ISO speed for this combination and my conditions). They aren't particularly perfect or excellent, but will do the job (see Figure 1). In addition to the raw "lights" (as these frames that include the subject are called), I also prepared for the processing job by capturing 3 other sets of frames that don't include the subject - these are so-called calibration frame sets, which are used to correct for various imperfections in the lights.


Figure 1 - A raw light frame (exaggerated brightness)

The first of the three sets of calibration frames are called "offset" (or sometimes "bias") frames. They are used to correct for the noise inherent in the camera electronics at a specific ISO setting. These frames can be taken once and reused for many imaging and processing sessions (assuming the same ISO setting is used), although it is a good idea to redo them every once in a while to make sure they represent the camera as it ages. To acquire them, set the appropriate ISO (ISO1600 in this case), cap the camera, lens, or telescope so that no light can enter, and shoot a small number of frames (5 or 7 or 9 is a good number) using the fastest shutter speed possible (this would be 1/4000th of a second using the Tv mode on my Rebel XT). The resulting raws are a bunch of unimpressive (but important!), nearly black images (Figure 2).


Figure 2 - A raw offset frame (extremely brightened to show detail)

The second set of three calibration frames are called "dark" frames. They are used to correct for the thermal and electro- luminescent noise that can build up during long exposures. Like offset frames, they should be acquired using the same ISO setting, and with a cap on the camera or lens to block out all light. Unlike the offset frames that can be taken anytime, dark frames must be taken at the same ambient temperature as the lights are taken (which usually means during the imaging session, right before or right after the lights). In addition, they should be taken using the same exposure duration (3 minute exposures in this case). Again, around 7 frames is a good number (Figure 3).

I know, I know - It seems like such a shame to waste valuable time that could be spent capturing lights on this, but it is a very important set of frames (as are the other calibration sets)! One consolation is that if the temperature remains fairly constant and the same exposure duration is used across a set of different subject light frame sets, you can get away with using the same darks for them! [In fact, by being extra clever and using more sophisticated Iris functionality (which I won't cover here), there are ways to make use of a single set of dark frames for many different temperature and exposure durations.]


Figure 3 - A raw dark frame (brightened to show detail)

Finally, the third set of three calibration frames are called "flat" frames. They are used to correct for certain optical problems caused by the camera and lens system (such as dust and dirt on the camera sensor or lens, and vignetting of the image due to the lens or telescope optics). These should be acquired at the lowest possible ISO setting (ISO100 for my Rebel XT). They should also be acquired with the cap off the lens or telescope, with the "subject" being something uniformly bright and whitish. There are various ways to find such a "subject": hang and evenly illuminate a large white posterboard on the wall nearby and aim the telescope at it; drape a thick white t-shirt over the lens and shine a flashlight on it; take advantage of dusk or dawn light and aim the telescope at the bright sky; or do like I do and aim the telescope at an X-ray film light box. Whatever the "subject", the desired result is a uniform and whitish, bland set of images almost but not quite overexposed (Figure 4).

The actual exposure time can be determined by using the histogram display on the camera - the "hump" in the histogram should be quite close to the right side of the graph, but no part of the image should be overexposed (these parts flash on and off on my camera preview screen). Once the appropriate exposure time is found, take a set of images at that speed (I put my Rebel XT in the Tv mode for this); again, around 7 frames is a good number. One very important point here: the flats must be taken with the same optical configuration as the lights were taken! This means that you mustn't reorient the camera in the focuser or alter the focus point!


Figure 4 - A raw flat frame (darkened to show detail)
Note the vignetting and dust spots!

Whew! Ok, now that we've got a set of lights, a set of offsets, a set of darks, and a set of flats, we are ready to fire up that Iris program and get a-processin'! But first, let me show you how I've got all these files arranged on my computer (Figure 5). I have a folder called 'captures_2006.08.26' that contains four sub-folders: 'dark', 'flat', 'm31', and 'offset'. They contain the raw image files for the dark frames, flat frames, light frames, and offset frames, respectively.


Figure 5 - Folders and files for the example

You are of course free to place your files anywhere you'd like, but since Iris operates within the context of a current folder, it should be clearer in the steps that follow for me to refer to this structure.


Step 1 - Create "Master Offset" Image

The first thing we need to do is to reduce the 3 sets of calibration frames to 3 single "master" calibration frames. To do this, we will handle each set individually, starting with the offset set. Once Iris is running, we need to tell it where we will be working on those offset frames, so use the File | Settings... menu item (Figure 6).


Figure 6 - Iris' File | Settings... menu item

This will bring up the Settings dialog (Figure 7) where we can enter the Working Path. In this example, it should be 't:\capture_2006.08.26\offset' (note that you can use the '...' button to bring up a Select directory dialog or you can just type it in directly to the edit box). While we're in here, make sure that the File type is set to PIC - this is the file format Iris will use for intermediate and output images, and is Iris' own proprietory file format that is similar to FITS, except that full color images can be stored and manipulated (just what we want!) Finally, press the OK button to save the settings.


Figure 7 - Iris' Settings dialog

Now that Iris knows where we want to work, and knows to use the PIC file format, we need to perform one more critical setup step - tell Iris what kind of raw files our camera produces. Press the little camera button on the toolbar (Figure 8) to bring up the Camera settings dialog (Figure 9).


Figure 8 - Iris' Camera settings toolbar button

Activate the drop-down list box in the Digital camera section to select your particular brand of camera [in my case, I have chosen the CANON (5D/20D/30D/350D) selection, since I have a Digital Rebel XT, also known as a 350D, which produces .CR2 image files]. While you're in here, make sure to choose the Linear radio button in the RAW interpolation method section (to prevent unwanted "mangling" of the raw images during conversions), and insure the White balance Apply checkbox is unchecked (since we'll fine tune the white balance later). Then press the OK button to save these settings.


Figure 9 - Iris' Camera settings dialog

With that setup out of the way, we are now ready to convert the raw offset frames into the PIC format so that further processing can be performed. Use the Digital photo | Decode RAW files... menu item (Figure 10) to bring up the Decode Raw files dialog (Figure 11).


Figure 10 - Iris' Digital photo | Decode RAW files... menu item

If you don't immediately see the Decode Raw files dialog, it has probably disappeared back behind some other windows you may have running - simply click the Iris button on the Windows task bar to bring it to the foreground.


Figure 11 - Iris' Decode RAW files dialog

At this point, the Iris user interface gets a bit fancy on us and expects us to "drag and drop" the files we want to decode into the big white area in the dialog. So, using Windows Explorer, go into the 'offset' folder and select all the raw offset files (Figure 12), then drag them into the big white area in the dialog.


Figure 12 - Selecting files in Windows Explorer

Now while still in the Decode RAW files dialog, we need to specify a "base name" for the new .PIC files we'll be producing, so enter something into the Name edit box (I keep it simple and just name it 'a', which will produce .PIC files named a1.pic, a2.pic, etc.) To initiate the conversion, press the ->CFA... button (Figure 13), which will initiate the conversion of our raw offset frames into the desired .PIC format frames.


Figure 13 - About to decode raw files in Iris

Iris will throw up a progress dialog (Figure 14) while it churns away converting our raw offset frames into new .PIC files a1.pic through a9.pic, stored in the current working folder.


Figure 14 - Iris' Progress dialog

Once complete, the Decode RAW files dialog again has control, so since we're done now, click the Done button to dismiss the dialog. A quick peek into the 'offset' folder should now show some new .PIC files. Now the actual distillation of multiple raw offset images-as-PIC-files into a master offset image can occur, and this is the easiest part! Use the Digital photo | Make an offset... menu item (Figure 15) to bring up the Make an offset dialog (Figure 16).


Figure 15 - Iris' Digital photo | Make an offset... menu item

In the Generic name edit box, enter the same base name used in the raw-to-PIC conversion ('a' in this example). Note that the Number edit box automatically contains the number of images to process (9 in this example), since that's how many were converted to PIC in the previous step. Then press the OK button and Iris will busy itself for a few moments creating our master offset image! You'll see some activity in the main screen area while Iris churns away, and when the activity ceases, the main screen area will contain the master offset image.


Figure 16 - Iris' Make an offset dialog

Now the master offset image needs to be saved to disk so that it can be used in subsequent processing steps. You can either select the File | Save... menu item or press the save icon on the toolbar (the 2nd button that looks like a floppy disk) to bring up the Save As dialog (Figure 17).


Figure 17 - Iris' Save As dialog

Make sure you specify the location to save in via the Save in dropdown list box (our 'offset' folder in this example), and enter a filename in the File name edit box (I chose the name 'offset'), then press the Save button. Another quick look in the 'offset' folder should reveal a new file called 'offset.pic' - congratulations, that's our master offset image!

Now, to be nice and tidy, we can get rid of the intermediate files used in this process: Use Windows Explorer to go and delete the a1.pic, a2.pic, etc. files in the 'offset' folder, since they will not be needed anymore.


Step 2 - Create "Master Dark" Image

Creating the master dark image is essentially like creating the master offset image, in that the same basic steps are employed: Convert the raw dark images from the camera into PIC files that Iris can manipulate, then use a special dialog to create the master image. One difference is that the in the creation of the master dark image, the master offset image is employed.

First thing we need to do is to tell Iris in which folder we'll be working, so just like in the previous step, use the File | Settings... menu item (Figure 6) to bring up the Settings dialog (Figure 7). This time, specify the folder where the raw dark frames are stored in the Working path edit box ('t:\capture_2006.08.26\dark' in this example), then press the OK button.

Now use the Digital photo | Decode RAW files... menu item (Figure 10) to bring up the Decode RAW files dialog (Figure 11). Use the same drag-and-drop technique to drag the raw dark files from the 'dark' folder into the dialog, specify a base name in the Name edit box (again, I use 'a' for simplicity), and press the ->CFA... button to initiate conversion. When Iris is done processing, press the Done button to dismiss the Decode RAW files dialog, and marvel at the new PIC files now living in the 'dark' folder (named a1.pic, a2.pic, etc.)

The final stage in creating the master dark is to use the Digital photo | Make a dark... menu item (Figure 18) to bring up the Make a dark dialog (Figure 19).


Figure 18 - Iris' Digital photo | Make a dark... menu item

The base name used in the previous raw-to-PIC conversion ('a' in this case) goes in the Generic name edit box, and the number of PIC files to consider is automatically entered into the Number edit box (in my case, I had converted 7 raw dark files in the previous raw-to-PIC conversion). But here's the twist - we need to specify the master offset image for Iris in the Offset image edit box. Iris automatically fills this in with the value of 'offset', which by some strange coincidence, is the same name we chose when saving the master offset! ;)


Figure 19 - Iris' Make a dark dialog

Before we can press the OK button to initiate the creation of the master dark image, we need to copy the master offset image into the current working folder. So use Windows Explorer to copy the offset.pic file in the 'offset' folder into the 'dark' folder.

One more decision needs to be made, and that is the Method to use for creating the master dark. I get good results using the Median selection, but after some experimentation, you may find you prefer another. If Median is chosen, it is a good idea to use an odd number of raws since the median operation works best that way (..and explains why I usually shoot an odd number of raw darks!) Now we can press OK to let Iris get to work!

After several moments of activity, Iris will have created the master dark image, which is displayed in the main working area. Again, this needs to be saved to disk, so use either File | Save... menu item or the save icon on the toolbar to bring up the Save As dialog box (Figure 17). Make sure the location to save is specified in the Save in dropdown list box (our 'dark' folder in this example), and enter a filename in the File name edit box (a good name to use is 'dark'). Press the Save button and verify that there is indeed a master dark image now living in the 'dark' folder, with the name 'dark.pic'.

Some quick cleanup to regain valuable disk space: use Windows Explorer to delete the intermediate a1.pic, a2.pic, etc. files in the 'dark' folder, as they are no longer needed. You can also delete the offset.pic file in the 'dark' folder too, since we still have a copy residing in the original 'offset' folder location.


Step 3 - Create "Master Flat" Image

As you can probably predict, creating the master flat image follows along the same lines as creating the master offset and master dark images: Convert raw flat images to PIC format, then use a special dialog to create the master flat. Like in the creation of the master dark, creating a master flat also requires consideration of the master offset.

First thing, tell Iris that we'll be working in the 'flat' folder, using the Settings dialog (Figure 7). Then use the Decode RAW files dialog (Figure 11) to specify the raw flat files and base name of the generated PIC files, and create the new PIC files. Finally, use the Digital photo | Make a flat-field... menu item (Figure 20) to bring up the (you guessed it) Make a flat-field dialog (Figure 21).


Figure 20 - Iris' Digital photo | Make a flat-field... menu item

Again, specify the base name of the PIC files ('a' in this case) in the Generic name edit box; the number of PIC files (9 in my case, automatically filled-in) in the Number edit box; and the master offset image to use (automatically filled-in as 'offset') in the Offset image edit box. Be sure to copy the master offset image 'offset.pic' from the 'offset' folder to the current working folder 'flat'.


Figure 21 - Iris' Make a flat-field dialog

One final decision here before pressing the OK button is what value to choose for the Normalization value edit box. I simply go along with the default value of 5000, which is also what the Iris website recommends - it might be worth exploring the implications of changing this value, but not for now.

Go ahead and initiate the creation of the master flat image by pressing the OK button. Iris will churn for a little while, and finally stop with the resulting master flat image displayed in the main working area. Save this to disk with the Save As dialog box (Figure 17), making sure to specify the 'flat' folder as the save location, and name the image ('flat' seems as good as any!) Verify the master flat image ('flat.pic') is in the 'flat' folder.

Clean up by deleting the a1.pic, a2.pic, etc. files, and the offset.pic file in the 'flat' folder.


Step 4 - Create "Cosmetic" File

A cosmetic file you say? Yes, this is yet one more calibration-type file that must be created in order to satisfy the powerful Iris routine we'll use in the next step. It is called a cosmetic file, and is derived from the dark master image. It could've been created back in Step 2 where the dark master image was created, but there was already enough details in that step to deal with that I didn't want to confuse things too much. So we'll create it now. Here's the first of two places where we'll need to resort to Iris' "dreaded" command-line interface (oh, it's not that bad!)

The purpose of the cosmetic file is to record and relate to Iris the flakey pixels in our camera. Flakey pixels are those that are "hot" (stuck on permanently), or very "warm" (abnormally bright). Iris will use this file to compensate for the bad pixels, and magically tame them. [FYI, the contents of this file is a list of coordinates that specify the locations of the bad pixels.]

First thing, let's switch back into the 'dark' folder: Use the Settings dialog (Figure 7) to tell Iris where to work. Now, since the cosmetic file is derived from the master dark image we created earlier, we need to load that into Iris. Either use the File | Load... menu item, or the open file toolbar button (the first button on the toolbar that looks like an opening folder) to bring up the Open dialog (Figure 22).


Figure 22 - Iris' Open dialog

Make sure the 'dark' folder is selected in the Look in dropdown list, then select 'dark.pic' and press the Open button. The master dark image is now displayed in the main work area. Now we need to call up Iris' command-line window, which is done by pressing the command-line button on the toolbar (Figure 23).


Figure 23 - Iris' command-line toolbar button

This will cause the command-line window to appear (Figure 24). Place the mouse cursor to the right of the '>' symbol and click. This will allow you to enter a command using the keyboard. Now type this in and press Enter: find_hot cosm 150


Figure 24 - Iris' Command window

What this is intended to do is create a file called 'cosm.lst', and fill it with coordinates of those pixels in the master dark image that have values of 150 or more. Now, if this includes too many pixels, Iris will throw up an error message saying something like Too many hot pixels (limit to 10000). If that is the case, return to the command-line window and adjust the 150 value up a bit, say to 250, and try again (i.e. edit the line by changing 150 to 250 and press Enter). If (or eventually when) there is no error message, you should notice a new window that popped up called Output (Figure 25).


Figure 25 - Iris' Output window

In the Output window, Iris will tell you how many hot pixels it recorded. The goal (according to the Iris website), is to get that number of hot pixels found to around 100 or 200 or so. So in my case, after using find_hot cosm 250, Iris found 963 hot pixels; this is too many, so I return to the Command window and adjust the value (upwards a bit in this case) in the attempt to get the number of hot pixels found to around 100 or 200. I eventually settle on a value of 372, which produces a list of 153 hot pixels - just about perfect. Now, if you go look in the 'dark' folder, you should see a file called 'cosm.lst' - this is the cosmetic file!


Step 5 - Calibrate the Lights

OK then - with the creation of the all the calibration files complete, we can actually use them now to correct the flaws in the actual light images! The overall process will be to convert the raw light frames into PIC format, then use a special dialog to apply all of our master calibration files to all the lights-as-PIC's. This is where the real power of Iris becomes apparent!

First thing (as always), we need to tell Iris the current working folder, using the Settings dialog (Figure 7). In this example, it's our 'm31' folder. Then use the Decode RAW files dialog (Figure 11) to specify the raw light files and a base name of the generated PIC files (we'll use 'a' again), and create the new PIC files. Finally, use the Digital photo | Preprocessing... menu item (Figure 26) to bring up the Preprocessing (digital photo) dialog (Figure 27).


Figure 26 - Iris' Digital photo | Preprocessing... menu item

You will notice that the Preprocessing (digital photo) dialog is a little more complex than the others we've seen so far. However, it operates in the same manner: For the Input generic name, specify the base name of the images files converted to PIC format ('a' in this case). You will notice Iris automatically fills in several fields, such as Offset, Dark, Flat-field, and Cosmetic file - luckily we've named our master calibration files the same, so no work needs to be done there! :) Also notice that the Number edit box is pre-filled with the number of light frames we just converted to PIC format. All that's left to do is to specify the base name of the series of calibrated light frames this routine will produce (for simplicity, I just enter 'b'), and check the Optimize checkbox (which will fine-tune the master dark frame to deal with the thermal noise present in our light frames - more Iris power!!)


Figure 27 - Iris' Preprocessing (digital photo) dialog

If you go ahead and press the OK button now, you will see Iris complain, with an error message Select first an image zone. Why? Well, since we want to have Iris optimize the master dark frame to deal with our light frames, Iris wants us to specify a location somewhere in our lights where there is no "target", but rather the background where nothing much interesting is happening and where there is just some background "nothing" (i.e. no stars, no nebula, just empty space). So, to do that, use the Open dialog (Figure 22) to select the 'a1.pic' file (make sure the correct Look in folder is selected), and press the Open button to load the first light frame-as-PIC file into the main display area.

Now we will find and "highlight" for Iris a suitably "nothing" area. However, this may be difficult - if so, it's time to discuss another floating Iris window that you may have already noticed, the Threshold window (Figure 28).


Figure 28 - Iris' Threshold window

The Threshold window is where we can adjust the view of the contents in the main working area (in this case, our light frame called 'a1.pic'). Go ahead now and manipulate the sliders and see what happens to the view of the image in the main working area. Depending on which direction and which slider is moved, the view will get lighter or darker. The top slider adjusts the "white point" of the image view, and the bottom the "black point". What is going on here? Well, since the light image typically contains more "bits" (12 bits for my Canon Digital Rebel, which actually got converted to 16 bits when it was made into a PIC file), and most PC display cards+monitors only show 8 bits (per color), Iris needs a way to allow you to see all the data present in the image, and provides the Threshold window for just this purpose.

With that brief description of the Threshold window out of the way, go ahead now and press the Auto button on that window. This will let Iris guess good values to set the sliders to so that the details in the main working area become apparent. Now, get back to finding a nebula and star-free area in the main view, preferably as close to the center of the image as possible. Once a little area is located, use the mouse to "drag out" a highlighting rectangle to encompass that "nothingness" area in your image (see Figure 29 for my choice).


Figure 29 - Highlighting a "nothingness" area in the light frame

With an area selected, launch the Preprocessing (digital photo) dialog once again (Figure 27). It should remember the last settings we used in there, so now, finally, we're ready to press that OK button!

Uh oh, Iris still doesn't like something - it is complaining that it cannot find the offset.pic file! Why? Well, we forgot to copy the master calibration files into the current working folder, which is 'm31' at this point. So, back to Windows Explorer: go and fetch all 4 of the calibration files 'offset.pic', 'dark.pic', 'flat.pic' and 'cosm.lst', and copy them into the 'm31' folder. Now (this time for real!) we can bring up that Preprocessing (digital photo) dialog again and press the OK button, and Iris should get busy calibrating our light images. This process is lengthy, so sit back and relax while Iris does all the work!

Once complete, you should now notice a series of 'b' files in the 'm31' folder (along with many others, with funny names; these are intermediate files). If you want, you can tidy up a bit and delete all the PIC files in the 'm31' folder, except of course the b1.pic, b2.pic, etc. files, which are our hard-won calibrated lights!


Step 6 - Convert Lights to RGB

Up until now, we've been working with our images in a "raw space", i.e. the images have appeared black-and-white and have a certain "matrix like" dottiness about them. This is because the colors usually associated with DSLR images are still encoded and have yet to be decoded. We've deliberately remained in "raw space" up until now because it is the most accurate way to calibrate our lights. But now it is time to use Iris to decode them and reveal the color! Use the Digital photo | Sequence CFA conversion... menu item (Figure 30) to bring up the CFA files conversion dialog (Figure 31).


Figure 30 - Iris' Digital photo | Sequence CFA conversion... menu item

For the Generic input name, enter base name of the calibrated lights ('b' in this case), and enter a base name for the new files (I use 'c' to keep it simple). The Number field should be automatically filled-in with the number of lights we've been using (20 in this case). Press the OK button to initiate the conversion.


Figure 31 - Iris' CFA files conversion dialog

After a short period of churning, you should discover a new sequence of files c1.pic, c2.pic, etc. in the 'm31' folder. These are our calibrated lights, now in an RGB format. If you notice, the image in the main working area is now in color, although it is most likely not correctly balanced. Don't worry about that for now, as we'll balance the colors in a later step.

To clean up, go delete the 'b' files, as they are no longer needed.


Step 7 - Align the Lights

Now that we have a set of light images that have been calibrated and converted to an RGB format, we are ready align them, in preparation for "stacking" them in the next step. What this means is that we'll let Iris look at our sequence of lights and let it figure out how to tweak them in translation and rotation and other ways so that the subject features are located in the exact same coordinate locations in each image frame.

Iris includes several methods of image registration, broadly classified according to the nature of the subject. In this exercise, the subject is M31, so we'll use the "stellar"-optimized procedure (the other broad class would be "planetary", but that is not covered here). Use the Processing | Stellar registration... menu item (Figure 32) to bring up the Stellar registration dialog (Figure 33).


Figure 32 - Iris' Processing | Stellar registration... menu item

Enter the base name of our calibrated and RGB'd images ('c' in this case) into the Input generic name field, and a base name for the output aligned, calibrated, and RGB'd images (I'll use 'd' for simplicity) into the Output generic name field. The Number again should be auto-filled.


Figure 33 - Iris' Stellar registration dialog

Now for which alignment Method to choose, you have a decision to make, depending on how the lights were captured and their quality. If each light was captured on an EQ mount or wedge, then there shouldn't be much if any rotation present in the sequence, so the One star or One matching zone choices are appropriate. If the images were captured on an Alt/Az mount or an EQ or wedge mount that wasn't adequately polar aligned, then there will be some rotation between image frames, so the Three matching zone or the Global matching options are the ones to use. The following list summarizes the methods, and when to choose them:

For those methods that require it, the marking of a region of the image proceeds like the "drag a rectangle" technique used back in Step 5 (see Figure 29 again). Generally, when a method that requires a region be marked, Iris just works within those areas and so proceeds at a much faster clip than when the entire images are considered. For those methods that cause the Zone size to become enabled, you can fine-tune the region size. And finally, Spline resample must do something constructive, but to me, it just seems to slow things down even more, so I just leave it unchecked.

So, with method chosen and parameters set, you can hit the OK button to initiate the alignment. This is the most taxing step for Iris to perform, so it will sit and chug and flash stuff in the main working area for a while, and eventually finish, with a new series of files that are the calibrated, RGB'd, and aligned light images (named d1.pic, d2.pic, etc. in this example). In the next step, we will "stack" these to produce a single "master light". Depending on the Method chosen in this step, the result may be perfect, or it may stack into a mess (i.e. the lights were not aligned properly). If that is the case, then we can back up to this step and try another Method or fine-tune the parameters. Because of this, do not do any cleanup of the 'c' series of files yet, just in case! But if you want, go and delete the other, funny-named intermediate files that may be sitting in the 'm31' folder (but again, leave the 'c' and 'd' files!)


Step 8 - Stack the Lights

With our set of calibrated, RGB'd, and aligned light images, we are ready for the best part - stacking! This will distill all of our light frames down into a single "master light" image, which will show all the quality that stacking provides (which is due to the increasing of the signal-to-noise ratio). Use the Processing | Add a sequence... menu item (Figure 34) to bring up the Add a sequence dialog (Figure 35).


Figure 34 - Iris' Processing | Add a sequence... menu item

As usual, enter the input base name for the image sequence ('d' in this case) in the Input generic name. The Number field will be pre-filled with the correct value. I always check the Normalize if overflow option, which will prevent stars from "bloating out" if many lights are stacked. As for which method to use, Arithmetic is the fastest and simplist, but I prefer Adaptive weighting because it will make some passes through our lights and determine and optimize a few parameters that will get applied in order to preserve all of the dynamic range available in our stacked set of lights. With Adaptive weighting checked, the Number of iterations edit box becomes enabled - a value of 2 is sufficient for this method, so enter 2 there. The other methods I will leave to you to experiment with in the future! ;)


Figure 35 - Iris' Add a sequence dialog

Press the OK button to initiate stacking. After a short delay, the result will be displayed in the main working area. Quickly preserve it by saving it to disk, using the Save As dialog (Figure 17). I usually name this file, which is our "master light" image the same as the subject, with '_master' appended (and would be 'm31_master' in this case). I will also make sure to save this file for future re-processing efforts, as it contains all the work we've done so far (and all that work we've done so far doesn't ever have to be repeated again, assuming the alignment was spot-on), all condensed into a master light for the subject, and is still in a 48 bit format (16 bits per color) for maximum quality and workability.

Now maybe a good time to play with the sliders in the Threshold window again (Figure 28), to see and explore all the detail that's been constructed! If you are satisfied that the alignment is perfect, all the PIC files in the 'm31' folder except the 'm31_master.pic' can be deleted, as they are no longer needed. If not satisfied, you need to back up a step and try alignment again, this time adjusting the Method and/or parameters until a perfect alignment has been achieved.


Step 9 - Post-Processing in Iris

There are many Iris post-processing operations that can be applied to our master light frame. I usually keep it simple and stick to a few operations, then leave things like smoothing to dedicated software (such as Noiseware CE or Neat), and histogram and color fine-tweaking to yet other software (such as Photoshop or my own processing app AiGfxLab). In addition, instead of just a single final image progressing from the master light frame, I usually spawn two or three or more, each with different scaling and cropping and other varied tweaks, and then I'll decide later which is the "best". So, each piece of what follows needn't be performed everytime.

As I post most of my images to my website, I like to keep them reasonably sized, which means they must either get cropped, get scaled, or both. In this example of M31, it really fills the entire image area, so I will be scaling it down in size to make it "web page sized" (or alternatively, "monitor sized"). A simple rescale-type operation could be performed, but I prefer to use a technique called "software binning" available in Iris. Since the result of software binning is a smaller image and each pixel in the smaller image additively receives the values of multiple pixels from the original master light image, there can be overflow (since the entire dynamic range available in Iris is employed due to use of Adaptive weighting in Step 8). To prevent this, I will scale down the values of the pixels in the master light before binning.

To rescale my master light frame by binning, I make sure my master light is loaded (using the Open dialog, Figure 22). Then, to perform the initial pixel down-scale, use the Processing | Divide... menu item (Figure 36) to bring up the Divide dialog (Figure 37).


Figure 36 - Iris' Processing | Divide... menu item

I plan to use "3x3" binning, which will reduce the area of the image to 1/9th size, therefore I need to divide by 9 to scale down the pixel values appropriately. I insure the Value radio button is selected, and enter 9 into the edit box and press the OK button. The image in the main working area will appear dimmed. [As an aside, if "2x2" binning were to be used, I would've divided by 4, since the area will be 1/4th the size of the original.]


Figure 37 - Iris' Divide dialog

With the pixel values scaled appropriately, I can now bin, confident that there will be no overflow. Use the Geometry | Binning... menu item (Figure 38) to bring up the Binning dialog (Figure 39).


Figure 38 - Iris' Geometry | Binning... menu item

For 3x3 binning, I enter the value 3 into the Factor edit box, and press OK to perform the binning. The image size has now been decreased, and the brightness has been restored. Since this looks like a promising new "branch" image, I will save it to disk (named, perhaps, 'm31_3x3bin' or something) so I can work on it some more and not have to redo the binning in case I mess up later).


Figure 39 - Iris' Binning dialog

The next thing I work on is the color balance. There are one of three ways I usually procede, the first choice depending on whether or not there is any kind of background gradient apparent (you can use the sliders in the Threshold window (Figure 28) to see if there is). If so, I usually kill two birds with one stone and use the Processing | Remove gradient... menu item to bring up the Remove gradient dialog (Figure 40).


Figure 40 - Iris' Remove gradient dialog

In addition to removing the bothersome background gradient, it has a handy Balance background color checkbox that, when checked, will get the colors looking normal automatically. Now you have to experiment with the Background detection and Fit precision selections to get the right amount of gradient removal (without introducing any new gradients!), so multiple attempts may be necessary (which means you'll need to reload the file from disk before each attempt). You'll notice when you press the OK button, Iris will churn for a moment, and then display the image in the main working area with a bunch of plus signs all over it - don't panic, this is Iris just telling you where it thinks the background is. To see the result of the gradient removal (and color balancing), use the Threshold window's Auto button to remove the plus signs. Then you can fiddle with the sliders again. Now it may turn out that no matter what you set in that dialog, the gradient doesn't get any better or it introduces new gradients - you can research the subsky command-line command and get finer parameter control.

For my M31 image (which fills the entire image frame), I wont bother attempting to remove any gradient (since it is probably mostly due to the galaxy clouds itself), so I will go to the command-line for a few commands. First thing I want to do is identify a small area on the image that should be black (or, should be the darkest part of the image, not necessarily black). Use the mouse to "drag out" a rectangle on that area, then use the command-line window to enter the command: black. This will scale the pixel values downwards and darken the image slightly in the view. Now (the tough part!) is to identify a star in your image that should be white. Try to not pick an obviously red star, or blue one either - even though the colors aren't exactly right yet, you can usually tell. Once that star is identified, "drag out" a very small rectangle around it, then enter the command: white into the command-line window, and marvel at your now color balanced image!

The final thing I usually do in Iris is to do some gamma adjustment and/or "histogram stretching" to bring out the fainter parts of the target (such as nebula or dimmer star clouds, etc.). Gamma correction is straightforward: use the View | Gamma adjustment... menu item to call up the Gamma adjustment dialog (Figure 41), and play with the sliders until a pleasing result is obtained (and don't forget you have additional control with the open Threshold sliders too).


Figure 41 - Iris' Gamma adjustment dialog

Perhaps my favorite final trick in Iris is to use the View | Dynamic stretching... menu item to bring up the Dynamic stretching dialog (Figure 42). This is a powerful "histogram stretch" routine that really brings out the faint details!


Figure 42 - Iris' Dynamic stretching dialog

It is easier to just play with the sliders than try to explain what they do, so get to it! Also remember the sliders in the Threshold dialog are always available too. That's all I will cover in this step, since we're now venturing into the "art" part of the territory, and personal preferences come to the fore. You should definitely explore other menu items and even go browse around on the Iris website to discover the powerful command-line commands, many of which don't have a menu or dialog counterpart.


Step 10 - Export from Iris

You eventually come to a point where you find that you've done what you need to do in Iris, and want to move on to other specialized software for other tasks (such as image smoothing, noise removal, curves adjustments, etc.) You need to now export your almost-masterpiece into a file format that other programs understand (after all, the PIC file format, while very appropriate in Iris, is only understood by Iris). You export in Iris by simply using the familiar Save As dialog (Figure 17), and specify the file format by using the Save as type dropdown list box.

Some export formats available in Iris (TIFF and PNG, or savepsd command for Photoshop PSD files) will preserve all 48 bits (a good thing!), but unless your next stage of graphics processing software can understand these particular types of files, you may need to resort to a lower quality file format (such as BMP, which stores 24 bits, or 8 bits per color). In these cases, you should note that the slider positions in the Threshold dialog become important, as they will set the "black point" and "white points" of the resulting saved image.


Epilog

Well, that completes this Primer! I hope it is useful in your astronomical image processing endeavors, and inspires you to learn more about the capabilities available in Iris. I believe the algorithms and routines contained within Iris are extremely powerful, flexible, and complete (even exotic!), and that the entire package rivals anything available today, at any price. While the user interface does impose a bit of a learning curve, once mastered, the results are undeniable! Plus, as I mentioned before, Iris is freeware, and continues to evolve. You just can't beat that - thanks Christian!


References & Resources