PixInsight Forum (historical)

PixInsight => Release Information => Topic started by: Juan Conejero on 2014 May 31 14:53:19

Title: New DrizzleIntegration Tool Released
Post by: Juan Conejero on 2014 May 31 14:53:19
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 (http://en.wikipedia.org/wiki/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 (http://www.ccd.com/ccd113.html). 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 Tool

A 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. Registration

The 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.

(http://forum-images.pixinsight.com/20140531/DI/drizzle-sa.png)

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:

(http://forum-images.pixinsight.com/20140531/DI/drizzle-bpp.png)

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. Integration

To 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.

(http://forum-images.pixinsight.com/20140531/DI/drizzle-ii1.png)

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. Drizzle

After 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.

(http://forum-images.pixinsight.com/20140531/DI/drizzle-di.png)

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 (http://cds.cern.ch/record/362045/files/9808087.pdf), PASP, 114, 144
Title: Re: New DrizzleIntegration Tool Released
Post by: mschuster on 2014 May 31 15:31:28
Thanks for your hard work Juan. Having drizzle without registration interpolation and with proper rejection is excellent!

Mike
Title: Re: New DrizzleIntegration Tool Released
Post by: ajbarr on 2014 May 31 19:28:35
Juan I just downloaded the new update. I tried to run Star Alignment on some data I recently acquired and the program crashed with this message: "Critical Signal Caught (11) Segmentation Violation."

This has never happened before and I am wondering if it has anything to do with the update?

Thanks

Albert

Title: Re: New DrizzleIntegration Tool Released
Post by: Juan Conejero on 2014 May 31 23:03:28
Hi Albert,

Yes, there was a problem with yesterday's update on Mac OS X. It is now fixed with a new update that I've just released. Sorry for the trouble!
Title: Re: New DrizzleIntegration Tool Released
Post by: Josh Lake on 2014 June 01 05:24:49
This is great, Juan, thanks!

For dithering, is there a 'best' amount? Is more separation between images better, leading to wider crop regions at the edges? Or are a couple (under 10) pixels of movement per image okay? Perhaps it doesn't matter as long as they're not *right* on top of each other.
Title: Re: New DrizzleIntegration Tool Released
Post by: georg.viehoever on 2014 June 01 06:13:27
I wonder if there is an interaction between drizzle and distortion correction. Will distortion correction possible correct away the slight differences between images that are necessary for the drizzle method? Or are both methods compatible with each other?
Georg
Title: Re: New DrizzleIntegration Tool Released
Post by: Astrocava on 2014 June 01 06:22:43
Great work, Juan!

I'm thinking how to use this new tool with OSC (DSLR) images. DSRL images are spatially under sampled in origin because each channel has only half of the pixels.

I think the proper step by step process would be:

1.Calibrating frames as usual.
2.Split CFA in four channels (RG1G2B)
3.Registration with drizzle data each of the channels (*)
4.Integration of each channel(*)
5.Drizzle integration (Scale=2 and shrink=1)(*)
6. Align channels with green as reference.

(*) Perhaps is best to combine G1 and G2 data, because you will benefit from increased number of frames yielding for a better spatial resolution on the green channel.

Or can the BPPScript to do all the work except steps 5 and 6)?

Sergio


Title: Re: New DrizzleIntegration Tool Released
Post by: naavis on 2014 June 01 11:17:20
Hi!

I'm able to crash PixInsight after running the DrizzleIntegration process. After running the process, I close the weighting image, then auto-STF the result file by pressing Ctrl+A and then enabe the 24-bit lookup table for STF by pressing the button on the toolbar. I'm running Windows 8.1 64-bit. Also, saturated parts of the images (some stars and galaxy cores) turn black in the drizzled image.
Title: Re: New DrizzleIntegration Tool Released
Post by: Ignacio on 2014 June 01 11:45:09
Beautiful, Juan! Thanks for the hard work! I got new data last night and plan to try this asap.

BTW, reading about the drizzle files with geomertic registration information, reminded me about the Theli discussion we had way back, as well as my top "wish-list" item: postponing debayering of OSC images to the intergation stage, where SNR is best. Any plans in this direction?

thanks again,
Ignacio
Title: Re: New DrizzleIntegration Tool Released
Post by: IanL on 2014 June 01 14:29:19
Great work, Juan!

I'm thinking how to use this new tool with OSC (DSLR) images. DSRL images are spatially under sampled in origin because each channel has only half of the pixels.

I think the proper step by step process would be:

1.Calibrating frames as usual.
2.Split CFA in four channels (RG1G2B)
3.Registration with drizzle data each of the channels (*)
4.Integration of each channel(*)
5.Drizzle integration (Scale=2 and shrink=1)(*)
6. Align channels with green as reference.

(*) Perhaps is best to combine G1 and G2 data, because you will benefit from increased number of frames yielding for a better spatial resolution on the green channel.

Or can the BPPScript to do all the work except steps 5 and 6)?

Sergio

I haven't experimated much yet, but just calibrated my images as normal, debayered them and then followed the tutorial steps as given by Juan above.  Results seem reasonably good for a first attempt.  See below for a sample from a reasonably small data set of 24 x 600 seconds on a Canon 500D and SW 80ED & 0.85FR.  Left image in comparison is a normal integration, right image is a drizzle integration with the default 2x scale and 0.9 drop shrink.  Looking at stretched data there is a clear increase in noise, and trying to push the drop shrink any further than 0.9 lead to obvious artefacts.

Title: Re: New DrizzleIntegration Tool Released
Post by: georg.viehoever on 2014 June 01 15:41:57
A first try for me also looks good. 90 images @85 mm, left conventional stack, right drizzle stack.
Georg
Title: Re: New DrizzleIntegration Tool Released
Post by: Ignacio on 2014 June 01 17:38:14
I tried a couple of runs, on 30 registered frames from a canon 6D, on my win7x64 PC with 12GB ram, and in the last step (DrizzleIntegration) I got the blue screen of death in both tries! First time ever this happens to me with pixinsight.

Ignacio
Title: Re: New DrizzleIntegration Tool Released
Post by: bwana on 2014 June 01 18:32:10
FINALLY!  Thank you, thank you, thank you!!

Up to this point I've had to drop out of PixInsight, Drizzle in Registax and back into PixInsight.

And it works wonderfully!  Ran several sessions last night and beautiful!

bwa
Title: Re: New DrizzleIntegration Tool Released
Post by: jerryyyyy on 2014 June 02 04:58:20
Joining the bandwagon.  My comparisons also show the superiority of the new method.  Can someone explain to me why the new files are 4x larger?  I get the 2X setting.  Is the computation projected into a larger image. 
Title: Re: New DrizzleIntegration Tool Released
Post by: georg.viehoever on 2014 June 02 04:59:54
...Can someone explain to me why the new files are 4x larger?
Images are twice the size in X, and twice the size in Y, and 2*2=4  :)
Georg
Title: Re: New DrizzleIntegration Tool Released
Post by: jerryyyyy on 2014 June 02 05:02:41
...Can someone explain to me why the new files are 4x larger?
Images are twice the size in X, and twice the size in Y, and 2*2=4  :)
Georg

Yes I see that, I assume the math projects the computations out into a large workspace.  To me seem a little like interpolation of data between existing pixels. 
Title: Re: New DrizzleIntegration Tool Released
Post by: bitli on 2014 June 02 05:27:30
Not really interpolation.  You may want to browse the reference in the announcing article: even without understanding all the details it gives a good feeling of what happens.  It really takes advantage of the exact location of the image to find where the pixel should land - which should be statistically correct (assuming your image is indeed undersampled).
-- bitli
Title: Re: New DrizzleIntegration Tool Released
Post by: IanL on 2014 June 02 06:03:54
Yes I see that, I assume the math projects the computations out into a large workspace.  To me seem a little like interpolation of data between existing pixels.

No, interpolation is a process of estimating new data points using existing ones. So the Resample process (http://pixinsight.com/doc/tools/Resample/Resample.html (http://pixinsight.com/doc/tools/Resample/Resample.html)) can be used to make an image larger.  It has a number of different interpolation algorithms (http://pixinsight.com/doc/docs/InterpolationAlgorithms/InterpolationAlgorithms.html (http://pixinsight.com/doc/docs/InterpolationAlgorithms/InterpolationAlgorithms.html)) to estimate the missing data for the new pixels by reference to data in the existing ones.

Any such up-scaled image will contain artefacts that are more or less noticeable depending on the scaling factor and the algorithm used.  This is unsurprising since the additional pixels have been estimated and aren't real data.

The drizzle algorithm doesn't estimate new data points at all.  It extracts real data from your set of samples (multiple subframes) to populate the additional pixels that you wish to create.  It can do this provided:

- The image is undersampled, i.e. the number of arcseconds per pixel achieved by the optical system and camera has to be lower than the resolving power of the optical system.  Put more simply, the camera pixels have to be larger than the optimum for the scope or lens, which is often the case with short focal length refractors and camera lenses, but conversely long focal length scopes may be oversampled by the camera, in which case you already have all the information you're ever going to get out of the image.  You can't beat the laws of physics here!

- You need to dither the subframes, so the pixels in each sub do not cover the exactly same part of the sky.  It is important that the dithering is not an exact number of pixels, because if the 'footprint' of each pixel on the sky exactly overlaps the footprints of pixels in the other subs you cannot obtain the extra information that you want.  So your dithering process needs to re-point the imaging scope by a random amount of pixels plus a random fraction of a pixel each time.  Dithering in most guiding/imaging applications will try to do this by default, but even yours it doesn't, in practice I defy you to successfully dither by a precise number of whole pixels between each sub!  Mount gearing flaws and field rotation due to imperfect polar alignment will usually do a good enough job of creating the random fractions of a pixel between frames that you need for this to work.

- You need lots of subframes.  Dithering isn't 'free data'.  Put simply you are taking the total signal you have captured in your set of subs, and spreading it across four times as many pixels, so you can expect the final image to be noisier. Think about the reverse; if you have a relatively noisy image and downscale it to half its original dimensions, it will look a lot less noisy at the cost of a lower resolution, since you've averaged four pixels in to every one so you have four times as many samples per pixel.

If you have met the under-sampling and sub-pixel dithering requirements, the pixels in each sub will contain signal from slightly different parts of the target each time.  The pixels therefore contain information which has been resolved by the optical system but not by the camera (it has been 'averaged' together by the sensor element for a pixel) and so of course there is no means to access that data in a single sub.  The drizzling algorithm works out the slight differences in pointing between subs and (effectively) aligns the subs at the higher (e.g. 2x) resolution.  It then "de-averages" the missing data from the oversampled big pixels in to the new smaller ones using the drizzle algorithm.

There is no magic at work here, you have taken multiple samples of the target and the unresolved details end up in different pixels each time.  By slicing the big pixels in to smaller ones and then playing a bit of "3D Sudoku" with the resulting stacks of smaller pixels, you can figure out what the missing numbers should be. (I know neither "de-averaging" nor "3D Sudoku" is a literally accurate analogy of the process, but just trying to illustrate that you can deduce apparently missing information under the right conditions).

The increase in file size should be no surprise of course.  You've created an image which is double the resolution of the original images, so you have four times as many pixels (per the explanation above) and thus an uncompressed file will be four times the size on disk.  It also means that you have to perform subsequent processing on images that are four times bigger in memory/on disk, which is worth bearing in mind!
Title: Re: New DrizzleIntegration Tool Released
Post by: themongoose85 on 2014 June 02 08:55:31
PI has hung for me during ImageIntegration on "Updating drizzle data files" and has become unresponsive I am letting it go to see if it completes.
Title: Re: New DrizzleIntegration Tool Released
Post by: georg.viehoever on 2014 June 02 09:31:51
PI has hung for me during ImageIntegration on "Updating drizzle data files" and has become unresponsive I am letting it go to see if it completes.
Check if you are short of RAM (for instance via task manager). Drizzle needs a lot.
Title: Re: New DrizzleIntegration Tool Released
Post by: themongoose85 on 2014 June 02 09:45:07
PI has hung for me during ImageIntegration on "Updating drizzle data files" and has become unresponsive I am letting it go to see if it completes.
Check if you are short of RAM (for instance via task manager). Drizzle needs a lot.

Yeah I checked and I was only using about 55% of my total physical memory so I am not sure it was that. I killed PI and restarted it. I am just doing a stack without drizzle now to make sure it works and then I'll try adding in drizzle again and see what happens.
Title: Re: New DrizzleIntegration Tool Released
Post by: georg.viehoever on 2014 June 02 09:47:15
Which OS do you use? How much RAM has your system?
Title: Re: New DrizzleIntegration Tool Released
Post by: whwang on 2014 June 02 09:50:47
Hi,

It's great to see this function implemented in PI. To really see how it works, we should use some clearly under-sampled images in a crowded field, and compare results of:
a. normally integrated image
b. drizzle (2x for example) integrated image
c. 2x oversampled (no drizzle) and then integrated image
I will see if I can find time to do this.

I also like the suggestion made by Astrocava.  This is quite essential to get high-quality results from DSLRs.  At this moment, it is implemented by DSS (called Bayer drizzle), but DSS is an old tool.  It will be great if PI can have this function.

Cheers,
Wei-Hao
Title: Re: New DrizzleIntegration Tool Released
Post by: themongoose85 on 2014 June 02 10:28:15
Georg I am using Win 7 Pro with a core i5 2500K and 12GB of ram. It stacked fine without selecting Generate Drizzle in ImageIntegration. I am trying again with it selected to see if it completes.

EDIT: PI is still hanging updating the drizzle files but when I refresh the folder I see the drizzle files growing in size so I am going to leave it for a while to see if it completes.

EDIT2: Moving the files off my media server and onto my local hard drive solved the problem. The drizzle data files updated a lot faster.
Title: Re: New DrizzleIntegration Tool Released
Post by: ftherrmann on 2014 June 02 23:21:25
I upgraded to the latest version this afternoon.  (.1071)  and I don't see any drizzle options in the Star Alignment or Image integration processes. 

Is there a switch that I need to turn on?   What am I missing?

Thank you,

Fred
Title: Re: New DrizzleIntegration Tool Released
Post by: bitli on 2014 June 03 02:17:46
Last version is 1092 (from memory), are you sure you are not on one of the RC or something like that.  Maybe you should download a fresh one from the site.
-- bitli
Title: Re: New DrizzleIntegration Tool Released
Post by: Juan Conejero on 2014 June 03 02:37:39
Yes I see that, I assume the math projects the computations out into a large workspace.  To me seem a little like interpolation of data between existing pixels.

No, interpolation is a process of estimating new data points using existing ones. ...

Hi Ian,

Fantastic post and a very nice description of drizzle!
Title: Re: New DrizzleIntegration Tool Released
Post by: Juan Conejero on 2014 June 03 02:42:07
I'm thinking how to use this new tool with OSC (DSLR) images. DSRL images are spatially under sampled in origin because each channel has only half of the pixels.

Hi Sergio,

I am working on this right now. The current tool set can be used without changes to implement Dave Coffin's Bayer drizzle technique very easily. It can be integrated in the BPP script.
Title: Re: New DrizzleIntegration Tool Released
Post by: Ignacio on 2014 June 03 04:24:07
I'm thinking how to use this new tool with OSC (DSLR) images. DSRL images are spatially under sampled in origin because each channel has only half of the pixels.

Hi Sergio,

I am working on this right now. The current tool set can be used without changes to implement Dave Coffin's Bayer drizzle technique very easily. It can be integrated in the BPP script.

Excellent news, Juan! Are you working on a PI implementation of Bayer Drizzle, or an improved variation of it? Is Sergio´s proposed approach using SplitCFA the best one?

Ignacio
Title: Re: New DrizzleIntegration Tool Released
Post by: Juan Conejero on 2014 June 03 04:59:22
Bayer drizzle is pretty straightforward. One complication is the fact that CFA calibrated images have to be debayered prior to registration and pre-integration, but DrizzleIntegration has to have access to the CFA images. This can be solved by means of a little trick: replace the file names to which .drz files point to (which are debayered images) by the original CFA images. The other complication is that CFA images have to be split into separate RGB components in order to drizzle them, but we already have this: just load the CFA data as raw Bayer images. So the implementation looks like this:

1. Load a calibrated CFA image as a monochrome raw Bayer image.

2. Optionally, apply CosmeticCorrection.

3. Make a duplicate of the calibrated (and possibly cosmetized) CFA image and transform it to an RGB raw Bayer image (that is, split the RGB components as three channels). Save this RGB image in FITS format.

4. Apply Debayer to get an interpolated RGB image and save it in FITS format.

5. Apply StarAlignment to register the RGB image and save it. The generate drizzle data option of SA is enabled in this step.

6. Open the .drz file generated in step 5 and replace the file path (which points to the debayered image that StarAlignment has worked with) with the path to the RGB image that was saved in step 3. Save the modified .drz replacing the original data file.

7. Repeat steps 1-6 for all images in the batch task.

Now you can use ImageIntegration (with the registered images and the .drz files) and DrizzleIntegration (with the .drz files) in the usual way. The drizzle process will work with the original CFA data, not with interpolated data. This is the Bayer drizzle algorithm.
Title: Re: New DrizzleIntegration Tool Released
Post by: Ignacio on 2014 June 03 05:15:40
Many thanks, Juan. This makes perfect sense, as you preserve full resolution spatial information during registration, and then apply the geometric transformations to each color (bayered) matrix.

Question: can't there be information holes (by chance) that may require some level of interpolation/normalization at the end?

Ignacio
Title: Re: New DrizzleIntegration Tool Released
Post by: Juan Conejero on 2014 June 03 05:43:53
That depends on the number of images and the quality of dithering. You'll definitely need many dithered images. Bayer drizzle can be used with a drizzle scale of one as a non-interpolating deBayering method. It can be used also with drizzle scale > 1, but in this case a huge amount of data can be necessary to fill all the holes. With the necessary data sets, I think that both methods can yield very good results.

We currently don't have enough test data to draw conclusions in numbers terms. So all tests made by users will be very important. The new version of BPP with Bayer drizzle enabled should be ready in a couple days.
Title: Re: New DrizzleIntegration Tool Released
Post by: Ignacio on 2014 June 03 06:13:28
Thanks, Juan. Will try a first test (drizzle 1x) with my recent OmegaCent data, and compare with the standard drizzle 2x workflow.

Ignacio
Title: Re: New DrizzleIntegration Tool Released
Post by: jerryyyyy on 2014 June 03 08:48:17
Yes I see that, I assume the math projects the computations out into a large workspace.  To me seem a little like interpolation of data between existing pixels.

No, interpolation is a process of estimating new data points using existing ones. ...

Hi Ian,

Fantastic post and a very nice description of drizzle!

Yes, absolutely great explanation for someone at my level.  Just to kinda restate it in my language and in reference to my scope.  My 500mm FL Takahashi 180ED/SBIG STT8300M combo results in 2.21 arc"/pixel images.  This is undersampled in comparison to say my old 2000mm scope.  But, when my images are dithered the collected the images contain all the data that might have been picked up with the 2000mm scope.  This procedure wrings out the data that is actually in that undersampled data. 

I have to say I can see the difference when I run the new procedure.

One other question... how close to regular deconvolution does this procedure come... lazy me is always looking to avoid a laborious step...???
Title: Re: New DrizzleIntegration Tool Released
Post by: Carlos Milovic on 2014 June 03 11:27:55
This has nothing to do with deconvolution :)
Although it would make things much easier, since the PSF will be better sampled, and data should correlate better with it.
On a side note, deconvolution and drizzle can be integrated into a single operation, and that is called super-resolution. We may implement this in the medium term.
Title: Re: New DrizzleIntegration Tool Released
Post by: starhopper on 2014 June 03 12:34:36
Hello,
I would like to post my first try with DrizzleIntegration.
My data is
a) undersampled (Canon EF200mm lens and KAF8300 Chip)
b) dithered
so I gave it a try and the result was a surprise. The attached file is a enlargement
of this image http://astrob.in/81586/C/ (http://astrob.in/81586/C/) whitch is still without Drizzle at the moment. Left is without and right is with Drizzle.
Thank you for this tool.
Title: Re: New DrizzleIntegration Tool Released
Post by: ajbarr on 2014 June 03 12:58:55
Thomas can you explain what under sampling means?

