When auto-focusing, re-capture if no stars are detected, instead of waiting for user selection.
Changes PlannedPublic

Authored by TallFurryMan on Sep 8 2018, 8:06 PM.

Details

Summary

This differential restarts a capture when no stars are detected on the frame, and no special process is taken on the HFR calculation.
The re-capture is only done when auto-focusing. If not auto-focusing, the user is asked to select a star manually under 45 seconds, as was the implementation before.

Test Plan

Arrange for the Focus module to capture a frame without stars (simulator without gsc configured).
Without this change, end-user is asked to select a star manually.
With this change, if auto-focusing, a new capture is attempted again.

Diff Detail

Repository
R321 KStars
Branch
bugfix__focus_waiting_for_star (branched from master)
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 2607
Build 2625: arc lint + arc unit
TallFurryMan created this revision.Sep 8 2018, 8:06 PM
Restricted Application added a project: KDE Edu. · View Herald TranscriptSep 8 2018, 8:06 PM
Restricted Application added a subscriber: kde-edu. · View Herald Transcript
TallFurryMan requested review of this revision.Sep 8 2018, 8:06 PM

Focus module already retries to capture until it gives up and ask user to select the star. Users not using the scheduler will not get a chance to manually select the star if they click "AutoFocus". And when will this fail after no stars detected for an extended period of time?

Focus module does not capture multiple times in the basic auto-focus procedure. It will abort when finding some stars that are unusable, but will go straight to end-user manual operation if there are no stars.

I think end-users clicking auto-focus either select "auto-select star", or choose a preliminary star before clicking. Clicking auto-focus is some sort of fire and forget automatic procedure, even when doing things step by step. Besides, if there are no stars automatically detected on the frame, there's a high chance the focus procedure will fail anyway, even with the end-user clicking something.

About effectively aborting, you raise a doubt so I will double-check that part.

Okay there are two stages here:

  1. Before selecting the auto-star
  2. After selecting the auto-star

For #2, it retries several times if HFR = -1 and then aborts. For #1, if it can't detect a star, it asks user. Nevertheless, with your change, the user will never be asked to select a star manually if autofocus fails to detect one, this will keep going forever. I don't think this behavior should change. Instead, we might need another DBus method to enable/disable "waiting"

TallFurryMan added a comment.EditedSep 9 2018, 6:41 PM

I made a few more tests, I agree with your observation. Using auto-focus and this differential on a no-star frame:

  1. With "auto select star" disabled, procedure runs 1 capture before asking the end-user to select a star.
  2. With "auto select star" enabled, procedure attempts 4 times the analysis of 4 captures before aborting.
  3. With "full frame" enabled, procedure attempts 4 times the analysis of 4 captures before aborting.

Although I'm not sure the end-user will wait 16 frames before aborting, I understand the original behavior to keep is to ask the end-user to select a star when no stars are detected in case 2.

Based on your proposal to have a "wait" flag from D-Bus, I propose to detect the use of the D-Bus method to decide whether the end-user should be involved or not, and to enable or disable "auto select star" for this run.
If the auto-focus procedure was started by the D-Bus method, Focus should abort after X attempts of 4 captures (and we push the decision on whether to wait for clouds to go away to the Scheduler).
If the auto-focus procedure was started by the UI button, Focus should ask the end-user to select a star after 4 attempts of 4 captures (and we discuss how many attempts are OK for the end-user to be requested).

This will only slightly change this differential. What do you think?

TallFurryMan planned changes to this revision.Sep 9 2018, 6:42 PM

Is this PR still applicable to the current code base?

Sorry I'm overbooked, I can't return to this yet.