In 3Ghml mode, a voltage is applied VRef_DB to activate the gain-switching mechanism, so that the pixel will switch from gain n to n+1 when it saturates. A higher value of VRef_DB will make the gain increment at a lower light level.
(more technically, there are 3 capacitors that feed the pixel, and when the small one has discharged and its voltage is under VMid?, the medium one is connected to the pixel via a FE transistor. The ADC measures the residual voltage on the small capacitor first, and if it is under VRefDB, it quits and measures the medium capacitor instead, and if that is under VRefDB it measures the big capacitor instead.)
A value of 26000 seems to be generally accepted for VRef_DB, and you can investigate the effect of the value if you wish.
Put the Percival into 3Ghml mode, and set it running in continuous acquisition. Start the matplotlib live view.
The procedure for setting VRef_DB is common-sense. There are two values we need to ascertain: for the G0/G1 threshold, and the G1/G2 threshold. On FSI10, I discovered these were (26000, 23000). We are forced to go with the higher of these values, and so the G1/G2 switch happens too early reducing the dynamic range of G1 mode.
The procedure is to drop VRef_DB to a low level like 15000, select a light-level where the pixels are saturating their ADCs, and then increase VRef_DB until the pixels have all switched to the higher gain mode.
Here are some screenshots of the kind of thing to expect:
Here we see that half the pixels have saturated as the fine value is 0 blue = low, and the coarse value is 31 maroon = high. The VRef_DB value is too low, as only half the pixels have switched into the correct gain mode for this light-level. Different row-groups have a different level of sensitivity to VRef_DB and this is a fault in the silicon.