Thanks

Albert
Title: Re: New DrizzleIntegration Tool Released
Post by: Carlos Milovic on 2014 June 03 14:50:24
Albert, undersampling is having less samples than what is needed to have an appropriate approximation to the underlying light distribution. In astronomy, this is related both to the optical resolution and the seeing. From the perspective of the sensor, roughly, you need 2 or 3 pixels to cover the FWHM of your stars. So, if you have very good seeing, or you are using a color filter array (as in the dslr cameras), you end with less samples than what is needed, and this is translated as a loss in sharpness.
Title: Re: New DrizzleIntegration Tool Released
Post by: ajbarr on 2014 June 03 17:46:48
Thanks Carlos. Does that basically mean if you have a lot of subs you don't need to use drizzle?
Title: Re: New DrizzleIntegration Tool Released
Post by: Carlos Milovic on 2014 June 03 19:45:22
It is not about the number of subs, but the spatial sampling. It is the size of the pixels and the coverage in the sky, compared to the seeing and scope's resolution.

This is closelly related to this:
http://en.wikipedia.org/wiki/Nyquist%E2%80%93Shannon_sampling_theorem
Title: Re: New DrizzleIntegration Tool Released
Post by: starhopper on 2014 June 04 10:37:01
Thomas can you explain what under sampling means? Thanks
Albert
Hello Albert,
Carlos provided the answer better than I ever can.
PS: undersampling is not good, but unavoidable when shooting with photo lenses. Now we have the drizzle tool  ;)

