Monitoring the focus metric as a means to trigger auto focus is a moderately popular item requested here on the forum. Some version of SGPro 4 will see it come into beta. The work is largely done and we may decide to put it out with 4.1, but not if it jeopardizes the stability of the current beta. For the most part, 4.1 is “feature locked”. That said, this is a brain dump of how it works and also notes for me when it comes time to write up help files. Need to do this while it’s still at the front of my brain.
A statement about this implementation… it is pre-Beta right now. There will be errors in both thought and implementation. There are almost certainly some edge-case situations that will cause this process to break. Please don’t treat this like a release-ready feature. Use this thread for discussion.
How does it work?
Actuating the Trigger
It’s just another trigger like every other trigger. You can define the allowable change in your focus metric (maybe a percent, maybe a value at 1x1 binning) that is allowed without refocus and then define how many consecutive light frames must be outside of this bound to trigger auto focus. It’s unfortunately a rather simplistic approach to analyzing focus stability, but the truth of the matter is that the average length of an astro-exposure means we are going to be data starved for this measurement. We may only have between 1 and 3 data points before we have to make a decision so using regression or other techniques really isn’t that useful.
The current implementation requires that consecutive frames be above the metric’s change threshold before auto focus is triggered. This can help to compensate for reality and the fact that your HFR measurements from frame to frame may be a little bit jerky…
After Auto Focus
After a successful in-sequence auto focus, SGPro will assign a “baseline measurement”. Every auto focus in a SGPro sequence runs in the context of a Target Event (row on the sequencer). Because events contain properties that can dramatically alter the focus metric for any image, each sequence Event must have its own baseline marker. In other words, SGPro won’t calculate the difference in focus between the image at the end of one event and the beginning of another.
Because each event must have its own baseline, it is highly advisable to couple this trigger with the trigger that will run AF on every filter change. Filters are the most common “separator” of events and doing this will ensure that the new Sequence Event will have a good focus baseline measurement right away.
After Completion of the First Light Frame (after auto focus)
After auto focus for an event, SGPro will use the first focus metric value as the baseline marker for an event. This is the value to which all other measurements will be compared.
After Completion of Subsequent Light Frame
Assuming the Sequence Event has a valid baseline measurement associated with it, we can now measure new images and watch for meaningful change (as specified by you). See the rules above on actuation.
Before Starting the Next Light Frame
If auto focus needs to run, it will run. Afterward, this cycle will repeat.
Other
The event options window will now display its individual Image History along with the value it’s currently using as a baseline. It may be useful in establishing the percent deviation allowed or when troubleshooting, but otherwise, it’s just “interesting data”.
FAQ
With a single absolute value defined for the change threshold, how will it work between various binning modes?
We’ll see how this works and we may end up with a percentage value here, but right now SGPro will just scale this value as required (like it does for every other binning influenced value). The absolute value might be easier to measure since you can use values directly off the existing history charts.
Are Sequence Event baseline markers saved with the sequence or equipment profile?
No, these values are only ever associated with the current session and may not be meaningful between sessions. For instance, the baseline marker at the end of a session the night before may have a higher (less good) focus measurement that the one you can get at the beginning of the session the next night. This mismatch may create a scenario where it takes a long time for the focus measurement to pass the threshold. Your focus won’t be terrible, but it could be better.
Does it work with event rotation?
It does. Because every event has its own baseline measurement, the sequence can move on to the next event without overwriting any “common” baseline.
What about Narrow Band frames?
As long as they are sufficiently integrated and have sufficient data for measurement, they will not be any different from any other type of frame.
What if I use a Broadband Override Filter for my Narrowband Event?
This is also fine. The measurements captured during auto focus are not relevant to this trigger. This trigger will only compare measurements from images in the same event.