Hi everybody,
Today I have released new versions of the ImageRegistration and ImageIntegration tools, along with a new version of the BatchPreprocessing script, which support a new PixInsight tool: DrizzleIntegration.
The Variable-Pixel Linear Reconstruction
[1] algorithm, better known as
drizzle, was originally developed at the Space Telescope Science Institute to process
Hubble Deep Field images. Drizzle is an algorithm for the linear reconstruction of images from undersampled, dithered data. The new DrizzleIntegration tool brings this fundamental image processing technique to the PixInsight platform to fill a long-standing gap in our image preprocessing tool set.
There are plenty of resources on the Internet and the literature that provide general and in-depth descriptions of the drizzle method. In my opinion, this important algorithm is generally little known among the astrophotography community, mainly because the existing implementations lack the necessary flexibility and/or are too limited to be of practical value. With the new tool that we have just released, I hope this will change definitely for all PixInsight users.
With the appropriate data sets, the results of drizzle can be spectacular. To use drizzle in a useful way, you need the following:
-
Undersampled images. If your images are already well sampled, drizzle won't give you anything that you don't already have besides a good bite out of your RAM. You know that your images are undersampled when your stars look square, or when you measure the PSF (for example, with the DynamicPSF tool, or the FWHMEccentricity script) and get FWHM values smaller than about two pixels. For example, images acquired with photographic lenses or small refractors are typically undersampled, but also images acquired with larger instruments and sensors with large pixels.
- Dithered images. Dithering is always important, but for drizzle it is absolutely necessary. Without proper dithering, all input pixels will always be projected over the same output pixels by drizzle, and the reconstruction process won't work.
- Many images. Drizzle requires more images than a normal integration. The more the better, but typically you should acquire at least 15-20 images to achieve good results.
In this presentation I'm just going to describe the procedure to perform a drizzle integration in PixInsight. I'll show some practical examples in forthcoming posts.
Using the DrizzleIntegration ToolA drizzle integration of images is a three-step process in PixInsight involving registration, pre-integration, and drizzle reconstruction. This allows us to enrich the drizzle task with all the power and flexibility implemented in our StarAlignment and ImageIntegration tools.
Step 1. RegistrationThe drizzle algorithm works by projecting input image pixels on a finer grid of output pixels. This applies the same geometrical transformations used to register images in a normal preprocessing task, but instead of being an isolated step, image registration is performed during the drizzle integration process directly from calibrated data without interpolation. This requires to pre-compute and store the image registration transformations. To this purpose the StarAlignment tool has a new option to generate drizzle data, as shown on the next screenshot.
When this option is enabled, StarAlignment generates a
drizzle data file for each registered image. Drizzle data files carry the .drz suffix and store all the information required by the DrizzleIntegration tool, including image registration data, statistical data, and pixel rejection maps. DrizzleIntegration supports the same image registration devices implemented by StarAlignment, including projective transformations (homographies) and two-dimensional surface splines (thin plates).
If you use the BatchPreprocessing script, its latest version 1.35 has a
generate drizzle data option that you should activate to create drizzle data files during the image registration phase:
Note that StarAlignment (used either directly or indirectly through the BPP script) will always create new drizzle data files with fresh registration data, so existing .drz files will always be replaced to start a new drizzle integration procedure.
Step 2. IntegrationTo use the DrizzleIntegration tool, the registered images generated by StarAlignment must be integrated with ImageIntegration, and the corresponding .drz files must also be selected. The following screenshot shows an example where a set of registered images is being pre-integrated as part of a drizzle procedure.
First you must select the registered images that you want to integrate, as usual. Then you have to select the drizzle data files generated by StarAlignment, by clicking the Add Drizzle Files button. Note that when a .drz file has been associated with an input image, a special "<d>" indicator is shown on the Input Images file list for the corresponding item. For a drizzle data file to be associated with its corresponding registered image, both files must have the same file name (only different suffixes).
Second, you have to activate the
generate drizzle data option on ImageIntegration. Then you can proceed to integrate the images as usual: Find optimal pixel rejection parameters and maximize SNR in the result, just as you do for normal image integration tasks. Each time you run the ImageIntegration tool, the selected .drz files are updated with statistical and rejection data automatically. Make sure you perform a last integration
without a selected region of interest.
Note that drizzle files cannot be selected for integration on the BatchPreprocessing script. This shouldn't surprise you, since the image integration feature of BPP is for previewing purposes only,
not for generation of production images. Image integration must always be fine tuned manually, and drizzle makes no exception to this rule.
Step 3. DrizzleAfter StarAlignment and ImageIntegration, the drizzle data files (*.drz) are now ready for the DrizzleIntegration tool. Using this tool is really easy: just select your .drz files, execute the tool globally, and wait until the process completes and you get a drizzle integrated image.
The drizzle algorithm can be controlled with two main parameters:
Output scale, or
subsampling ratio. This is the factor that multiplies input image dimensions (width, height) to compute the dimensions in pixels of the output integrated image. For example, to perform a 'drizzle x2' integration, the corresponding drizzle scale is 2 and the output image will have four times the area of the input reference image in square pixels.
Drop shrink factor. This is a reduction factor applied to input image pixels. Smaller input pixels or
drops tend to yield sharper results because the integrated image is formed by convolution with a smaller PSF. However, smaller input pixels are more prone to
dry output pixels, visible patterns caused by partial sampling, and overall decreased SNR. Low shrink factors require more and better dithered input images. The default drop shrink factor is 0.9, and typical values range from 0.7 to 1.0.
Along with these important parameters, DrizzleIntegration allows you to enable/disable pixel rejection, image weighting, and the use of surface splines (when available) for image registration.
Finally, you can define a region of interest (ROI) to accelerate repeated tests. This is useful because the task's execution time (and also its memory space consumption) grows quadratically with the dimensions of the output integrated image. Note that the coordinates and dimensions of the ROI are expressed in input reference pixels,
not in output pixels. You can define ROI coordinates on an integrated image generated by the ImageIntegration tool, or on a registered image created by StarAlignment, by defining a preview and clicking the From Preview button.
DrizzleIntegration always generates two images: the result of the drizzle reconstruction and a
drizzle weights image. The value of each pixel on the weights image represents the (normalized) amount of data gathered by the corresponding pixel on the integrated result. Note that the integrated image has already been divided by the weights image when both of them are made available as new image windows.
____________________
[1] Fruchter AS & Hook RN,
Drizzle: A Method for the Linear Reconstruction of Undersampled Images, PASP, 114, 144