AutoFocus: Start and End Focuser Positions vs. Step Size and Number of Steps from Current Position

Questions and answers about the best way to get started with Prism including: est hardware to use, software settings, etc..
Post Reply
RowlandA
Posts: 12
Joined: Tue Jul 10, 2018 7:49 pm

Sun Jul 15, 2018 7:34 am

Hi Hamza,

I am continuing my evaluation of Prism - thanks for your help so far!

The Autofocus routine seems a bit different than what I've seen before. In everything else I've used, you specify a step size and number of steps, and the Autofocus routine computes the start and end of the V curve based on those parameters. I.e., you multiply the number of steps times the step size, and that's the end-to-end size of the V-curve. The Autofocus routine then moves in (or out) half that amount and starts taking images and measuring HFD/FWHM to plot the V-curve.

Prism's Autofocus routine asks me to specify a starting and ending position for the V-curve. For my case (with a Moonlite Nitecrawler focuser), the starting and ending positions could vary quite a bit in the course of the night as the temperature drops. If I use Automation with Autofocus every 45 minutes and go to sleep, I won't be there to change the starting and ending positions as the night progresses.

Example - at the start of the night, the CFZ might be around position 23000 and a good V-curve would start at 21000 and end at 25000. Before dawn, the CFZ may be around 17500 and a good V-curve would start at 15500 and end at 19500. If Autofocus tried to use the start and end positions that worked at the beginning of the night, it may never find focus. But if it used a step size and number of steps relative to the current position, and refocused as the temperature changed, it would work all night.

Is there some way to make Autofocus work this way? Or have I misunderstood how it works?

If not, is there some way to tap into an external Autofocus routine such as Focusmax or @Focus3 in TheSkyX?

I like so much about Prism, but this feels like a potential show-stopper.

Your Flash Sale caught my eye, but I'm reluctant to purchase with this open issue.

Thanks for your time,
Rowland
Hamza Touhami
Site Admin
Posts: 277
Joined: Sat May 20, 2017 6:05 pm
Location: Phoenix,AZ
Contact:

Wed Jul 18, 2018 5:43 pm

Hi Rowland

Thanks for the great question. PRISM takes a rather simple and reliable way to autofocus. It is not far-fetched to ask where the start and end of the autofocus routine is and one has to account for ALL telescope setups out there. Some cases with SCT are hard to deal with because of mirror flop and the such. With some crayford style focusers, it is barely possible to focus after the actual focuser slips under heavy loads if not adjusted properly. One has to wonder what could be asked of a piece of software. Some software packages are designed from the ground up to do the one task, this is hardly the case for PRISM.

This is no way an apology for PRISM but rather an explanation of the breadth of the scope it faces. Now to the questions relating to a solution, one that I could think about when great variability is present,especially if it is temperature differential related, is to investigate "Temperature Compensation" to keep up with the changes overnight.

A different angle altogether; it is possible to write whatever function you wish in PRISM using the PGM scripting language. I am not sure what programming capabilities you have but felt I should mention it anyway.Some users went as far as writing their own automation script.
Hamza Touhami | Site Administrator
Hyperion-Astronomy.com

Image
RowlandA
Posts: 12
Joined: Tue Jul 10, 2018 7:49 pm

Thu Jul 19, 2018 3:27 am

Hi Hamza -

Thanks for your thoughtful response and yes, I totally understand that Prism has to deal with a wide range of equipment. That said, the autofocus approach of starting in the middle of the V-curve and stepping in or out is field-tested and seems to work well on a wide variety of systems too, as it is used by FocusMax, SGP and probably others.

Your insight about temperature compensation is on the money. I believe there are two problematic situations for Prism's current autofocus process that uses a fixed starting and ending position:

1) Temperature changes and causes those positions to change - a temperature compensation routine should address this
2) I change my equipment and this changes the starting and ending autofocus positions - temperature comp would not fix this

Regarding (2), e.g. if I change cameras on my OTA, the start and ending point of my V-curve may also change. If the autofocus routine uses step size and number of steps, and I start the night near focus, SGP's and FocusMax's autofocus routines will keep me in sharp focus all night and I don't have to change any autofocus parameters. With Prism's current approach, I do have to calculate and change the start and end focuser positions and probably do a test run to make sure my changes are correct.

If the autofocus routine assumes you start somewhere near focus, there is no need to change any settings.

As you know, the fewer changes needed in a working system, the better!

I honestly do believe it is worth yours and Cyril's time to think about starting autofocus at the middle of the V-curve and stepping in or out rather than going to a fixed focuser position at the start. I believe this is a more adaptive algorithm that may save you support headaches and get your clients better results. Perhaps it could be an alternative setting if you have customers who demand the current approach. Please give this some consideration.

I agree that slipping Crayford focusers (I had one, gone!!) and mirror flop are problematic. If the hardware isn't working right, we should fix our hardware rather than expecting the software to somehow compensate.

Regarding programming, yes, I'm a hacker :) . 35 years doing software development and managing developers. I'll have a look at the scripting guide.

Cheers,
Rowland
Hamza Touhami
Site Admin
Posts: 277
Joined: Sat May 20, 2017 6:05 pm
Location: Phoenix,AZ
Contact:

Thu Jul 19, 2018 1:10 pm

Excellent post Rowland. Changing equipment is handled in PRISM as you can save the entire software's settings for each setup. This will address your hardware changes. PRISM is being developed continuously and we welcome Ideas such as this one. One thing to keep in mind however; PRISM has exceeded 1 million lines of code in June of 17, this shows you the depth and complexity of the software. Not saying we will not improve what we have already, it is a matter of coding good products and ensuring the rest of the customers still have a working copy :lol:
Hamza Touhami | Site Administrator
Hyperion-Astronomy.com

Image
RowlandA
Posts: 12
Joined: Tue Jul 10, 2018 7:49 pm

Fri Jul 20, 2018 5:48 pm

Stability first! No matter what the fancy enhancement, if you accidentally break any of the basics, you'll be hearing from customers you forgot you had :) :).

And I appreciate that you have to serve a very large community with a wide range of needs and equipment. It's not easy!

I'm glad you don't mind getting suggestions, I know they may or may not ever get implemented. That said, I've often gotten some of the best ideas for my team's software products from customers - they often have a different point of view and it can be helpful.

Cheers,
Rowland
Post Reply