×

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: 15
  • Thank you received: 0
John,

Thanks for the detailed explanation! I understand much better now. Yes, I see what you're talking about now. There does appear to be a problem here. Below is the debug messages from the driver for this example. I think I'll share this with Robert Brown as well who developed this focuser.

BTW, I tried 1-pass Hyperbolic and Parabola again tonight and both failed in the same way! Therefore my statement that Parabola works is in fact false. Also, the backlash setting is greyed out for me. For now I switched back to the Linear mode.

Does this log shed any additional light on the topic? I'm not sure if the focuser commands are standard or specific to this focuser. I'll check with Robert on this.

[2022-11-02T20:46:47.421 Atlantic Daylight Time DEBG ][ org.kde.kstars.ekos.focus] - "Linear: Solution #4: 10184.6 = 1.49838 @ 10083"
[2022-11-02T20:46:47.421 Atlantic Daylight Time DEBG ][ org.kde.kstars.ekos.focus] - "Linear: 1stPass solution @ 10083: pos 10184.6 val 1.49838, min measurement 1.40694"
[2022-11-02T20:46:47.429 Atlantic Daylight Time DEBG ][ org.kde.kstars.ekos.focus] - "Error in CurveFitting::calculateR2 called for Quadratic"
[2022-11-02T20:46:47.434 Atlantic Daylight Time DEBG ][ org.kde.kstars.ekos.focus] - "Linear: extending outward movement by 100"
[2022-11-02T20:46:47.435 Atlantic Daylight Time INFO ][ org.kde.kstars.ekos.focus] - "Focusing outward by 202 steps..."
[2022-11-02T20:46:47.617 Atlantic Daylight Time DEBG ][ org.kde.kstars.indi] - MyFocuserPro2 : "[DEBUG] CMD <:01#> "
[2022-11-02T20:46:47.617 Atlantic Daylight Time DEBG ][ org.kde.kstars.indi] - MyFocuserPro2 : "[DEBUG] RES <I0#> "
[2022-11-02T20:46:47.617 Atlantic Daylight Time DEBG ][ org.kde.kstars.indi] - MyFocuserPro2 : "[DEBUG] CMD <:0510285#> "
[2022-11-02T20:46:47.618 Atlantic Daylight Time INFO ][ org.kde.kstars.indi] - MyFocuserPro2 : "[INFO] Focuser is moving to position 10285 "
[2022-11-02T20:46:48.516 Atlantic Daylight Time DEBG ][ org.kde.kstars.indi] - MyFocuserPro2 : "[DEBUG] CMD <:00#> "
[2022-11-02T20:46:48.557 Atlantic Daylight Time DEBG ][ org.kde.kstars.indi] - MyFocuserPro2 : "[DEBUG] RES <P10184#> "
[2022-11-02T20:46:48.558 Atlantic Daylight Time DEBG ][ org.kde.kstars.ekos.focus] - Abs Focuser position changed to 10184 State: Busy
[2022-11-02T20:46:48.558 Atlantic Daylight Time DEBG ][ org.kde.kstars.indi] - MyFocuserPro2 : "[DEBUG] CMD <:01#> "
[2022-11-02T20:46:48.606 Atlantic Daylight Time DEBG ][ org.kde.kstars.indi] - MyFocuserPro2 : "[DEBUG] RES <I1#> "
[2022-11-02T20:46:48.646 Atlantic Daylight Time DEBG ][ org.kde.kstars.indi] - MyFocuserPro2 : "[DEBUG] CMD <:01#> "
[2022-11-02T20:46:48.687 Atlantic Daylight Time DEBG ][ org.kde.kstars.indi] - MyFocuserPro2 : "[DEBUG] RES <I1#> "
[2022-11-02T20:46:50.658 Atlantic Daylight Time DEBG ][ org.kde.kstars.indi] - MyFocuserPro2 : "[DEBUG] CMD <:01#> "
[2022-11-02T20:46:50.709 Atlantic Daylight Time DEBG ][ org.kde.kstars.indi] - MyFocuserPro2 : "[DEBUG] RES <I0#> "
[2022-11-02T20:46:50.750 Atlantic Daylight Time DEBG ][ org.kde.kstars.ekos.focus] - "Linear: un-doing extension. Moving back in by 100"
[2022-11-02T20:46:50.750 Atlantic Daylight Time INFO ][ org.kde.kstars.ekos.focus] - "Focusing inward by 100 steps..."
[2022-11-02T20:46:50.752 Atlantic Daylight Time INFO ][ org.kde.kstars.indi] - MyFocuserPro2 : "[INFO] Focuser reached requested position. "
[2022-11-02T20:46:50.791 Atlantic Daylight Time DEBG ][ org.kde.kstars.indi] - MyFocuserPro2 : "[DEBUG] CMD <:01#> "
[2022-11-02T20:46:50.921 Atlantic Daylight Time DEBG ][ org.kde.kstars.indi] - MyFocuserPro2 : "[DEBUG] RES <I0#> "
[2022-11-02T20:46:50.961 Atlantic Daylight Time DEBG ][ org.kde.kstars.indi] - MyFocuserPro2 : "[DEBUG] CMD <:0510084#> "
[2022-11-02T20:46:50.962 Atlantic Daylight Time INFO ][ org.kde.kstars.indi] - MyFocuserPro2 : "[INFO] Focuser is moving to position 10084 "
[2022-11-02T20:46:52.711 Atlantic Daylight Time DEBG ][ org.kde.kstars.indi] - MyFocuserPro2 : "[DEBUG] CMD <:00#> "
[2022-11-02T20:46:52.761 Atlantic Daylight Time DEBG ][ org.kde.kstars.indi] - MyFocuserPro2 : "[DEBUG] RES <P10106#> "
[2022-11-02T20:46:52.802 Atlantic Daylight Time DEBG ][ org.kde.kstars.ekos.focus] - Abs Focuser position changed to 10106 State: Busy
[2022-11-02T20:46:52.803 Atlantic Daylight Time DEBG ][ org.kde.kstars.indi] - MyFocuserPro2 : "[DEBUG] CMD <:01#> "
[2022-11-02T20:46:52.842 Atlantic Daylight Time DEBG ][ org.kde.kstars.indi] - MyFocuserPro2 : "[DEBUG] RES <I1#> "
[2022-11-02T20:46:52.842 Atlantic Daylight Time DEBG ][ org.kde.kstars.indi] - MyFocuserPro2 : "[DEBUG] CMD <:01#> "
[2022-11-02T20:46:52.883 Atlantic Daylight Time DEBG ][ org.kde.kstars.indi] - MyFocuserPro2 : "[DEBUG] RES <I1#> "
[2022-11-02T20:46:54.863 Atlantic Daylight Time DEBG ][ org.kde.kstars.indi] - MyFocuserPro2 : "[DEBUG] CMD <:01#> "
[2022-11-02T20:46:54.914 Atlantic Daylight Time DEBG ][ org.kde.kstars.indi] - MyFocuserPro2 : "[DEBUG] RES <I0#> "
[2022-11-02T20:46:54.955 Atlantic Daylight Time DEBG ][ org.kde.kstars.ekos.focus] - "Focus position reached at 10106, starting capture in 0 seconds."
[2022-11-02T20:46:54.956 Atlantic Daylight Time INFO ][ org.kde.kstars.ekos.focus] - "Capturing image..."
[2022-11-02T20:46:54.958 Atlantic Daylight Time INFO ][ org.kde.kstars.indi] - MyFocuserPro2 : "[INFO] Focuser reached requested position. "
[2022-11-02T20:46:56.917 Atlantic Daylight Time DEBG ][ org.kde.kstars.indi] - MyFocuserPro2 : "[DEBUG] CMD <:00#> "
[2022-11-02T20:46:57.012 Atlantic Daylight Time DEBG ][ org.kde.kstars.indi] - MyFocuserPro2 : "[DEBUG] RES <P10084#> "
[2022-11-02T20:46:57.012 Atlantic Daylight Time DEBG ][ org.kde.kstars.ekos.focus] - Abs Focuser position changed to 10084 State: Ok
[2022-11-02T20:46:59.005 Atlantic Daylight Time DEBG ][ org.kde.kstars.indi] - MyFocuserPro2 : "[DEBUG] CMD <:06#> "
[2022-11-02T20:46:59.049 Atlantic Daylight Time DEBG ][ org.kde.kstars.indi] - MyFocuserPro2 : "[DEBUG] RES <Z8.50#> "
[2022-11-02T20:47:01.047 Atlantic Daylight Time DEBG ][ org.kde.kstars.indi] - MyFocuserPro2 : "[DEBUG] CMD <:00#> "
[2022-11-02T20:47:01.088 Atlantic Daylight Time DEBG ][ org.kde.kstars.indi] - MyFocuserPro2 : "[DEBUG] RES <P10084#> "
[2022-11-02T20:47:05.116 Atlantic Daylight Time DEBG ][ org.kde.kstars.indi] - MyFocuserPro2 : "[DEBUG] CMD <:00#> "
[2022-11-02T20:47:05.157 Atlantic Daylight Time DEBG ][ org.kde.kstars.indi] - MyFocuserPro2 : "[DEBUG] RES <P10084#> "
[2022-11-02T20:47:07.189 Atlantic Daylight Time INFO ][ org.kde.kstars.ekos.focus] - "Image received."
[2022-11-02T20:47:07.190 Atlantic Daylight Time INFO ][ org.kde.kstars.ekos.focus] - "Detecting sources..."
[2022-11-02T20:47:08.076 Atlantic Daylight Time INFO ][ org.kde.kstars.ekos.focus] - "Detection complete."
[2022-11-02T20:47:08.078 Atlantic Daylight Time DEBG ][ org.kde.kstars.ekos.focus] - Focus newFITS # 1 : Current HFR 3.89144 Num stars 242
[2022-11-02T20:47:08.080 Atlantic Daylight Time DEBG ][ org.kde.kstars.ekos.focus] - "matchStars: Inputs sized 100 100 found 46 matches, RMS dist 2.3"
[2022-11-02T20:47:08.081 Atlantic Daylight Time DEBG ][ org.kde.kstars.ekos.focus] - "RelativeHFR: sizes: 242 749 hfr: (4.97 (4.27) / 1.64 (1.43)) * 1.41 = 4.25"
[2022-11-02T20:47:08.081 Atlantic Daylight Time DEBG ][ org.kde.kstars.ekos.focus] - "RelativeHFR: orig 3.89144 computed 4.26935 relative 4.25412"
[2022-11-02T20:47:08.081 Atlantic Daylight Time INFO ][ org.kde.kstars.ekos.focus] - "Linear: solution @ 10084 = 4.25412 (expected 1.40694) delta=2.84718"
[2022-11-02T20:47:08.081 Atlantic Daylight Time DEBG ][ org.kde.kstars.ekos.focus] - "Linear: points=[(10263, 3.21188, 1), (10243, 2.54503, 1), (10223, 1.8966, 1), (10203, 1.41915, 1), (10183, 1.40694, 1), (10163, 1.66297, 1), (10143, 2.0336, 1), (10123, 2.74896, 1), (10103, 3.32861, 1), (10083, 4.26049, 1)];iterations=10;duration=170;solution=10084;HFR=4.25412;filter='';temperature=8.75;focusalgorithm=3;backlash=0;curvefit=0;useweights=0"
[2022-11-02T20:47:08.089 Atlantic Daylight Time INFO ][ org.kde.kstars.ekos.focus] - "Focus procedure completed after 11 iterations."
[2022-11-02T20:47:08.090 Atlantic Daylight Time INFO ][ org.kde.kstars.ekos.focus] - Autofocus values: position, 10084 , temperature, 8.25 , filter, "" , HFR, 3.89144 , altitude, 49.4518
[2022-11-02T20:47:08.090 Atlantic Daylight Time DEBG ][ org.kde.kstars.ekos.focus] - Stopping Focus
[2022-11-02T20:47:08.100 Atlantic Daylight Time DEBG ][ org.kde.kstars.ekos.focus] - Settled. State: "Complete"
1 year 4 months ago #88434

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

  • Posts: 15
  • Thank you received: 0
