I've just read Karl Lang's excellent whitepaper - Rendering the Print: the Art of Photography. In it, he mentions that the ratio of light to dark in a 'natural scene' can have a ratio of 100,000:1, a modern high-end sensor can only capture a range of 8,000 to 1, while a modern pigment printer can only print something like 250:1. He also mentions that it is possible to capture the full dynamic range of a scene using a spectral pixmap though he says this is not practical for general use for reasons of cost and duration of capture. This got me wondering about RAW data generated from sources other than consumer cameras, or created artificially to represent the full possible dynamic range. Do any such RAW files exist? I appreciate that shooting HDR is a way to achieve a similar end, but I'm interested in seeing (and hopefully playing with) a RAW file containing data for the full potential dynamic range.
To achieve 100,000:1 dynamic range the raw file would need to store 17 or more bits per pixel, since 2^16 =65536. Which is by no means normal but could be done with CG data.
In darktable, at least, there exists the ability to create an HDR "RAW" file (DNG format) by merging two or more bracketed exposure RAW files, which can then be processed as any other RAW file. It's kind of an oddball feature, and very sensitive to any movement in the frame between shots compared to other forms of exposure merging (even slightly drifting clouds can create bad artifacts), but it does make for a nice HDR workflow when it works. Some implementation details (source):
first, a disclaimer: this merging process is really dumb. it was very fast to implement, that's why we have it. you will probably run into situations where it's not appropriate to use it.
it just merges the plain raw pixels, the only thing done to them is subtraction of black level, scaling to white according to their exposure/aperture/iso settings, and then the values are written to dng.
doing it that way doesn't require to extract a `camera response curve' as needed for jpg. in fact, it doesn't even demosaic.
UPDATE: I recently became aware of HDRMerge, but haven't used it yet. It appears to be similar to the darktable approach of combining the RAW data directly and outputting a DNG file with otherwise unprocessed data.
You can download raw Hubble image data here in FITS format, most of this data has never been processed into viewable images. This tutorial explains how you can process these files using the free of charge program FITS Liberator to e.g. 16 bit tiff files that you can then process further using other image processing software.