Thomas
Title: Re: New DrizzleIntegration Tool Released
Post by: MikeOates on 2014 June 04 12:07:23
I have just tried drizzle on two sets of data and I have noticed that the rejection is not as good as I am getting a satellite trail remaining in the drizzle image in both cases, even though it is not in the image produced with the ImageIntegration tool. 'Generate drizzle data' was set and in the DrizzleIntegration tool 'Enable pixel rejection' was also set.

Mike
Title: Re: New DrizzleIntegration Tool Released
Post by: whwang on 2014 June 04 18:34:05
Bayer drizzle is pretty straightforward. One complication is the fact that CFA calibrated images have to be debayered prior to registration and pre-integration, but DrizzleIntegration has to have access to the CFA images. This can be solved by means of a little trick: replace the file names to which .drz files point to (which are debayered images) by the original CFA images. The other complication is that CFA images have to be split into separate RGB components in order to drizzle them, but we already have this: just load the CFA data as raw Bayer images. So the implementation looks like this:

1. Load a calibrated CFA image as a monochrome raw Bayer image.

2. Optionally, apply CosmeticCorrection.

3. Make a duplicate of the calibrated (and possibly cosmetized) CFA image and transform it to an RGB raw Bayer image (that is, split the RGB components as three channels). Save this RGB image in FITS format.