John,

Here are the command descriptions:

[2022-11-02T20:46:47.618 Atlantic Daylight Time INFO ][ org.kde.kstars.indi] - MyFocuserPro2 : "[INFO] Focuser is moving to position 10285 "
CMD <:00#> = Get current focus position.
[2022-11-02T20:46:48.516 Atlantic Daylight Time DEBG ][ org.kde.kstars.indi] - MyFocuserPro2 : "[DEBUG] CMD <:00#> "
Response = 10184
[2022-11-02T20:46:48.557 Atlantic Daylight Time DEBG ][ org.kde.kstars.indi] - MyFocuserPro2 : "[DEBUG] RES <P10184#> "
[2022-11-02T20:46:48.558 Atlantic Daylight Time DEBG ][ org.kde.kstars.ekos.focus] - Abs Focuser position changed to 10184 State: Busy
CMD <:01#> = Is focuser moving?
[2022-11-02T20:46:48.558 Atlantic Daylight Time DEBG ][ org.kde.kstars.indi] - MyFocuserPro2 : "[DEBUG] CMD <:01#> "
Response = 1 (YES)
[2022-11-02T20:46:48.606 Atlantic Daylight Time DEBG ][ org.kde.kstars.indi] - MyFocuserPro2 : "[DEBUG] RES <I1#> "
CMD <:01#> = Is focuser moving?
[2022-11-02T20:46:48.646 Atlantic Daylight Time DEBG ][ org.kde.kstars.indi] - MyFocuserPro2 : "[DEBUG] CMD <:01#> "
Response = 1 (YES)
[2022-11-02T20:46:48.687 Atlantic Daylight Time DEBG ][ org.kde.kstars.indi] - MyFocuserPro2 : "[DEBUG] RES <I1#> "
CMD <:01#> = Is focuser moving?
[2022-11-02T20:46:50.658 Atlantic Daylight Time DEBG ][ org.kde.kstars.indi] - MyFocuserPro2 : "[DEBUG] CMD <:01#> "
Response = 0 (NO)
[2022-11-02T20:46:50.709 Atlantic Daylight Time DEBG ][ org.kde.kstars.indi] - MyFocuserPro2 : "[DEBUG] RES <I0#> "
[2022-11-02T20:46:50.750 Atlantic Daylight Time DEBG ][ org.kde.kstars.ekos.focus] - "Linear: un-doing extension. Moving back in by 100"

