List of all EXIF data that darktable uses in its processing?

I am in the process of building a script to make focus stacking using focus-stack quicker and easier (ultimately, select the inputs from Geeqie and run the script as a plugin), but noticed that focus-stack does not add any of the metadata from the input files into the output file. Obviously, that would be hard for metadata that varies across the inputs, but a lot of metadata will be the same.

The script creates a temporary TIFF for each input raw file using darktable-cli and then produces a stacked TIFF from the temporary ones using focus-stack. But the stacked TIFF has no metadata in it. At a minimum, that means darktable can’t identify the camera and lens for correction purposes.

I can use Exiftool to extract metadata from the inputs, and then add selected metadata to the output stacked TIFF, but I don’t know what input metadata darktable uses for more than writing to its output file. Is there a list anywhere?

P.S. I also use RawTherapee and ART, so I would be interested in a similar list (if it exists) from those packages as well.

I have wondered for a while what the technically correct workflow is for stacking. I don’t do it much, but have a few to process lately. I always do the opposite of what you propose here, I do all my editing in darktable, try and get the image “finished” then output the tiffs to stack, and stacking is the last part of it (unless it needs to go into gimp or another pixel editor).

Interesting. I’ve been going on the assumption that editing could affect sharpness, possibly not uniformly, and that in turn could affect the processing in the focus stacking program, so I’ve tried to do as little as possible to the inputs prior to stacking. But of course, I could be totally out to lunch on that.

Hopefully someone who’s in the know can educate us.

I have the same question regarding which order to do focus stack:

  1. process each input image and then stack with only very little touch up, like removing stacking halos, or

  2. Only do capture sharpening and keep everything else neutral (unchanged) and do most edits after stacking.

Currently, I am at 2.

I use align_image_stack and enfuse command line tools from Hugin. The Enfuse manual states that linear output is prefered, so I use 16-bit linear (gamma = 1) tiff:

"...As in all image fusion operations it is preferable to use 16 bit linear 
(i.e. gamma = 1) images  throughout, but 8 bit gamma-encoded images will do. 
Naturally, high signal-to-noise (SNR) ratio input data always is welcome. ..."

I then align and stack with:

align_image_stack -a "../aligned/align_" -m -v --use-given-order <file name sorted list, file1, file2>
enfuse -o "output.tif" --compression=none --contrast-weight=1.00 --exposure-weight=0.00 --saturation-weight=0.00 --contrast-window-size=5 --hard-mask --gray-projector=l-star <file1, file2, ...>

where --gray-projector=l-star is adapted to linear (gamma = 1) encoded data. The procedure is described here.

The cloning of stacking halos I do in Gimp, the rest and final export I do in Darktable or RawTherapee.

Enfuse command line tool has many parameters and tuning is often required, but I have used enfuse to great effect.

Now I have hijacked the original question:

I do not have an answer here. I got stuck on the meta-question of best stacking order.

Not exactly the answer you’re looking for, but when making tiff composites (HDR, collages) I just copy the full metadata from a “representative” member into the final image.

I’d also do what @guille2306 suggests

This is more or less what I find myself thinking too. To get a good stack, the aperture, shutter speed, ISO and white balance should be the same for all the input shots, so the metadata for any one should be fine for most data items.