4. Apply Debayer to get an interpolated RGB image and save it in FITS format.

5. Apply StarAlignment to register the RGB image and save it. The generate drizzle data option of SA is enabled in this step.

6. Open the .drz file generated in step 5 and replace the file path (which points to the debayered image that StarAlignment has worked with) with the path to the RGB image that was saved in step 3. Save the modified .drz replacing the original data file.

7. Repeat steps 1-6 for all images in the batch task.

Now you can use ImageIntegration (with the registered images and the .drz files) and DrizzleIntegration (with the .drz files) in the usual way. The drizzle process will work with the original CFA data, not with interpolated data. This is the Bayer drizzle algorithm.

Hi Juan,

Let me try to understand this.  For R and B in a Bayer matrix, Bayer drizzle conceptually is just like normal 2x drizzle.  This is because out of every four pixels, only 1 is real R, or real B.  On the other hand, G is somewhat different.  Out of every 4 pixels, two are G, instead of one.  So to make Bayer drizzle works like a normal 2x drizzle for G, there must be two G channels, instead of one (in my naive thinking).  In the above 7 steps you wrote, which one has this G issue taken into account?

Cheers,
Wei-Hao
Title: Re: New DrizzleIntegration Tool Released
Post by: Juan Conejero on 2014 June 07 02:07:31
I have just tried drizzle on two sets of data and I have noticed that the rejection is not as good as I am getting a satellite trail remaining in the drizzle image in both cases, even though it is not in the image produced with the ImageIntegration tool.

Rejection is exactly the same on the ImageIntegration and DrizzleIntegration tools. They are identical by construction, so this "cannot fail" geometrically, modulo bugs.

However, if you are integrating few frames, the relative lack of SNR over rejected areas combined with some particular subpixel alignments may make rejected pixels visible as a result of different noise patterns or distributions after drizzle. This shouldn't happen if you integrate a sufficient number of images. How many frames are you using with drizzle?
Title: Re: New DrizzleIntegration Tool Released
Post by: Juan Conejero on 2014 June 07 02:38:49
Hi Wei-Hao,