So Ekos appears to be asking if the focuser is moving and waits until it's stopped. Although, I'm wonder if once the CMD <:00#> is issued and responded to that the focuser physically stops moving. Maybe? It seems to appear that it does based on the logs.

Let's see what Robert says.

Ken
1 year 4 months ago #88435

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

  • Posts: 15
  • Thank you received: 0
I'm on a roll tonight!

Something else comes to mind in this sequence.

[2022-11-02T20:46:48.516 Atlantic Daylight Time DEBG ][ org.kde.kstars.indi] - MyFocuserPro2 : "[DEBUG] CMD <:00#> "
[2022-11-02T20:46:48.557 Atlantic Daylight Time DEBG ][ org.kde.kstars.indi] - MyFocuserPro2 : "[DEBUG] RES <P10184#> "
[2022-11-02T20:46:48.558 Atlantic Daylight Time DEBG ][ org.kde.kstars.ekos.focus] - Abs Focuser position changed to 10184 State: Busy
[2022-11-02T20:46:48.558 Atlantic Daylight Time DEBG ][ org.kde.kstars.indi] - MyFocuserPro2 : "[DEBUG] CMD <:01#> "
[2022-11-02T20:46:48.606 Atlantic Daylight Time DEBG ][ org.kde.kstars.indi] - MyFocuserPro2 : "[DEBUG] RES <I1#> "
[2022-11-02T20:46:48.646 Atlantic Daylight Time DEBG ][ org.kde.kstars.indi] - MyFocuserPro2 : "[DEBUG] CMD <:01#> "
[2022-11-02T20:46:48.687 Atlantic Daylight Time DEBG ][ org.kde.kstars.indi] - MyFocuserPro2 : "[DEBUG] RES <I1#> "
[2022-11-02T20:46:50.658 Atlantic Daylight Time DEBG ][ org.kde.kstars.indi] - MyFocuserPro2 : "[DEBUG] CMD <:01#> "
[2022-11-02T20:46:50.709 Atlantic Daylight Time DEBG ][ org.kde.kstars.indi] - MyFocuserPro2 : "[DEBUG] RES <I0#> "
[2022-11-02T20:46:50.750 Atlantic Daylight Time DEBG ][ org.kde.kstars.ekos.focus] - "Linear: un-doing extension. Moving back in by 100"
[2022-11-02T20:46:50.750 Atlantic Daylight Time INFO ][ org.kde.kstars.ekos.focus] - "Focusing inward by 100 steps..."
[2022-11-02T20:46:50.752 Atlantic Daylight Time INFO ][ org.kde.kstars.indi] - MyFocuserPro2 : "[INFO] Focuser reached requested position. "
[2022-11-02T20:46:50.791 Atlantic Daylight Time DEBG ][ org.kde.kstars.indi] - MyFocuserPro2 : "[DEBUG] CMD <:01#> "
[2022-11-02T20:46:50.921 Atlantic Daylight Time DEBG ][ org.kde.kstars.indi] - MyFocuserPro2 : "[DEBUG] RES <I0#> "
[2022-11-02T20:46:50.961 Atlantic Daylight Time DEBG ][ org.kde.kstars.indi] - MyFocuserPro2 : "[DEBUG] CMD <:0510084#> "
[2022-11-02T20:46:50.962 Atlantic Daylight Time INFO ][ org.kde.kstars.indi] - MyFocuserPro2 : "[INFO] Focuser is moving to position 10084 "

