×

INDI Library v1.9.9 Released (30 Nov 2022)

Bi-monthly INDI Library released with new drivers and bug fixes.

Linear 1 Pass gives wrong solution

  • Posts: 181
  • Thank you received: 16
The new Linear 1 Pass focusing algorithm is a fantastic improvement. I tried it out yesterday and it worked well, and is a lot more intuitive to use than some of the others.However once I switched filters, something went wrong. It gave the wrong curve fitting solution, and was off by quite some margin. See attached image for example. In this example it is clear that the correct focuser position should be 57,539, but instead the hyperbola solution gave 57,137 as an answer (similar for the other curve fitting methods), and moved the focuser to that position. Going back to the original filter did not have any effect. Has anyone experienced this before, and/or know what could have gone wrong here? Are there any settings perhaps that I should change?

Willem Jan Drijfhout
astroworldcreations.com
Last edit: 4 months 3 weeks ago by W J Drijfhout.
4 months 3 weeks ago #85992
Attachments:

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

  • Posts: 181
  • Thank you received: 16
Update: it turned out that increasing the # steps from 5 to 7 solved this issue in most cases. But with more points on both side of the V-curve further out, in the extremes (HFR 5 and up), the HFR calculation is not very accurate anymore and points can drop off the curve quite a bit, again influencing the hyperbola solution.
So good news is there are some variables to play with that improve the outcomes, even if its less robust than hoped for. But still confused why a curve that is so obviously perfect V-shaped, comes up with such a 'wrong' solution.
Willem Jan Drijfhout
astroworldcreations.com
4 months 3 weeks ago #86096

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

  • Posts: 34
  • Thank you received: 8

Try lowering the step size.
4 months 3 weeks ago #86132

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

  • Posts: 181
  • Thank you received: 16
Thank you Matteo, yes, I tried that as well, but still gave wrong solutions. Should probably play with it a bit more.
Still confused why a perfectly looking V-curve can give such obvious wrong solutions under certain circumstances
Willem Jan Drijfhout
astroworldcreations.com
4 months 3 weeks ago #86133

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

  • Posts: 210
  • Thank you received: 52
Hi W J,
Well that certainly looks like a bug. Can you send me a log and I'll look into it more. If you tick the Verbose, Focus (under Ekos) and Focuser (under Drivers) settings that will capture more info as to what's going on. You can post the log on here.

In the meantime, I see you are using an "U"nweighted curve fit. Unless you have a specific reason to use unweighted, I would suggest using a weighted curve fit. The weighting uses the 1/variance in star HFR as the weight so gives higher "priority" to better datapoints.
The following user(s) said Thank You: W J Drijfhout
4 months 2 weeks ago #86258

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

  • Posts: 858
  • Thank you received: 139
Hi John,

can you explain what R or R² is? The tool tip just states "Set a minimum for the acceptable R² when performing an autofocus run" without explaining what it is or does.

Thanks a lot!
Alfred
4 months 2 weeks ago #86265

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

  • Posts: 210
  • Thank you received: 52
I've updated the focus section of the Kstars manual...
docs.kde.org/trunk5/en/kstars/kstars/tool-ekos.html#ekos-focus

You can search for R².

Here is a link specifically to the R² section...
docs.kde.org/trunk5/en/kstars/kstars/too...ent_of_Determination

Hope this helps.
The following user(s) said Thank You: Alfred
4 months 2 weeks ago #86267

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

  • Posts: 858
  • Thank you received: 139
John,

that's very helpful ineed, a good and thorough explanation, thanks a lot! An updated tooltip providing a hint as to what R² is all about would be nice. Something like "value between 0 and 1 representing how well the fitted curve matches the datapoints. 1 = perfect fit, 0 = off, 0.8 should work in most cases"
4 months 2 weeks ago #86268

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

  • Posts: 210
  • Thank you received: 52
Thanks Alfred, I've made a not of this for my next focus release.
4 months 2 weeks ago #86282

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

  • Posts: 181
  • Thank you received: 16

Thank you John. I will turn on verbose next time (will need som clear skies...) and send the logs.

