Software binning of OSC RAW images

AndyTax

Member
May 17, 2020
8
0
Hello everyone,

I find myself in quite a pickle. Here is the situation: I took, a while ago, a number of light frames with a CMOS OSC camera binned 2x2. The corresponding flats however were taken in binning 1x1 (that happens when you forget what you did the past night when taking sky flats the following evening!). There is no question of re-doing the flats has that particular horse has already bolted. Trying to find some way to do the software binning "after the fact" in PX resulted in nothing, as far as I can tell. Conceivably, I could split the light frames in the RGB components after debayering, do the same with the master flat, bin the RGB-splitted flats and use them to flatten the RGB light frames. Which seems quite a lot of work. Or, there maybe some of you who can suggest a PixelMath trick to achieve the binning of the raw master flat so that it would work directly on the raw light frames. I can do that outside PX (say in Mathematica or Matlab) but would prefer to avoid it if I can.

Thanks

Andrea
 

bulrichl

Well-known member
Nov 2, 2016
748
45
La Palma, Canary Islands
Hi Andrea,

if I understand the problem correctly, you want to prepare the MasterFlat from the unbinned flat frames in the normal way, then apply SplitCFA to it, apply IntegerResample (downsample by factor 2) to each of the 4 CFA channels and finally apply MergeCFA to the resampled CFA channels. I cannot guarantee that the MasterFlat prepared according to this approach will produce a correct flat field correction, but the effort is low, so it seems to be worth a try.

Bernd
 

AndyTax

Member
May 17, 2020
8
0
Hi Bernd,

I worked the same approach out this morning, before actually seen you kind replay to my post. Dust donuts seem to have disappeared but not quite sure the field is flat as it should be. Discovered that the IR cut filter bleeds into the blue layer so maybe it is all in vain. We'll see.

Thanks

Andrea