I shoot Infrared in RAW, have done for many years. I am a Linux User too.
I recently upgraded Darktable to version 4 from version 3. I had a look at the Workflow in the User Manual and switched to the new Scene Referred method. This has helped, because I no longer need to put my RAW images through the Camera Software (Nikon or Olympus which only runs in Windoze) to keep all the detail.
Since changing to the recommended settings from the manual as per:
Set preferences - processing - auto-apply pixel workflow defaults to “scene-referred”
Set preferences - processing - auto-apply chromatic adaptation defaults to “modern”
swapping the Red/Blue channels is very odd.
By keeping the setting to legacy as per:
Set preferences - processing - auto-apply chromatic adaptation defaults to “legacy”
the channel swap behaves as I would expect.
Here is the original image
Here is the odd effect when in “Modern” mode
and here is what it should look like
I have included the History to show the differences
For infrared, I’d suggest not using Color Calibration for white balancing, as it will always yield strange results. Infrared is false color and Color Calibration just isn’t meant for that.
Instead just use regular old White Balance.
what you can use Color Calibration for is the Red & Blue channel swap, there is a preset for it which works well.
Thanks @paperdigits for a response.
As far as I can see Darktable automatically performs several steps on importing an image. In the Wrong Image it is step 8 that causes the problem. There is some funny colour calibration then.
Using the Legacy setting, that step is not done, and the Color Calibration - Colour Swap Preset I use works as per normal giving the blue sky and yellow foliage as expected.
If you only shoot infrared, then it might be worth changing the preference for the modern color workflow to Legacy.
I shoot both IR and normal photos, so I’ve just saved a style that changes the settings (do does a few other things like enable lens correction, do the channel swap, etc etc) then I apply that style to my IR images