Refactoring the Focus module.

Authored by TallFurryMan on Apr 5 2020, 12:49 PM.

Description

Refactoring the Focus module.

Summary:
This differential relates to tests and code structure for the Focus module.
Tests show that:

  • There is no way to determine when the star detection procedure is done. The capture button should re-enable when everything is finished.
  • The CCD Simulator needs improvement for some detection mechanisms to work properly.
  • It is difficult to create fixtures with deterministic verifications, although better controlling the simulation time should help.
  • Syncing the mount to object coordinates is a good idea to speed up tests.
  • When not tracking, the CCD Simulator doesn't render trails, it could be a nice improvement.
  • Because kstars_ui_tests is becoming larger, it needs to be divided into multiple smaller tests for efficiency.
  • QTest, because failing a test means returning from the test function, is macro hell.
  • QComboBox is difficult to control programmatically because of its internal signal management.

We then refactor star detection for clarity and consistency in Focus and attempt to reduce side-effects in FITSData:

  • Make FITSData buffer read-only, except for DarkLibrary.
  • Move Threshold, Gradient and Centroid detections out of FITSData.
  • Move SEP detection out of FITSData.
  • Docs, copyrights and adjustments.
  • Removing expected failure on Gradient/Threshold.
  • Adjust KTRY_EKOS_CLICK to use KTRY_EKOS_GADGET.
  • Extract star search block to simplify setCaptureComplete.
  • Reset KStars time after starting Ekos.
  • Fix object fixture builder.
  • Slight delay to overcome the weird toggling of the capture button.
  • Separate/simplify annulus and threshold tests.
  • Delay target chip retrieval when capture is complete.
  • Test frame average, extract code averaging HFRs.

Test Plan: Run kstars_ui_tests.

Reviewers: KStars, mutlaqja

Reviewed By: KStars, mutlaqja

Subscribers: murveit, mutlaqja, kde-edu

Tags: KDE Edu

Differential Revision: https://phabricator.kde.org/D28292

Details

Committed
mutlaqjaApr 8 2020, 5:44 AM
Reviewer
KStars
Differential Revision
D28292: Refactoring the Focus module.
Parents
R321:1dffaa5d7b7c: Turn off meridian flip when operating polar alignment assistant tool
Branches
Unknown
Tags
Unknown