Click or drag to resize

CameraGain Property

The camera's gain (GAIN VALUE MODE) OR the index of the selected camera gain description in the Gains array (GAINS INDEX MODE)

Namespace:  ASCOM.DriverAccess
Assembly:  ASCOM.DriverAccess (in ASCOM.DriverAccess.dll) Version: 47fc3050f81fcb3d82afbc2247b4489800d53672
public short Gain { get; set; }

Return Value

Type: Int16

GAIN VALUE MODE: The current gain value.


GAINS INDEX MODE: Index into the Gains array for the current camera gain
PropertyNotImplementedExceptionWhen neither GAINS INDEX mode nor GAIN VALUE mode are supported.
NotConnectedExceptionWhen the information is not available. (Some drivers may require an active connection in order to retrieve necessary information from the camera.)
InvalidValueExceptionWhen the supplied value is not valid.

This is an optional property and can throw a PropertyNotImplementedException if Gain is not supported by the camera.

The Gain property is used to adjust the gain setting of the camera and has two modes of operation:
  • GAIN VALUE MODE - The Gain property is a direct numeric representation of the camera's gain.
  • GAINS INDEX MODE - The Gain property is the selected gain's index within the Gains array of textual gain descriptions.

A driver can support none, one or both gain modes depending on the camera's capabilities. However, only one mode can be active at any one moment because both modes share the Gain property to return the gain value. Client applications can determine which mode is operational by reading the GainMin, GainMax and Gain properties. If a property can be read then its associated mode is active, if it throws a PropertyNotImplementedException then the mode is not active.

If a driver supports both modes the astronomer must be able to select the required mode through the driver Setup dialogue.

During driver initialisation the driver must set Gain to a valid value.

Please note that ReadoutMode may in some cases affect the gain of the camera; if so, the driver must be ensure that the two properties do not conflict if both are used.

This is only available in Camera Interface Version 2 and later.

See Also