Equalize CFA not working with Fuji X-Trans files
First of all, thank you guys for this fantastic software and for the huge amount of work you're putting in this project :)
I noticed that the color balance gets messed up when pre-processing a Fuji X-Trans sequence with flat+dark, but not with just a dark. Furthermore, setting the option "Equalize CFA" on or off has basically no effect (apart from slightly different stats).
I tried the same with Canon (Bayer) lights, flats and darks. No issue here: the red/green and blue/green ratios are the same between a flat+dark-processed image and a dark-processed image.
The change in color balance can be easily spotted by applying an X-Trans flat (+ dark or bias) to a dummy light filled with constant values.
I checked the source code and from what I understand, both compute_means_from_flat_cfa_ushort
and compute_means_from_flat_cfa_float
assume a Bayer 2x2 CFA pattern, and when applied on X-Trans files, they compute nearly equal (bogus) means for all the channels.
I can provide light, dark and flat examples, if needed.
Siril v0.99.10-1 on Linux