×

INDI Library v2.0.7 is Released (01 Apr 2024)

Bi-monthly release with minor bug fixes and improvements

What if the autofocus fails?

  • Posts: 207
  • Thank you received: 18
If the autofocus routine fails and cannot find a solution, how will that impact a sequence?
I ran into this problem recently, when autofocus failed due to some transient clouds passing by. The autofocus routine could not find any stars in the image. After several attempts it gave up and put the focuser back in the position where it was before autofocus started. However, the imaging sequence did not resume, it was waiting for the autofocus routine to complete. Luckily I noticed, as it was still during evening hours, and got the system to go again. But if this would have happened during the night, it would have cost me a full night of imaging.
What setting can I change to discard failed autofocus runs and resume the sequence using the prior focus position?
Running KStars 3.6.2 on Linux, using Linear 1 Pass focusing algorithm.
The following user(s) said Thank You: Jasem Mutlaq
1 year 4 months ago #88930

Please Log in or Create an account to join the conversation.

  • Posts: 602
  • Thank you received: 281

Replied by John on topic What if the autofocus fails?

Hi Willem Jan,

So autofocus will try 3 times and if it can't complete it resets the focus position and returns control to the scheduler with status of fail. How have you got the aborted job management setup in the scheduler? I'm running a simulation of this at the moment with "immediate" restart of failed jobs and the scheduler restarts an autofocus run as expected.

This continues until focus works, for example, clouds go away.
1 year 4 months ago #88932

Please Log in or Create an account to join the conversation.

  • Posts: 207
  • Thank you received: 18
Hi John, thank you for your suggestions. The case I mentioned was just running a sequence in the camera module, not the scheduler. If there is just one target I go for, it is just one extra complication less.
But based on your suggestions, I have used the scheduler during the last few days, with the aborted job management set to 'immediate'. No failed focus runs so far (good news...:-), but this should indeed solve the issue. I guess the option 'Re-schedule errors' should be ticked as well? The description reads that it treats errors as aborts. A failed focus run is probably an error and not automatically an abort? Also, I've set the wait for 300s. Assuming these errors occur when clouds roll in, no need to keep trying continuously, but a 5 min. wait to see if clouds have cleared is probably more realistic?
Looks like this might solve the problem. Thanks again.

Still would be nice that if you don't use the scheduler, the sequencer would continue with old focus position should something go wrong, instead of just stopping.

Oh, and btw, the Linear 1 Pass algorithm works flawlessly every time. Great work! It is by far my preferred method in Ekos now. HFR values of the far out of focus areas can vary a lot, but it does not affect the autofocus outcome, especially not with 'use weights' ticked. I get the feeling it is mostly because the star detection algorithm often misses a lot of stars if out of focus a lot. Perhaps there are settings in that algorithm that can be altered to be a bit more forgiving in star detection.

1 year 4 months ago #89066
Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 602
  • Thank you received: 281

Replied by John on topic What if the autofocus fails?

Hi Willem Jan,

Glad L1P is working for you.

I think the basic idea is if the user is running "manually" (without the scheduler) then its upto the user to deal with issues/errors. If you are using the scheduler then this is where the "smarts" kick in to deal with issues. Personally I almost always use the scheduler even when I"m watching the equipment as it catches issues / errors and makes sure things are done in the correct order.

So, as you move more out of focus each star gets smeared out more and more as its energy is spread over a wider and wider area. Dim stars that are detectable when in focus gets dimmer and slip into the background and can no longer be detected (however good the star detection algorithm).

That said there is more that can be done to optimise star detection. The SEP method is quite sophisticated and the profiles are editable but its quite a complex topic.

I would recommend setting "use weights" on (as you are doing) as it uses the (1 / variance in star HFR) as the weighting to the curve fitting process. What that means is that for datapoints where the stars are very similar in HFR, the weighting is relatively high; whilst for less consistent datapoints the weighting is relatively low. The bigger the "error bars" on the datapoint the lower the weighting. Generally, datapoints closer to focus will get a higher weighting.
1 year 4 months ago #89073

Please Log in or Create an account to join the conversation.

  • Posts: 207
  • Thank you received: 18
Thanks John. Yes, using the scheduler more, even if not strictly needed, seems like the way to go.

Indeed, modifying the SEP parameters seemed like a daunting experience. Not something to easily experiment with. As mentioned, happy with how it is working now.
1 year 4 months ago #89074

Please Log in or Create an account to join the conversation.

Time to create page: 0.209 seconds