Skip to content

In Sequence HFR Check Refactor

John Evans requested to merge johnevans/kstars:inseqhfr into master

Refactor of the in-sequence HFR Check code. Existing functionality:

  1. File based HFR allows user to specify a constant value.
  2. Maintains a per filter list of Autofocus and HFR Check, HFR data in time order and selects median value from the list when each datapoint comes in from focus.

Point 1) has bugs and in essence doesn't work. Point 2) appears to be a "strange" algorithm and doesn't appear to make sense. Probably should be decommissioned?

New code:

  1. Fixed. User-specified, HFR per sequence. Can be changed by the user when the sequence is running.
  2. Last Autofocus. This is the default algorithm. Each time Autofocus runs, the Focus supplies the HFR, a user specified tolerance % is added and this value becomes the reference HFR that subsequent HFR checks run against.
  3. Median Measure. This is the existing algorithm. Decommission this in future if no users have a use for it.
  4. All HFR Check parameters are now in limits.ui (used to be spread between limits.ui and opsekos.ui).

Other Fixes

  1. Code now works with filter offsets.
  2. Setting "refocus every x mins" and HFR Checks together now works as expected.
  3. Setting "refocus after Meridian Flip" and HFR Checks together now works as expected.

Other related things - probably not part of this MR

  1. Proposal from Alfred for an algorithm to look at Capture Sub HFR in combination with Focus Frame HFR to trigger AF.
  2. Send HFR Check + other autofocus data to Analyze - need to discuss with Hy.
  3. Maybe move Adaptive Focus controls to limits.ui
  4. Specific control to "Average over" user specified number of Focus frames (decoupled from Autofocus Average Over widget).
Edited by John Evans

Merge request reports

Loading