Mike,
this PixelMath equation replaces each red pixel value by the neighboring lower right blue pixel value:
R1 G1 R2 G2 B1 G1 B2 G2
G3 B1 G4 B2 --> G3 B1 G4 B2
R3 G5 R4 G6 B3 G5 B4 G6
G7 B3 G8 B4 G7 B3 G8 B4If this is not the conversion that you intended, the equation can be modified.
Short explanation:
The current horizontal pixel coordinate x() runs from 0 to w-1 and the current vertical pixel coordinate runs from 0 to h-1 (w: image width, h: image height). The expression
x()%2 == 0 && y()%2 == 0
checks whether the current horizontal AND the current vertical pixel coordinates are divisible by 2 without remainder (i.e. whether x and y are even). In a bayer matrix with RGGB pattern, this condition is met for all red pixels. In this case, the replacement by the neighboring lower right blue pixel value is executed, otherwise the pixel values remain unchanged.
I am not an expert in PixelMath, but other users of this forum are, e.g.
David Ault (dnault42) has some examples of PixelMath expressions on his website,
http://trappedphotons.com/ and Gerald Wechselberger (oldwexi) has much experience with the application of PixelMath, see
http://www.werbeagentur.org/oldwexi/PixInsight/PixInsight.htmlBernd