Sorry for the late reply!
I don’t think it’s a hardware issue, cause under regular conditions the AWB algo works fine. Also, rawtherapee’s AWB algo and darktable’s spot method both produce a color shift on the outlier frames.
However, there are some (low) clouds moving through the frames. Those clouds reflect city lights, which results in an orange glow on the clouds. With the clouds moving through the frame, occupying sometimes a smaller, sometimes a larger fraction of the frame are my guess for tripping the AWB algo off.
I tried to use
libraw to read the temperature coefficients from my RAW files. That works fine and it should be easy to find the outlier frames. My idea would be to either ramp the WB for a subset of the frames: Calculate the median, not the mean (!) value for, let’s say 10 frames, apply it to those 10 frames and move on to the next 10 frames. Or, if one could reliably detect the outlier frames, just fix them.
However, what I don’t know is how to use that information to fix the White Balance.
libraw does not allow modification of RAW files (which is a good thing), so I need to devise a mechanism to apply my corrections. I could, for example use
ImageMagick to apply the corrected colors on lossless files (e.g. TIFF). Or, and that’s what I would prefer, modify
darktable's XMP’s. The problem with that is, though, that the temperature coefficients in
darktable's XMP files are stored as a binary dump of the internal data structure, so I need (de-)serialization code.
So, as far as I can see there’s no easy way right now. Given my time constraints for (private) software projects I’m likely not going to make fast progress here, but I’ll try to stick to it.