×

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

Bi-monthly release with minor bug fixes and improvements

Linear 1 Pass gives wrong solution

  • Posts: 39
  • Thank you received: 9

Try lowering the step size.
1 year 7 months ago #86132

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

  • Posts: 207
  • Thank you received: 18
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
1 year 7 months ago #86133

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

  • Posts: 602
  • Thank you received: 281
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
1 year 7 months ago #86258

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

  • Posts: 989
  • Thank you received: 161
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
1 year 7 months ago #86265

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

  • Posts: 602
  • Thank you received: 281
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
1 year 7 months ago #86267

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

  • Posts: 989
  • Thank you received: 161
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"
1 year 7 months ago #86268

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

  • Posts: 602
  • Thank you received: 281
Thanks Alfred, I've made a not of this for my next focus release.
1 year 7 months ago #86282

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

  • Posts: 207
  • Thank you received: 18

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.
1 year 7 months ago #86283

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

  • Posts: 207
  • Thank you received: 18
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.
1 year 6 months ago #86977
Attachments:

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

  • Posts: 15
  • 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"

1 year 6 months ago #86979

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

  • Posts: 602
  • Thank you received: 281
Hi Willem,

Thanks for sending the logs. I've only spent a couple of minutes looking at them but I can see some "odd" behaviour that I haven't seen before as well as some problematic behavious. So 3 things jump out...

1. The solution in the title bar differs from the number on the graph (as before). I won't be able to work out exactly why, for that you'll need to turn on "verbose" on the logging which prints a lot more information. However, this indicates that the solver is struggling to fit a curve to the data. There could be for many reasons but your data (from the screenshots) looks fine so I don't know why you're getting this. If you also set the "Save Focus Images" option then when you do a focus run it will save the images from each focus point. If you send these to me I can rerun them on my system and hopefully debug the problem. Here is how you turn on that option...


I just need the images from 1 focus run where you get this problem. You'll probably want to turn this off afterwards otherwise over time it will fill up your disk.

2. After taking the 1st datapoint in the run rather than move in 200 steps it moves in 30ish steps, e.g.
"Focusing inward by 32 steps..."

I don't understand how this happens as its not how the algo works (or at least how its supposed to work) and I've not seen this before. So something, somewhere is wrong. Do you have something else (another program) controlling the focuser? What other programs are your running in addition to Kstars? Also what Indi driver are you using for your Sesto Sense 2 focuser? My "guess" is that something is conflicting with the focuser. Maybe its to do with backlash (see next point)? How does your focuser deal with backlash? I think you have 0 set in the backlash field, is that right? How have you configured backlash in Indi?

3. After completing the pass, the focuser moves to the "good" position although its often a poor result. This is an example error message...
"Linear: solution @ 58950 = 1.14882 (expected 0.948629) delta=0.200194 or 4.99394 sigma worse than expected. POOR result. If this happens repeatedly it may be a sign of poor backlash compensation."

So again, I wouldn't expect this just from looking at your data. It suggests that backlash is not being catered for properly. So, what is the backlash value in your focuser? Its worth getting a feel for it. You have 0 in the backlash field I think, in which case the algo uses 5 x Initial Step Size to cope with backlash (i.e. 1000 ticks). If your focuser has more backlash than this then you'll get problems so its worth measuring it and setting it in the backlash field. If, for example, you measured backlash around 100 ticks then I'd set 200 or 300 in the backlash field in Ekos. If you have unpredictable backlash for some reason (poor binding of the focuser to the telescope, for example) then you're going to get unpredictable focus results. This doesn't explain points 1 and 2 however.

So, I'm sorry I've got so many questions rather than any answers. Its not obvious how the 3 points above could have the same root cause so there could be multiple issues here. I'll have a deeper dive into the logs and see if I can find anything else.
1 year 6 months ago #86986
Attachments:

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

  • Posts: 602
  • Thank you received: 281
Hi Ken,
Well thats weird, 6166 is outside the range of travel of the focus pass and its clearly not the curve solution, so something's gone wrong.

Can you post the whole log please. Also, which kstars version are you running?
1 year 6 months ago #86987

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

Time to create page: 3.647 seconds