Skip to content

Changes for the implementation of the optimal sub-exposure calculator.

Joseph McGee requested to merge stingray/kstars:exposurecalculator into master

Overview

Implementation of an optimal sub-exposure calculator based upon the work of, and presentation by, Dr Robin Glover. The calculator considers multiple inputs to determine a sub-exposure time which will provide minimal overall noise in the image:

  • a sky quality measurement (SQM) for light pollution
  • the optic focal length
  • a filter bandwidth
  • camera read-noise (based upon gain/iso)
  • an optional adjustment to the allowable increase in noise from light pollution

As inputs are adjusted the calculator will refresh graphic presentation of potential exposure times of the range of gains, and update calculated outputs. The output values are separated into two sections: one for the sub-exposure, and another for image stacks of various integration times.

The sub-exposure outputs are:

  • the optimal sub-exposure time
  • the count of electrons produced from light-pollution
  • the shot noise, (noise from light pollution)
  • the total exposure noise, (the combined noise from light-pollution and camera read-noise)

The image stack information is presented in a table showing:

  • planned integration hours
  • the count of exposures to reach the planned integration hours
  • the actual stack (integration time) in seconds
  • the noise for the stack
  • a ration of stack time to noise, (as a indicator of quality)

Instantiation of a calculator

An instance of the sub-exposure calculator can be started from a new 'clock' icon on the ekos capture screen. Multiple instances of the sub-exposure calculator can be started concurrently so that side-by-side comparisons can be made for variations in inputs.

Data for camera read-noise will be provided through individual xml files which will be user maintained and published in a repository. These camera data files persisted within a folder "exposure_calculator" under user/local/share/kstars. The calculator includes the capability to download camera files from a repository. Upon the initial start of the calculator at least one camera data file download will be mandatory before the calculator can be instantiated.

The intent is that camera data file names will be used to allow the calculator to select an appropriate camera data file based upon the device id of the active camera. (But some of the initial camera files were named using educated guesses, and will likely need to be re-named).

Details of the implementation

The bulk of the new code for the calculator is contained in a folder kstars/ekos/capture/exposurecalculator. Changes were made to capture.ui to add the icon button. Changes were made to capture.cpp and capture.h to implement the the method "openExposureCalculatorDialog" that instantiates a sub-exposure calculator.

For anyone wishing to create a new camera data file; there is method "buildCameraDataFile" in the fileutilitycamera.cpp that includes the code used to construct the initial dozen camera data files.

(Finally, the code for the calculator will need a thorough review by developers. My experience with C++ is very limited, the bulk of that experience was more than 20 years ago, and this effort was my first experience with Qt.)

Merge request reports