recently I got a Pentax K-5II which got converted to monochrome by removing the CFA.
Now I'd like to prepare the DNG (RAW) files from the camera so that darktable (4.0.0 at the moment) recognises them as monochrome images. I know that I can create a preset in the demosaicing module which applies the "passthrough (monochrome)" workflow automatically if eg. the camera model in the EXIF data matches. That's fine so far - unless there is a second camera of the same model...
So I'd like to alter the relevant EXIF data prior to the import in darktable, eg. with exiftool.
Despite I searched the web including the darktable reference documentation, consulted the DNG standard: https://helpx.adobe.com/content/dam/help/en/photoshop/pdf/dng_spec_1_6_0_0.pdf, tried to reproduce what "Monochrome2DNG" (https://www.fastrawviewer.com/Monochrome2DNG) did to an DNG file - nothing helpful.
Finally I tried to find the relevant code in the source of darktable and found something in exif.cc:
if((format == 1) && (bps == 16) && (spp == 1) && (phi == 34892)) is_monochrome = TRUE;
I am not a programmer, so I might be completely wrong there.
I tried to alter the EXIF tags accordingly:
$ exiftool -a -u -ee3 -api RequestAll=3 -SubIFD1:BitsperSample="16 16 16" -SubIFD1:PhotometricInterpretation="Linear Raw" -SubIFD1:SamplesPerPixel=1 mono.DNG -o mono1.DNG
After that I imported the resulting "mono1.DNG" into darktable, but the demosaicing module still applied the "RCD" demosaicing method.
Did I overlook something important, like some documentation?
Any help appreciated!