take_gain_reference#
- Client.take_gain_reference(frame_rate: float, target_electrons_per_pixel: float = None, timeout: int = 600, counting: bool = False)#
Take a gain reference.
Note that this function will first call the
take_trial_gain_reference
function which returns the number of electrons per pixel per second (eppixps) as well as if any pixels are close to saturation.The total number of acquisitions is calculated based on the target eppixps. If the time to acquire the target electrons per pixel is longer than the timeout, the function will raise an ValueError suggesting to increase the beam intensity, increase the timeout (or decrease the target electrons per pixel–> Not recommended).
- Parameters:
frame_rate (float, optional) – The frame rate, by default 20 frames per second
target_electrons_per_pixel (float, optional) –
- The target number of electrons per pixel, by default 16000 for integrating and 2000 for counting.
A warning will be raised if the target_electrons_per_pixel is less than 1000.
timeout (int, optional) – The timeout in seconds, by default 600. This will raise an error if the time to acquire is longer then timeout
counting (bool, optional) – If True, the gain reference will be taken in counting mode, by default False. This is useful for cameras that support counting mode and can be used to take gain references with a lower noise level.