Good point on the unweighted curve fitting. I had not seen the option on using weighted fit, but have now turned that on.
Willem Jan Drijfhout
astroworldcreations.com
4 months 2 weeks ago #86283

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

  • Posts: 181
  • Thank you received: 16
Hello John, it was a bit of waiting, but yesterday there was another clear night here, so I managed to get the log-file that you required. Same thing happend yesterday with the final solution being very much off from the obvious solution, see images as examples from yesterday. This time I used the weighted option.
For the rest of the evening I went to the Polynomial method, which worked perfectly fine, making a hardware issue less likely.
Hopefully you can see what is causing this issue?

File Attachment:

File Name: log_15-44-06.txt
File Size:546 KB




Best regards, Willem Jan.
Willem Jan Drijfhout
astroworldcreations.com
3 months 3 weeks ago #86977
Attachments:

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

  • Posts: 14
  • Thank you received: 0
Good day! I can report that I've seen a very similar issue. I was using the Quadratic 1-pass method which normally works well for me. In this case it seems to have resolved the focus point but then selected the last sample (value 6166) as the solution. The best solution was 6261. I attached an image and log entries of the autofocus completion summary. Not quite sure why it did this. It's the first time I've witnessed it first hand but I suspect it's happened during long overnight capture sessions as well.

[2022-10-03T21:11:55.342 Atlantic Daylight Time INFO ][ org.kde.kstars.ekos.focus] - "Image received."
[2022-10-03T21:11:55.343 Atlantic Daylight Time INFO ][ org.kde.kstars.ekos.focus] - "Detecting sources..."
[2022-10-03T21:11:55.813 Atlantic Daylight Time INFO ][ org.kde.kstars.ekos.focus] - "Detection complete."
[2022-10-03T21:11:55.814 Atlantic Daylight Time DEBG ][ org.kde.kstars.ekos.focus] - Focus newFITS # 1 : Current HFR 2.92771 Num stars 193
[2022-10-03T21:11:55.839 Atlantic Daylight Time DEBG ][ org.kde.kstars.ekos.focus] - "matchStars: Inputs sized 100 100 found 57 matches, RMS dist 0.9"
[2022-10-03T21:11:55.839 Atlantic Daylight Time DEBG ][ org.kde.kstars.ekos.focus] - "RelativeHFR: sizes: 193 710 hfr: (3.54 (3.04) / 1.28 (1.15)) * 0.93 = 2.59"
[2022-10-03T21:11:55.840 Atlantic Daylight Time DEBG ][ org.kde.kstars.ekos.focus] - "RelativeHFR: orig 2.92771 computed 3.0374 relative 2.58959"
[2022-10-03T21:11:55.840 Atlantic Daylight Time INFO ][ org.kde.kstars.ekos.focus] - "Linear: solution @ 6166 = 2.58959 (expected 0.932548) delta=1.65704"
[2022-10-03T21:11:55.840 Atlantic Daylight Time DEBG ][ org.kde.kstars.ekos.focus] - "Linear: points=[(6363, 1.85126, 1), (6343, 1.54492, 1), (6323, 1.30458, 1), (6303, 1.01641, 1), (6283, 0.954131, 1), (6263, 0.932548, 1), (6243, 1.07784, 1), (6223, 1.4188, 1), (6203, 1.89872, 1)];iterations=9;duration=489;solution=6166;HFR=2.58959;filter='Ha';temperature=7.75;focusalgorithm=3;backlash=0;curvefit=0;useweights=0"
[2022-10-03T21:11:55.843 Atlantic Daylight Time INFO ][ org.kde.kstars.ekos.focus] - "Focus procedure completed after 10 iterations."
[2022-10-03T21:11:55.844 Atlantic Daylight Time INFO ][ org.kde.kstars.ekos.focus] - Autofocus values: position, 6166 , temperature, 8.75 , filter, "Ha" , HFR, 2.92771 , altitude, 66.6429
[2022-10-03T21:11:55.844 Atlantic Daylight Time DEBG ][ org.kde.kstars.ekos.focus] - Stopping Focus
[2022-10-03T21:11:55.881 Atlantic Daylight Time DEBG ][ org.kde.kstars.ekos.focus] - Settled. State: "Complete"

3 months 3 weeks ago #86979

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

Time to create page: 0.750 seconds