So Ekos requested 10285. Then asked the focuser "where are you?" The focuser responds with 10184 but is still moving. Ekos waits until it stops moving but never asks the focuser "where are you?" again. What if Ekos is using the last known ABS position it received rather than assuming the focuser is in fact at 10285 when it stops? It never asks again, then subtracts 100 from 10184 and issues a move absolute command to 10084 which the focuser does. You see the focuser never reports it's position after the 10184 response. It may in fact be at 10285 when it stops but Ekos may not be making this assumption.

This may explain why sometimes it seems to work. Maybe if the move is small, or if I increase the speed of the stepper motor it will work more reliably?

Just a theory. Ok, enough for tonight!

Thanks
Ken
1 year 4 months ago #88436

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

  • Posts: 54
  • Thank you received: 5
In reply to John #88354
Concerning the focuser motion, believe me, up to now I built three of those things and tested them extensively. I've never seen anything strange happen after a series of forward and backward motion, like the ones you suggest, by issuing direct "go to" commands.
Indeed other focus algorithm in Ekos do work, such us polynomial and linear. It's just the one pass linear which gives this weird results... it must be something really stupid but devilish.
Last edit: 1 year 4 months ago by Massimo.
1 year 4 months ago #88441

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

  • Posts: 597
  • Thank you received: 279
