Hi,
I've taken the liberty to modify Ken's great script. The motivation to do this comes from
this thread, where the need to debayer RGB Bayer images --as created by the DSLR_RAW format module-- has arisen today. I hope Ken won't mind this interference.
Attached you'll find the new version 1.10 of the BatchDebayer script.
The changes are as follows:
- The script now allows debayering FITS and DSLR raw images (in fact, the script allows loading any installed image format). Previously it was limited to FITS.
- RGB Bayer images are now converted to monochrome CFA images and then debayered. This process is completely automatic and transparent to the user. This allows batch debayering of DSLR raw images, as loaded by the standard DSLR_RAW module, which has important implications to calibration of these images in PixInsight. Please refer to the
above-commented forum thread.
- Several potential bugs have been fixed. In particular, the output image of Debayer is now correctly selected without resorting to empirical assumptions about the order of objects in the ImageWindow.windows array.
To find my changes, please search for the "// *** Begin modification by J. Conejero on 2010 Sep 03" string in the source code.
Hope it will be (even more) useful. If nobody argues it, I'll include this new version in the next release of PixInsight.