AstroImager autofocus failure stops a Sequence

Questions, bug reports, requests for enhancements, etc.
User avatar
elmore
Posts: 79
Joined: Tue Dec 04, 2018 2:34 am

AstroImager autofocus failure stops a Sequence

Post by elmore »

In AstroImager, I set up a sequence of observations with a few exposures per filter, a number of filters, and each filter starts with an Autofocus.
Autofocus normally works but sometimes fails due to a period of bad seeing, a wisp of cirrus or some other reason, but the night as a whole is quite suitable for imaging and often the focus was not that bad either.

When Autofocus fails, the Sequence is aborted and the remainder of a whole night of automated exposures is lost.

Is there a way to prevent a Sequence from aborting due to an Autofocus failure?
User avatar
Peter Polakovic
Posts: 2742
Joined: Thu Apr 21, 2016 9:38 am

Re: AstroImager autofocus failure stops a Sequence

Post by Peter Polakovic »

Well, it is not easy to do. After failed autofocus attempt the focus is probably bad, so it doesn't make too much sense to continue :(

Do you know why it failed?
User avatar
elmore
Posts: 79
Joined: Tue Dec 04, 2018 2:34 am

Re: AstroImager autofocus failure stops a Sequence

Post by elmore »

Sorry to hear this is not easy to do. These failures are causing me to loose a lot of imaging time.

Autofocus failures occur for a number of reasons, as I mentioned, a wisp of cloud drifting by can cause a failure on an otherwise good imaging night. This happened once last night. A brief period of wind can do the same.
And, often focus is not too bad after the failure and even if it were bad the Sequence, being stopped, cannot perform additional Autofocus runs later to recover.

That being said, there are a few failures even when conditions are perfect. Last night I did 15 successful Autofocus runs in a row, then the 16th failed under good conditions.

When I do have an Autofocus failure, it is most often after the procedure has nearly converged -- close to perfect focus. I did the calculation for NCFZ for my telescope and converted the result to steps. Visually I can just see a focus difference with a change of ±1 NCFZ so I am happy with the final step size but would not make the final step size any larger. Since there is not a problem at the start, the 5 X NCFZ I use as a starting position seems OK. I use Stack=3. Exposure times are short enough so that stars do not saturate, a couple of seconds. Sometimes I select a star, sometimes not. Radius by default was 8. I used 16 for the long successful run, but then I got the failure so do not understand the significance of radius.

What else is there to try?
User avatar
Peter Polakovic
Posts: 2742
Joined: Thu Apr 21, 2016 9:38 am

Re: AstroImager autofocus failure stops a Sequence

Post by Peter Polakovic »

Maybe a good solution is to repeat autofocus attempt if it failed. This may help to continue the sequence if it failed because of clouds or other temporary situations. I'll do it and we'll see...
User avatar
elmore
Posts: 79
Joined: Tue Dec 04, 2018 2:34 am

Re: AstroImager autofocus failure stops a Sequence

Post by elmore »

I'm looking forward to trying the test version.
User avatar
aaron
Posts: 114
Joined: Thu Apr 09, 2020 11:47 pm
Location: Upstate New York, US
Contact:

Re: AstroImager autofocus failure stops a Sequence

Post by aaron »

I’m happy you are looking at this. I have also lost hours when my automation is defeated by a single cloud.
rumen
Posts: 156
Joined: Wed Feb 22, 2017 7:31 pm

Re: AstroImager autofocus failure stops a Sequence

Post by rumen »

It is ready... it will repeat the auto focus forever. I discussed this with 2 users users and they raised a concern for this approach. that we may end up in endless focusing loop if the clouds do not clear (which is quite often the case). And focusers are clearly not designed for rotating all night long... So is not it better to retry several times (maybe with some delay between the attempts) and if it fails to continue restoring the last known focus position.
The current implementation restores the last known focuser position, but enters in a loop which will finish only if focus is found... And I personally find this a bit dangerous

What do you think?
Last edited by rumen on Sun Sep 19, 2021 4:03 pm, edited 2 times in total.
User avatar
Peter Polakovic
Posts: 2742
Joined: Thu Apr 21, 2016 9:38 am

Re: AstroImager autofocus failure stops a Sequence

Post by Peter Polakovic »

We'll try if the approach works and later we can improve it with e.g. limiting the number of attempts etc.

Another possibility is to repeat it couple of times, restore the position and continue. Maybe the next batch will be out of focus, but the next one can be OK again.
rumen
Posts: 156
Joined: Wed Feb 22, 2017 7:31 pm

Re: AstroImager autofocus failure stops a Sequence

Post by rumen »

Peter Polakovic wrote: Sun Sep 19, 2021 2:20 pm We'll try if the approach works and later we can improve it with e.g. limiting the number of attempts etc.

Another possibility is to repeat it couple of times, restore the position and continue. Maybe the next batch will be out of focus, but the next one can be OK again.
yes this is what i propose...
rumen
Posts: 156
Joined: Wed Feb 22, 2017 7:31 pm

Re: AstroImager autofocus failure stops a Sequence

Post by rumen »

Guys I have one more question:

What do you think should be the default auto focus behavior if auto-focus fails when triggered manually?
1. stop where it failed.
2. return to the initial position where it started.

I am not asking about the sequence, in sequence it makes sense to return to the last focus position as it is assumed that we already had relatively good focus and we need to fine-tune it. I Am asking about the case when one starts the auto-focus by hand when the initial focus is way off... I personally believe that it is better to stop where it failed.

Users input is much appreciated :)
Post Reply