Here's a patch against jucifox branch rev 473 that implements raw subtract.
This allows you to subtract one raw image from one or more other raw images on the camera. This could be useful for dark frames, but see below.
Configuration:
Four options are added to the raw settings page:
Raw subtract prefix and
Raw subtract extension control the name of the output file. It should not be the same as the name of the files you will be subtracting.
Subtract input dark value sets what value in the file being subtracted is considered zero. This should be around lowest value that occurs in your dark frames. On my camera, this appears to be in the range of 20-30, but lower values appear to give better looking results, at the expense of darkening the entire image very slightly.
Subtract output dark value sets the minimum value that will produced by subtracting. What this should be depends on what you intend to do with the file. If you are going to convert it using dcraw or similar, 0 will probably give the best results, but be warned that dcraw may do strange things to a file that has large areas of zeros.
User interface:
Using the file browser, mark one or more files with the "right" key, and then navigate to the file you wish to subtract from them. Click the "left" key and select "sub from marked" in the popup. Currently, all files must be in the same directory.
Each pixel in the selected file will be subtracted from the corresponding pixel in each of the marked files. The results will be written to PFX_NNNN.EXT, where PFX and EXT are whatever you selected in the raw options menu, and NNNN is the number of the input file. This is fairly slow, since it has to read two raw files and write one, and it does it a row at a time to keep memory use sane.
Is this actually useful ?
I'm not so sure.
I haven't included my
darkframe control code mentioned earlier, because its ugly, requires quite a bit of hacking for each camera, and is not nearly as useful as
directly controlling the shutter.