Click or drag to resize

ICameraV3Gain 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.DeviceInterface
Assembly:  ASCOM.DeviceInterfaces (in ASCOM.DeviceInterfaces.dll) Version: 3351c4f3fa64146a7efd5b51ed4591e32a0a5484
Syntax
short Gain { get; set; }

Return Value

Type: Int16

GAIN VALUE MODE: The current gain value.

OR

GAINS INDEX MODE: Index into the Gains array for the current camera gain
Exceptions
ExceptionCondition
PropertyNotImplementedExceptionWhen neither GAINS INDEX mode nor GAIN VALUE mode are supported.
InvalidValueExceptionWhen the supplied value is not valid.
NotConnectedExceptionIf the device is not connected
DriverExceptionAn error occurred that is not described by one of the more specific ASCOM exceptions. Include sufficient detail in the message text to enable the issue to be accurately diagnosed by someone other than yourself.
Remarks

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