I've written a script for calculating DSLR sensor parameters i.e. gain, read noise and dark current profile over a sequence of dark frames. It will calculate sky fog noise as well if (featureless) light frames are supplied to it.
I hope I've managed to attach a zip file containing the script. The script should be placed in your PixInsight\src\scripts folder. The code is probably not brilliantly written (I'm no JavaScript expert) but it does appear to work.
The output is written to the Process Console. Here is a result from a Sony A7S camera at a constant ambient temperature of 20C:
=============================
DSLR Sensor Parameters v0.0.4
=============================
Camera: Sony ILCE-7S
ISO speed: 2500
Image Size: 4256 x 2848
Bias frames exposure time: 1/8000 sec
Flat frames exposure time: 1/4000 sec
Dark frames exposure time: 297 sec
Light frames exposure time: 302 sec
Gain per channel(e/ADU): [ 1.626, 1.607, 1.608, 1.615 ]
ISO for unit gain: [ 4066, 4018, 4019, 4039 ]
Read Noise(e): [ 1.33, 1.33, 1.34, 1.33 ]
Dark Current (e/pixel/sec) [ 0.1143, 0.1102, 0.1099, 0.1132 ]
Dark Current (e/pixel/sec) [ 0.1216, 0.1168, 0.1175, 0.1218 ]
Dark Current (e/pixel/sec) [ 0.1281, 0.1239, 0.1238, 0.128 ]
...<snip> ...
Dark Current (e/pixel/sec) [ 0.1675, 0.1606, 0.1618, 0.1666 ]
Dark Current (e/pixel/sec) [ 0.1684, 0.1617, 0.1628, 0.1674 ]
Dark Current (e/pixel/sec) [ 0.1711, 0.164, 0.1639, 0.1683 ]
Noise estimates for 297sec exposure
Read Noise(e): [ 1.33, 1.33, 1.34, 1.33 ]
Thermal Noise(e): [ 7.13, 6.98, 6.98, 7.07 ]
Skyfog Noise(e): [ 46.59, 50.87, 50.88, 37.52 ]
Mean values in ADU
Bias Frame 1: [128, 127.9, 127.9, 128 ]
Bias Frame 2: [128, 127.9, 127.9, 128 ]
Flat Frame 1: [850.6, 881.7, 882.1, 532 ]
Flat Frame 2: [831, 860.6, 861, 520.6 ]
Dark Frame 1: [ 126.9, 126.7, 126.9, 126.6 ]
Dark Frame 32: [ 126.6, 126.6, 126.7, 126.5 ]
Light Frame 1: [1367, 1641.5, 1642.1, 903.6 ]
Light Frame 2: [1479.4, 1787.2, 1787.6, 958.4 ]
DSLR Sensor Parameters v0.0.4 Completed.
The results are given for each of the 4 channels: R, G1, G2, B
It's fairly straightforward to use (I hope!)
Pairs of raw bias frames and (unsaturated) raw flat frames must be supplied to calculate gain and read noise (in electrons)
To calculate dark current, a sequence of dark frames must be supplied (at least 2)
For skyfog, 2 light frames must be supplied (with the same exposure time as the darks)
All frames must have the same ISO.
The only issue at present is that if dark frames and bias frames are black clipped to zero (which is typical of Nikon behaviour) then the results will not be reliable. Warnings are produced if black clipping or flat frame saturation is encountered.
The calculations use only the central 25% of the image in both width and height in order to avoid vignetting problems or amp glow effects near the edges.
Any suggestions are welcome!
Regards,
Mark