Hi Ken,

Sounds like you might be onto something. So if there is a problem somehow with the polling messages if would be worth "upping" the polling interval for the focuser on the indi tab so that the motion can complete within one polling period. So, if the 200 step motion takes say 1 second, set the polling to 2 or 3 secs.

Just check that the focus motion timeout on the Ekos tab is set way above this (default is 30 secs) otherwise you'll get timeouts which will cause problems.
1 year 4 months ago #88443

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

  • Posts: 597
  • Thank you received: 279
Thanks for replying Massimo.
1 year 4 months ago #88444

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

  • Posts: 207
  • Thank you received: 18
Hi John,

Just a follow-up to say that all seems to be working using my Sesto Senso 2. I have upgraded to 3.6.2, and tonight had some clear weather to test. I turned off 'AF backlash comp' in the autofocus panel, and added my backlash setting for the focuser in the INDI driver. The Linear 1 Pass now shows perfect curve-fits and the solutions correspond with the curve and the actual focuser position.
I really like this autofocus algorithm, so very happy that it now all works. Thank you for your persistence in finding a fix, John.

Willem Jan.
1 year 4 months ago #88899

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

  • Posts: 597
  • Thank you received: 279
Willem Jan,

That's great to hear! So definitely sounds like a clash of some kind on backlash was causing the issue.

FYI, I've made another change (not merged yet as I need to test it but should be in 3.6.3) that completely splits AF Backlash Compensation from driver/focuser backlash so the AF Backlash Comp checkbox will become an input field. So you can independently set whatever values you like for AF Backlash Compensation and focus driver/focuser Backlash. In your case set AF Backlash Compensation=0
The following user(s) said Thank You: W J Drijfhout
1 year 4 months ago #88903

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

  • Posts: 3
  • Thank you received: 0
I am currently traveling, but will try out as soon as I have a chance, probably early next week.
1 year 4 months ago #88907

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

  • Posts: 207
  • Thank you received: 18
John, would you by any chance have an idea what the following could mean? Whether I select either Linear 1 Pass or just regular Linear, the focuser does not move outward first, but immediately starts taking an image. Polynomial and Iterative work well. In the log it says that focus state changed from aborted to in progress....

Compared to a while ago when it worked well:


All KStars 3.6.2, different scope, but same Linux machine, focuser and camera.

Any setting that I've missed?

Hope you have some ideas what this could be.
1 year 2 months ago #89720
Attachments:

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

  • Posts: 597
  • Thank you received: 279
Hi Willem Jan,

That sounds odd. Can you send the full log and I'll have a look into it. Are you on 3.6.2 stable or bleeding edge?
1 year 2 months ago #89726

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

  • Posts: 207
  • Thank you received: 18
Hi John,

It's a long log, had verbose logging on....
Here's a link: Log file

Thanks for looking into this and hopefully you can find something

WJ
1 year 2 months ago #89736

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

Time to create page: 2.983 seconds