DSLR Photometry: using AIPwin for color extraction

Affiliation
American Association of Variable Star Observers (AAVSO)
Sun, 03/19/2017 - 16:58

I'm puzzled with how to use AIPWin to extract the green color channel of an image for purposes of photometry. Can someone explain? My problem is:

I'm using version 2.4.8 of AIPWin. Under Preferences/DSLR Conversion Setting  you can select a debayer method. Only the last one, (convert color to grey scale), when you make sure gamma= 1.0 and only one of the 3 channels has a non-zero scale, would be appropriate for photometry.

But then I was surprised to see that the image size was not cut in half by this color extraction process. Looking at page 12 of the DSLR Manual is see:"Each channel is usually displayed with dimensions half that of the original RAW image, an exception is AIP4Win where the missing pixels are filled in using interpolation algorithms.". 

So my question is: can this color extraction method, with its interpolation step, create a green image that can properly used for TG photometry?

Affiliation
American Association of Variable Star Observers (AAVSO)
Yes, if you have set it as

Yes, if you have set it as recommended, the conversion from the Bayer image to a TG green image is a binlinear interpolation. Go to Preferences > DSLR Conversion Settings and makje sure the radio buttom under Select DeBayerization Algorithm is set for BILIN (Bilinear Interpolation). I have uploaded a screen shot of the form.
One way to extract color channels is to generate an image that has half the dimensions of the complete image. This is fine for the blue and red channels, but for the green channel, there are two green images, G1 and G2. Because they are offset from one another, you can't just plop them on top of one another. We decided to interpolate, but give the red and blue channels zero weight, so they disappear. The weighting scheme with coefficients for the different color channels gives people who are not doing photometry maximum flexibility. For example, if you wanted to emphasize the H-alpha features in a color photo, you could give the red channel a weight greater than 1, say 1.50, and drop the blue and green to something lower, such as 0.75. 

Affiliation
American Association of Variable Star Observers (AAVSO)
Alternatives

While this works for photometry as described, it is very inconvenient that the resulting, interpolated images are larger in pixel resolution than the physical green channel resolution. Processing takes longer and the storage of imges results in waste. But I do like the co-adding and photometry features of AIP4WIN, so I usually do the color channel separation in IRIS instead, using its scripting feature, and then I take the resulting lower resolution single channel images as FITS files and work with them in AIP4Win. You might also be able to use the command line tool of DCRAW to separate the channels from DSLR images in a batch processing step up front, but I haven't tried that.

Affiliation
American Association of Variable Star Observers (AAVSO)
software to debayer

What is the state-of-the-art alternative for debayering a DSLR image into it's color components so you can do photometry?

I agree with your note in "Alternatives": It is best to extract the color rather than interpolate. The DSLR images are huge so reducing them by a factor of 4 is a help. VPhot is hard pressed by giant images. And I don't trust the interpolation to preserve the photometry.

I have a script for Maxim that I have used; it is attached below; just remove the .txt suffix.  

But not everyone has Maxim and it is expensive. You mention a script for IRIS. Can you share that?

At some point I want to dig into the DCRAW code and include that in VPhot so one can upload RAW images and have them debayered for you. It's New Year's Eve: a time to make promises for the future!

George