Let me try to understand this.  For R and B in a Bayer matrix, Bayer drizzle conceptually is just like normal 2x drizzle.

Bayer drizzle is just the same drizzle algorithm applied to CFA data. You normally perform a 1x Bayer drizzle, not 2x, because filling the Bayer pattern holes requires a *lot* of images. Filling Bayer holes plus the extra grid spacing in a 2x Bayer drizzle requires a really huge amount of data. For the same reason, Bayer drizzle is usually applied without any drop shrink (drop shrink factor = 1).

A 1x Bayer drizzle process can be used as a nice deBayering algorithm that works with the actual raw data without any interpolation. In this case there is no resolution improvement, but provided that you have enough frames to cover the image, the results should be better than a normal deBayering with interpolation such as VNG, AHD, etc.

Quote
...out of every four pixels, only 1 is real R, or real B.  On the other hand, G is somewhat different.  Out of every 4 pixels, two are G, instead of one.  So to make Bayer drizzle works like a normal 2x drizzle for G, there must be two G channels, instead of one (in my naive thinking).  In the above 7 steps you wrote, which one has this G issue taken into account?

This is the idiosyncrasy of Bayer filters. There is two times more green data than red and blue in a Bayer CFA frame, and Bayer drizzle doesn't change this. Your final image will have roughly two times more signal in the green channel than on the red and blue channels. We could think on a variation of Bayer drizzle that attempts to compensate for this relative lack of signal, but this implies interpolation, which is just what we are trying to avoid with Bayer drizzle.
Title: Re: New DrizzleIntegration Tool Released
Post by: whwang on 2014 June 07 04:48:10
Hi Wei-Hao,

Let me try to understand this.  For R and B in a Bayer matrix, Bayer drizzle conceptually is just like normal 2x drizzle.

Bayer drizzle is just the same drizzle algorithm applied to CFA data. You normally perform a 1x Bayer drizzle, not 2x, because filling the Bayer pattern holes requires a *lot* of images. Filling Bayer holes plus the extra grid spacing in a 2x Bayer drizzle requires a really huge amount of data. For the same reason, Bayer drizzle is usually applied without any drop shrink (drop shrink factor = 1).

A 1x Bayer drizzle process can be used as a nice deBayering algorithm that works with the actual raw data without any interpolation. In this case there is no resolution improvement, but provided that you have enough frames to cover the image, the results should be better than a normal deBayering with interpolation such as VNG, AHD, etc.

Hi Juan,

I guess we used different terminology.

Use R as an example. In an N-mega-pixel Bayer CFA, only N/4 MP are in R.  But a normal 1x Bayer-drizzled final image contains N MP of R data.  Therefore, this is just like a 2x normal-drizzle (not Bayer-drizzle) of a N/4 MP of normal gray-scale image.

For R, and B, 1x Bayer-drizzle = 2x normal-drizzle (or you can call it standard drizzle).  In terms of algorithm, 1x Bayer-drizzle and 2x normal-drizzle are essentially identical.  This is simple because for R or B, the distribution of data on one CFA image is:
R E
E E
(E means empty, no data)
or
E E
E B
This is exactly the configuration of the drop in a normal 2x drizzle.

So, I was not talking about making an N-MP CFA image become 4N-MP after stacking.

Quote
Quote
...out of every four pixels, only 1 is real R, or real B.  On the other hand, G is somewhat different.  Out of every 4 pixels, two are G, instead of one.  So to make Bayer drizzle works like a normal 2x drizzle for G, there must be two G channels, instead of one (in my naive thinking).  In the above 7 steps you wrote, which one has this G issue taken into account?

This is the idiosyncrasy of Bayer filters. There is two times more green data than red and blue in a Bayer CFA frame, and Bayer drizzle doesn't change this. Your final image will have roughly two times more signal in the green channel than on the red and blue channels. We could think on a variation of Bayer drizzle that attempts to compensate for this relative lack of signal, but this implies interpolation, which is just what we are trying to avoid with Bayer drizzle.

The above statement of mine (1x Bayer-drizzle = 2x normal-drizzle) is not true for G.  On the CFA image, the configuration for G is:
E G
G E
This is not the drop configuration.  This is why I asked in the previous post how this was taken into account in the procedures you outlined earlier.

Cheers,
Wei-Hao


Title: Re: New DrizzleIntegration Tool Released
Post by: MikeOates on 2014 June 07 09:28:51
I have just tried drizzle on two sets of data and I have noticed that the rejection is not as good as I am getting a satellite trail remaining in the drizzle image in both cases, even though it is not in the image produced with the ImageIntegration tool.

Rejection is exactly the same on the ImageIntegration and DrizzleIntegration tools. They are identical by construction, so this "cannot fail" geometrically, modulo bugs.

However, if you are integrating few frames, the relative lack of SNR over rejected areas combined with some particular subpixel alignments may make rejected pixels visible as a result of different noise patterns or distributions after drizzle. This shouldn't happen if you integrate a sufficient number of images. How many frames are you using with drizzle?

Juan,

I will ignor the first set I tried because the dither was not set during image capture, but the next set was 34 x 600s subs which should have been ok. I used scale 2 and drop shrink 0.9, I also tried with a drop shrink of 0.7 with the same result.

I have uploaded the following files which show what I mean. Sorry it took a while to upload these (warning big files!).

