Sub frame combining with Maxim DL

Tutorials and Primers provided by group members

Sub frame combining with Maxim DL

Postby Dennis » Mon Jul 20, 2009 12:34 pm

Sub frame combining using Maxim DL and SD Mask.


This is a summary of a presentation made to a group of imagers from the East Anglia area outlining one person’s philosophy and method (mine!) of putting a series of raw sub frames together to make a composite that can then be processed in Photoshop (PS).


First, some general pointers regarding processing philosophy and the software used.

Worrying about whether to use 32 or 16 bit because of the higher level of quantisation distortion is staying awake at night for no good reason. PS will turn it into 15 bit as soon as you start and you finally save it as eight bit for web display or printing. I think you have to accept that you cannot display a seven bit image on a computer monitor much less eight bit. You can test this for yourself quite easily in PS by posterising a black-to-white gradient into 32, 64, 128 and then 255 steps. It is simply not possible to see the gradation at each end.

If you print your image the same thing applies although prints look better owing to the higher resolution of, generally, 300 pixels per inch and the better quality black. A smooth, glossy, very white paper is essential.

A typical KAF11002 chip produces an 11Megapixel image translating to a 20MB file or over 60MB in RGB. By the time it is processed and ready for printing or web display the file size will have been reduced to around 4-5MB for the print (as a max quality JPEG) and less than 500kB for the web. Unless you can send your file to a top class professional printer you will just have to accept the loss of over 90% of your data. This doesn’t mean you should now work sloppily but you should stop worrying about the possible loss of a one pixel square faint star, if such a thing ever exists, because it ‘aint ever going to print.

You may be one of those people that send very large files to the web via your own site. You are still limited by the resolution of the monitor on which the picture is being viewed. The best way to show your work is without doubt the paper print although ‘plasticky’ papers often work best.



The following is all based on Maxim. With Maxim DL/CCD you can:-

Control the telescope via Ascom and use Maxim’s object database or point via RA/Dec.

Control the main and guide cameras and set dithering.

Do the data reduction (calibration) of all your sub frames.

Carry out the alignment of all the sub frames in the stack; two star manual, one hundredth of a pixel centroiding and bicubic re-sampling.

Combine the sub frames using any of several methods.

Combine the channel masters into a colour composite and save as a TIFF ready for PS, or process the finished image in Maxim.

I’m not trying to sell Maxim but I fail to see why you should use, perhaps, a separate bit of software for each job when they might clash with each other or the operating system when one bit of well tried and tested s/w will do everything. People say it is expensive and then go out and spend more money on PS which does less.


When taking the raw pictures it is advisable to use dithering. This is a small and automatic movement of the mount in between exposures so the odd rogue hot pixels do not overlap when the frames are stacked. I have tested this and found that the resultant non calibrated image can be cleaner than a non-dithered properly calibrated one. The result is so clean I would never contemplate not dithering (by autoguider).


My method of combining is to use Maxim’s SD Mask, or Standard Deviation Mask (written by Ray Gralak of PemPro fame) to give it its full name. The background noise in a number of frames is reduced by stacking (it’s random and cancels out) and my tests have shown SD Mask to be the ‘quietest’ of them all. If you average the subs then any prominent noise source such as a satellite trail or cosmic ray hit will not be eradicated, merely reduced in intensity. This leads many workers that use averaging to discard frames with obvious noise in them. In a picture of the Witch Head nebula that I did last year this would have meant discarding all of them! The picture below is a cropped ten frame combine of IC443 showing average and SD Mask results. The average frame still contains all the rogue pixels, now in tight groups due to dithering.


The working of the SD Mask algorithm is quite simple. If you have a stack of, say, 20 frames then each pixel through the stack is measured, added together and the average found. The standard deviation (SD) is then found for that population of pixels. Without going into the theory behind SD suffice it to say that it is a method of indicating to what degree the average is really representative of the pixel values in the set. Strictly, the root mean square of the variance about the mean. If there is a large value pixel then the SD value will be large, if all the pixels are well behaved and similar in value, which happens most of the time, the SD will be quite small. (In a typical frame with a sat trail across one corner and four or five cosmic ray hits there will be less than 1000 pixels affected. Even with a 1 Megapixel camera that is a small percentage). A mask or filter based on the SD value (set the sigma factor to between 1 and 3) is used to examine pixel values and if there is an outlier, large or small, the algorithm takes the median value for the output. If there are no outliers then the average value of that set of pixels is taken for the output.

In this way the algorithm works through the entire pixel set for the particular camera, eleven million of them (multiplied by the number of subs) if you consider the KAF11002. SD calculations are quite complex so the whole thing is very processor intensive. Combining ten such frames, after they had been aligned took my desk top machine 26 seconds when set to three passes. (combining as an average took 3 seconds).This has a 3.4G processor and more RAM than Windows can handle. My observatory computer frequently cannot manage the job. Anyway it takes well over five minutes.

Virtually all the outliers are ignored and the result is a fair average of the pixel values in the set of sub frames. Sometimes a particularly bright sat trail will be a problem but careful choice of sigma factor and number of passes will get rid of it.

If I don’t use darks to calibrate but instead rely on Maxim’s excellent hot pixel filter some pairs of pixels will escape as the hot pixel filter only works on lone pixels. Dithering ensures that these pixel pairs are in different places in most of the subs so they get knocked out by SD Mask.

You may often have to stretch the background to a light grey to see the noise but it can always be measured. In a recent set of frames of the Bubble nebula I made the following measurements of noise measured as SD. All measured at the same pixel, no hot pixels included.

Single un-calibrated frame 10.6
Single calibrated frame 10.4
Stack of eighteen 2.1

The graph below is a comparison of four different methods of combining up to ten sub frames showing how noise reduces more with SD Mask than with other methods.

My audience agreed that in the test examples I showed the result from the dithered frame set combined using SD Mask outshone all the other methods. The finished master channel should either be combined with other colour channels in Maxim and/or saved as a TIFF and all the post processing done in PS.


Dennis Isaacs
You do not have the required permissions to view the files attached to this post.
User avatar
Dennis
 
Posts: 5159
Joined: Wed Jul 15, 2009 11:43 pm
Location: Harwich (nearly)

Return to Tutorials and Primers

Who is online

Users browsing this forum: No registered users and 1 guest