I find this a bit confusing as well.
For one thing, either the driver for the camera or the capture software (SGP) is bit shifting the pixel values for my ASI1600MM-cool to make them 16 bits in the FITS file. But it's not doing them as "0000 nnnn nnnn nnnn", it's doing them as "nnnn nnnn nnnn 0000". So the 16 bit pixel values in the FITS file are between 0 and around 65535 and always divisible by 16.
Since PixInsight works with normalized values in the range of 0 to 1, I'm assuming that any processes or scripts that use gain and bitness for input, are just doing the math internally. On that assumption, I have measured the gain for the settings that I frequently use and have recorded the values as both 12 bit and 16 bit. I figure that if I tell a process or script that the camera is 12 bits, then I need to provide the gain in terms of 12 bits. And if I tell a process or script that the camera is 16 bits (which is what the FITS files look like), then I express the gain in terms of 16 bits.
For processes that use read noise as input, I need to make sure that the gain and read noise are both expressed in the same bitness terms.
For example, here is the gain and read noise information that I've measured and recorded for my camera:
Setting : Gain=200, Offset=50
Gain : 0.478e-/ADU @ 12 bits
Gain : 0.030e-/ADU @ 16 bits
Read Noise: 1.424e-
Setting: Gain=76, Offset=40
Gain: 1.972e-/ADU @ 12 bits
Gain: 0.123e-/ADU @ 16 bits
Read Noise: 2.064e-
And here are the values that I use for MureDenoise. Note that I'm using the 16 bit gain values, so I'm dividing my read noise values (expressed in electrons) by the gain at 16 bits to get the value I provide. (Actually, if you do the math, you'll see that my read noise is just a small amount different from what you get by doing the division that I just described. I assume that the Read Noise that I recorded for MureDenoise was actually measured independent of my original camera values above, and probably on another day.)
Gain 76, Offset 40:
Gain = 0.123 e/ADU
Read Noise = 16.743 ADU
Gain 200, Offset 50:
Gain = 0.030 e/ADU
Read Noise = 47.726 ADU
I hope that this makes sense. And if I am way off base, I would love to be corrected.
Thanks,
-Wade