Standard Integration (http://endor.uv.es/files/data/public/ecd9bb.php?dl=true)
Drizzle Integration (http://endor.uv.es/files/data/public/49e8c8.php?dl=true)
Drizzle_weights (http://endor.uv.es/files/data/public/d66b3a.php?dl=true)

Mike
Title: Re: New DrizzleIntegration Tool Released
Post by: Alejandro Tombolini on 2014 July 12 12:31:51
Hi, I am facing the se same rejection issue and cannot solve it completly. Also have doubts with the interpretation of the drizzle_weight obtained. Does it means bad dietering? Is it ok the pattern shown? (I have stretched it conveniently to show it)

(http://1.bp.blogspot.com/--ItctAaiTuY/U8GLKEpcP_I/AAAAAAAAA-o/6P_N2ezo6N0/s1600/drizzle.png)

This set has 84 images, and in drizzle integration remain pixels that are rejected in standard integration using winsorized sigma clippling.
I have tried with more aggressive rejection values but do not help so much and even make worst other issue with rejection in stars.

Then I change from winsorized to Linear fit and was much better, only a minor issue with rejection and some yellow lines appear in the standard integration, not in the drizzle.

(http://1.bp.blogspot.com/-y_a7uCkQZ7o/U8GLWg0XA0I/AAAAAAAAA-0/7at1EtatOS4/s1600/drizzle1.png)

My worry is how it looks in corners mainly, and also in some stars. Could it be related to flats used?
 
(http://2.bp.blogspot.com/-0ArrbZNw--o/U8GLJYmf8cI/AAAAAAAAA-k/yBIGJmmhaEA/s1600/drizzle2.png)

I would appreciate if you could check the images I have uploaded to ForumSharedFiles>AlejandroTombolini>Trifida in endor. I have used the image "2014_06_28 LT 00_17_59 ISO 1600050005_0033" as reference for registration and in II.

Saludos, Alejandro.

Ps1: using the last update.
Ps2: in drizzle module, "from preview" takes the same time for integration that the big images.
Title: Re: New DrizzleIntegration Tool Released
Post by: Juan Conejero on 2014 July 13 05:05:22
Hi Alejandro,

I can't reproduce any of the problems you are reporting :) In fact, I've got an extremely nice Bayer-drizzled image with linear fit clipping rejection, without any rejection issue. I have uploaded it as "bayer_drizzle_integration.fit" to your Trifida folder on Endor.

I have also made a try with 2x Bayer drizzle and 0.85 drop shrink. It works well, but there are a few issues on regions where the number of rejected frames is relatively high, mainly around some bright stars with many rejected pixels due to small tracking issues and focus shifts. Other than that, with 84 frames a 2x Bayer drizzle is feasible with your data, although it actually makes no sense because your image is not undersampled.

Your master flat overcorrects the upper left corners of your light frames. Also you have some light frames that are rotated by 180 degrees due to a meridian flip. These frames require a specific flat and are obviously not being flattened well. Your master flat was created with PixInsight Core 1.8.0.1087, which was released in February, while your images have been acquired in June. Despite that, the result is very nice but you should crop the central area of the image IMO.

How are you applying drizzle? I have used the BatchPreprocessing script with both the drizzle and Bayer drizzle options enabled. Then I have used ImageIntegration to update the Bayer drizzle .drz files, and the DrizzleIntegration tool with scale=1 and drop_shrink=1. The result is great:

(http://forum-images.pixinsight.com/20140713/drizzle/Desktop-tn.jpg) (http://forum-images.pixinsight.com/20140713/drizzle/Desktop.jpg)
Click for full-size image (http://forum-images.pixinsight.com/20140713/drizzle/Desktop.jpg)

I can post more screenshots to show comparisons and more processing steps if you wish.
Title: Re: New DrizzleIntegration Tool Released
Post by: Alejandro Tombolini on 2014 July 20 18:46:22
Hi Juan, sorry for the late response, I was without computer.

and thanks you for your help! :)

Your master flat overcorrects the upper left corners of your light frames. Also you have some light frames that are rotated by 180 degrees due to a meridian flip. These frames require a specific flat and are obviously not being flattened well. Your master flat was created with PixInsight Core 1.8.0.1087, which was released in February, while your images have been acquired in June. Despite that, the result is very nice but you should crop the central area of the image IMO.

Yes, you are right about the flats, I couldn't do it during the sesion and used a set that do not fit so well, besides I have some street lights  >:D >:D that realy bother the image after the flip. I believe that influence considerably calibration and rejection issues'.

I've got an extremely nice Bayer-drizzled image with linear fit clipping rejection, without any rejection issue.

 >:D  I have downloaded your Bayer-drizzled image and it has a better rejection that my approach but still there are hot pixels that I would like to reject.
See the screen shot where I made previews for you to check in the bayer_drizzle_integration.
(http://2.bp.blogspot.com/-9EEtVv98Gkk/U8xstsyMQPI/AAAAAAAAA_g/t_0tbqaPp-c/s1600/drizzle3.png)
(http://4.bp.blogspot.com/-V756gmzAS8E/U8xspXE_ZWI/AAAAAAAAA_Y/7ZNoW5YZhUU/s1600/drizzle4.png)

How are you applying drizzle? I have used the BatchPreprocessing script with both the drizzle and Bayer drizzle options enabled. Then I have used ImageIntegration to update the Bayer drizzle .drz files, and the DrizzleIntegration tool with scale=1 and drop_shrink=1.

Yes, I did drizzle as you describe, but 2x Bayer drizzle and 0.85 drop shrink ( with 2x the stars look much better... O:))

My worry is how it looks

What I meant is that background does not look uniforme, if you extract V and auto STF it, in Bayer-drizzled image can be seen differences (smooth at the center and kind of lines upper and down the image). Can it be due to bad dithering?
(http://1.bp.blogspot.com/-ly2qw5aSvWg/U8xsldmTwcI/AAAAAAAAA_Q/QFszvROQ4SA/s1600/drizzle5.png)

Ps2: in drizzle module, "from preview" takes the same time for integration that the big images.

I did not check again, but did you check this, or is it the normal behavior?

Thanks again!!!
Saludos, Alejandro
Title: Re: New DrizzleIntegration Tool Released
Post by: Leandro VARGAS on 2014 July 22 17:54:07
Hello,

The option Drizzler in BPP version 1.36 we need check the option Generate Drizzle Data in Image Registrator and check Bayer Drizzle in DeBayer OR only check option Generate Drizzle Data in Image Registrator ?

Thank you for your help.

Leandro
Title: Re: New DrizzleIntegration Tool Released
Post by: Alejandro Tombolini on 2014 July 24 17:18:53
The option Drizzler in BPP version 1.36 we need check the option Generate Drizzle Data in Image Registrator and check Bayer Drizzle in DeBayer OR only check option Generate Drizzle Data in Image Registrator ?
Hi Leandro, both and then use ImageIntegration to update the Bayer drizzle .drz files, and finally DrizzleIntegration.
Nota that last version of BPP is 1.37

Saludos, Alejandro.
Title: Re: New DrizzleIntegration Tool Released
Post by: Leandro VARGAS on 2014 July 24 17:34:26
Hello Alejandro,

Where Can I download the BPP 1.37?, my PI not Update the script .

Saludos,

Leandro

Thank You for the information in your reply.
Title: Re: New DrizzleIntegration Tool Released
Post by: Alejandro Tombolini on 2014 July 24 17:46:38
That is extrange. Please check if your version of PixInsight is 01.08.02.1098

Saludos, Alejandro.
Title: Re: New DrizzleIntegration Tool Released
Post by: Leandro VARGAS on 2014 July 24 17:50:18
Alejandro,

I have this versión, but when open PI not Update nothing.

Leandro
Title: Re: New DrizzleIntegration Tool Released
Post by: Alejandro Tombolini on 2014 July 24 17:59:46
Have you tried this (http://pixinsight.com.ar/en/docs/10/pixinsight-check-for-updates.html)?
Title: Re: New DrizzleIntegration Tool Released
Post by: Leandro VARGAS on 2014 July 24 18:07:58
Alejandro,

Yes, but I have the next text:

https://pixinsight.com/update/: Network error: schannel: next InitializeSecurityContext failed: Unknown error (0x80092013) - La función de revocación no puede comprobar la revocación debido a que el servidor de revocación está sin conexión.
https://pixinsight.com/update-doc/: Network error: schannel: next InitializeSecurityContext failed: Unknown error (0x80092013) - La función de revocación no puede comprobar la revocación debido a que el servidor de revocación está sin conexión.

But when PI send information all was normal.

My Internet access was fine.

Leandro
Title: Re: New DrizzleIntegration Tool Released
Post by: Leandro VARGAS on 2014 July 26 20:38:55
Hello Alejandro,

I have the solution when update PI--> firewall problem, now my PI fine.

When finish the Drizzle generates two images -> the result of the drizzle reconstruction and a drizzle weights image, to continue the others process with PI to arrive the good photo I need save the result of the drizzle reconstruction ?

Thank you

Leandro
Title: Re: New DrizzleIntegration Tool Released
Post by: jkmorse on 2014 July 28 09:15:28
Juan,

You state in the introduction to the tool re Output Scale that:

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.

Can you describe the circumstances where it may be beneficial to make the output scale greater than 2, recognizing that the image will get huge?  Is it dependent on anything else such as number of subframes or the extent of the undersampling?

Took a series of 30 RGBs each of a number of summer targets this past weekend (North America Nebula, Antares Region, and M8 & M20 together) using fast Canon lenses and an STF8300 and can't wait to get processing now that this is part of the PI toolkit. 

Thanks again for such a superb toolkit.

Best,

Jim
Title: Re: New DrizzleIntegration Tool Released
Post by: Juan Conejero on 2014 July 30 11:57:46
Hi Jim,

Quote
Can you describe the circumstances where it may be beneficial to make the output scale greater than 2, recognizing that the image will get huge?  Is it dependent on anything else such as number of subframes or the extent of the undersampling?

To perform a drizzle x3 integration you need a *huge* amount of data. For a drizzle x4 you need a *monster* amount of data. Et cetera. If you analyze how the drizzle algorithm works, you'll see that in order to cover all output pixels with a sufficient number of drops to get no dry pixels, you need many frames. Even more if you use reduced drops, and you really want to reduce drops to something in the range 0.7 - 0.9, or otherwise your output image will be convolved with a too large PSF (that is, blurred).

The DrizzleIntegration tool writes input and output data fractions on the console for each integrated frame. These fractions give you an idea of the data that you "lose" with drizzle, with respect to a normal integration with the same data set. The output data fraction is the sum of the areas of intersection of all drops with output pixels, divided by the total area of the output image in square pixels. In other words, the output data fraction tells you the total area of the output image that "gets wet" after drizzling one frame. The input data fraction tells you the total "water" (where 1 is the total "light" available on the frame) that has been used to dampen the output image. Both data fractions take into account the drop shrink factor and all rejected pixels (which are "dry spots"). Of course, in a normal integration we always have output data = input data = 1, modulo rejected pixels.

In practical terms, a drizzle x2 integration is normally sufficient to model the PSF reasonably well in most cases.
Title: Re: New DrizzleIntegration Tool Released
Post by: erikgu on 2014 July 30 22:48:11
Hi Juan,

There must be somthing i dont understand with flats could you please explain why needing specific flats for meridian fliped images.

Quote
Your master flat overcorrects the upper left corners of your light frames. Also you have some light frames that are rotated by 180 degrees due to a meridian flip. These frames require a specific flat and are obviously not being flattened well.

Erik G
Title: Re: New DrizzleIntegration Tool Released
Post by: cfranks on 2014 July 31 04:29:20
I enclose a small, highly magnified section of a without- and with- Drizzle using a QSI 540 camera on a Takumar 6x7 150mm lens.  The difference is astounding.  Many thanks Juan for this superb implementation!  Only defaults were used.

Title: Re: New DrizzleIntegration Tool Released
Post by: mschuster on 2014 August 05 19:39:37
When doing a StarAlignment with Generate drizzle data set and with a Projective Transformation registration model, is the Interpolation method (Auto, Bicubic Spline, ...) have any effect on the drizzle results? I am thinking no (i.e. drizzle does not require this sort of interpolation) but maybe I am wrong.

Thanks,
Mike
Title: Re: New DrizzleIntegration Tool Released
Post by: Dimitris Platis on 2014 August 06 03:45:11
I would like to inquire regarding this new tool which I have used successfully I might add.
There is seems to be some complication when I transfer the data from one PC to another. Somehow, the drizzle files are looking for the original path where they where first created and even though I define the present path (for example during Drizzle integration) the process fails.
I have to do Star Alignment again in order to create the files again in a new directory in the new PC in order to run Drizzle Integration.
Is that normal?
Title: Re: New DrizzleIntegration Tool Released
Post by: Juan Conejero on 2014 August 06 09:44:41
When doing a StarAlignment with Generate drizzle data set and with a Projective Transformation registration model, is the Interpolation method (Auto, Bicubic Spline, ...) have any effect on the drizzle results? I am thinking no (i.e. drizzle does not require this sort of interpolation) but maybe I am wrong.

As you have guessed drizzle does not require or apply any pixel interpolation, so the pixel interpolation algorithm used for image registration has no direct effect on drizzle. However, you need to generate temporary registered images to integrate them in order to update the .drz files with pixel rejection data. Hence, the pixel interpolation algorithm used for image registration has an indirect, small but non-negligible effect on the final drizzle-integrated image due to rejection. Perhaps—but I have not tested this—using an interpolation less prone to ringing than Lanczos, such as bicubic or even bilinear, would make sense for drizzle.
Title: Re: New DrizzleIntegration Tool Released
Post by: Juan Conejero on 2014 August 06 09:54:06
There is seems to be some complication when I transfer the data from one PC to another. Somehow, the drizzle files are looking for the original path where they where first created and even though I define the present path (for example during Drizzle integration) the process fails.

On the DrizzleIntegration tool, open the Format Hints section and specify the folder where you have stored your data files in the Input directory field (yes, I know, not the best/most intuitive place to put this parameter...). The input directory that you specify will override the original paths stored in the .drz files. This will allow you to move your drizzle data sets freely across filesystems and machines.
Title: Re: New DrizzleIntegration Tool Released
Post by: mchaser on 2014 September 21 07:51:55
Thanks to all who worked on this.  The results are very impressive.  I have one question.  Why  do some images come out of the drizzle integration tool with a rotation, while others do not?  It's making it tricky to stitch together my mosaics.

Regards,

Mike
Title: Re: New DrizzleIntegration Tool Released
Post by: MortenBalling on 2014 September 30 07:54:57
This tool is awesome, and I highly recommend trying it on your images.

I've been using a cowboy trick where I rescaled my reference image to 200%+ before registering, but this is way better. I did a small test, using 104 light frames, and after drizzling, I resampled the drizzled image back to normal size, and compared with the normally integrated image. The SNR increased by drizzling from 278 to 412, equalling more than double the amount of exposure time.

I was easily able to see a mag19.3 z=0.77 QSO that was drowned in noise in the normal integration.

Cs

Morten :)
Title: Re: New DrizzleIntegration Tool Released
Post by: Philippe B. on 2014 November 02 02:35:16
Juan


This tools is amazing !!! Even for 15-20 images only !!!
Main goal for me is not oversample the image (it is already 4k x 4k ) but generate a 8k x 8k image to have better star shape and roundness. Then make star reduction and processing, then shrink to 4k x 4k image. This is great !!!




Something I saw during the process :
I make StarAlignment with files calibrated then get suffix "CAL"
I make ImageIntegration with files "CAL-R" and CAL-R.DRZ files
I make DrizzleIntegration with CAL-R.DRZ files
and I see Drizzle tools uses original "CAL" files and not aligned ones ? I think this is better because no interpolation is added twice ?
Do you confirm this use ?


Many thanks
Philippe

Title: Re: New DrizzleIntegration Tool Released
Post by: Carlos Milovic on 2014 November 02 03:00:47
Yes. We have to avoid doing interpolation, but we need the transformation matrix from SA to make the pixel coordinates match.
Title: Re: New DrizzleIntegration Tool Released
Post by: IanL on 2015 November 06 11:43:34
Note that there is now a new BayerDrizzlePrep script available for testing here:

http://pixinsight.com/forum/index.php?topic=9218.0 (http://pixinsight.com/forum/index.php?topic=9218.0)

This should make it possible to perform stand-alone Bayer drizzling more easily, without the need for the BPP script.
Title: Re: New DrizzleIntegration Tool Released
Post by: wangc5 on 2016 December 07 06:10:11
Can this be integrated into the integration tool so that we don't have to do two steps (integration and drizzle integration)? Or is there a script to do both steps? Thanks!

Chunyu
Title: Re: New DrizzleIntegration Tool Released
Post by: RickS on 2016 December 07 16:09:55
Can this be integrated into the integration tool so that we don't have to do two steps (integration and drizzle integration)? Or is there a script to do both steps? Thanks!

I don't think it makes sense to combine the two operations.  It is best practice to run ImageIntegration multiple times to adjust the rejection parameters.  It doesn't make sense to run DrizzleIntegration until after that's done.

Cheers,
Rick.
Title: Re: New DrizzleIntegration Tool Released
Post by: Juan Conejero on 2016 December 08 01:12:07
Along with what Rick says, that would be a clear breach of one of the most important design principles of PixInsight: Modularity.
Title: Re: New DrizzleIntegration Tool Released
Post by: jerryyyyy on 2016 December 12 12:00:33
Guys, have just come back to using this again on some images after having mastered MureDenoise.  As you note the images may get a touch nosier, so I tried to apply it and my default setting for my STT 8300M do not work... they produce the checkerboard pattern.  If I had gotten this in the past, I was able to hack the settings to get it to work, but I cannot achieve good MureDenoise.

Can any of the math wizards explain this to me (actually I am less in interested in the explanation as I am is denoising, so a quick hack would also be appreciated)  >:D. 
Title: Re: New DrizzleIntegration Tool Released
Post by: mschuster on 2016 December 13 15:06:55
Jerry,

There is no guarantee that you can achieve a good result with the script on drizzled images.

But try tweaking variance scale. Maybe try a binary search? If 1.0 is bad try 0.5. If 0.5 is bad try 0.25, otherwise try 0.75, and so on, halving the search range at each step.

Thanks,
Mike
Title: Re: New DrizzleIntegration Tool Released
Post by: jerryyyyy on 2016 December 28 10:15:18
Thanks, will give it a shot.  This is just part of my routine workflow now and I have added the drizzle into that workflow, so there is a slight train wreck in PI negotiating these two procedures....
Title: Re: New DrizzleIntegration Tool Released
Post by: TechnoPhil on 2018 February 19 23:48:28
Hello there,
I have an image that suffer dithering noise!
Look at this example:
https://mega.nz/#!iZZESToS!vfLCSok_yMuJu_T6MhON-MTWMeU74yqg4jMrSjBYGKU (https://mega.nz/#!iZZESToS!vfLCSok_yMuJu_T6MhON-MTWMeU74yqg4jMrSjBYGKU)

I am not familiar with PixInsight but I always process my images using BatchPreprocessing & ImageIntegration scripts.

I read that I can use DrizleIntegration script directly inside BatchPreprocessing & ImageIntegration, but I am confused because I cannot understand if I need to combine all the c_d_r images + drizzle data or drizzle data only.

The guide in the 1 th page shows as last step the DrizleIntegration script, but the step before shows the ImageIntegration scripts...
If I run the ImageIntegration scripts I have the final image, so how can I set the parameters & combine the drizzle data ?
Anyone can explain me better?

Is this script really able to remove the dithering noise from the image, or is it better to shot again with more luck?!
Thanks, Filippo