Does SGP talk to Planewave's PWI AutoFocus?

According to the Download page the current releases of SGP are supported on Win 8 & 10, not Win 7.

Got it. I’ll try testing tonight using HFD - ASAP.

KG

Unfortunately I can’t test it. The beta SGP version doesn’t connect to Pinpoint. That’s what I use for fast plate solving.

KG

KG, you could select Platesolve2 or ASTAP for solving. Or run a focus test without solving

Will try again tonight. Working around a project and seeing is very good. (-:

Looks like there may be a bug?

AutofocusError2

[11/13/20 19:01:46.359][DEBUG][Camera Thread][AF;] Display image preview using asynch task…
[11/13/20 19:01:46.409][DEBUG][Main Thread][AF;] --> Find stars (normal)
[11/13/20 19:01:46.427][DEBUG][Main Thread][AF;] AF frame was too large… downsample = 0.75…
[11/13/20 19:01:47.155][DEBUG][Main Thread][AF;] Star detection using min star size of 2px…
[11/13/20 19:01:47.155][DEBUG][Main Thread][AF;] Star detection using max star size of 40px…
[11/13/20 19:01:47.171][DEBUG][Main Thread][AF;] Find stars took: 762 ms…
[11/13/20 19:01:47.171][DEBUG][Main Thread][AF;] Star list contains 76 stars…
[11/13/20 19:01:47.171][DEBUG][Main Thread][AF;] Calculating HFR with sample size: 1
[11/13/20 19:01:47.282][DEBUG][Camera Thread][AF;] MessageBoxHelper Show Error! : Object reference not set to an instance of an object.
at SequenceGenerator.MessageBoxHelper.a(Form A_0, String A_1, String A_2, MessageBoxButtons A_3, MessageBoxIcon A_4)
[11/13/20 19:01:47.298][WARN][Camera Thread][AF;] HFD value from auto focuser is 0!, trying again…
[11/13/20 19:01:47.363][ERROR][Camera Thread][AF;] Auto focus received a bad HFD value 2 times in a row! Something may be wrong! : Auto focus received a bad HFD value 2 times in a row! Something may be wrong!
at rd.a(AutoFocusData A_0, tk& A_1, tk[] A_2)
[11/13/20 19:01:47.363][DEBUG][Camera Thread][AF;] MoveFocuserAbs: Start, move to 5606…
[11/13/20 19:01:47.363][DEBUG][Camera Thread][AF;] ASCOM Focuser: MoveSync - start…
[11/13/20 19:01:47.363][DEBUG][Camera Thread][AF;] Focuser moving to 5606
[11/13/20 19:01:47.364][DEBUG][Camera Thread][AF;] Focuser move call complete
[11/13/20 19:01:47.364][DEBUG][Move Monitor Thread][AF;] ASCOM Focuser: Move monitor thread is started…
[11/13/20 19:02:00.373][DEBUG][Move Monitor Thread][AF;] ASCOM Focuser: Move monitor thread -> movement complete
[11/13/20 19:02:00.374][DEBUG][Camera Thread][AF;] ASCOM Focuser: MoveSync - Focuser reports it is done moving, continuing…
[11/13/20 19:02:00.374][DEBUG][Camera Thread][AF;] MoveFocuserAbs: End, move complete, at 5606…
[11/13/20 19:02:00.374][DEBUG][Camera Thread][AF;] Auto focus (finally): closing dialog…
[11/13/20 19:03:19.816][DEBUG][Camera Thread][AF;] Auto focus complete…
[11/13/20 19:03:19.825][DEBUG][Camera Thread][NONE] SGM_FOCUSER_AUTO_FOCUS complete…
[11/13/20 19:03:19.825][DEBUG][Camera Thread][NONE] Camera thread is IDLE…

Yes that is something for Jared.

@Kurious_George

Hi, Sorry to hear about last night’s SGP/ASTAP glitch. Also I am curious to know if you had ever tried the Auto Focus Metric in SGP FWHM that requires PinPoint?

Yes, I have. FWHM does not work as well as HFR. It has a noticeably larger calculated focus variation.

@han, @mikaelA

Hi,

I have just completed a review of my AF results from the only recent night of decent seeing, comparing the SGP AF result with the ASTAP result.

From my sample it seems that SGP is providing a result that is approximately 5 steps in from the ASTAP result.

I am doubtful that this level of discrepancy would matter much to anyone using even really high-end amateur equipment but as it seems a reasonably consistent amount I feel there is probably a systemic cause rather than merely random variation due to 'noisy data.

Interested to hear your views. I can supply the AF images if you are interested in investigating further.

Mike

Hello Mike,

At least SGP is performing well.The only complain a hear is that SGP focusing could fail under less ideal conditions.

I agree the 5 steps discrepancy look statistically significant. If you used for ASTAP the same images then it would be interesting to further investigate. But probably only a simulation will show where it comes from. But 5 steps is too small to have a real influence on the quality of the images. Looking to your graphs only an error of 20 steps or more will have an impact.

Han

The original post was to compare to the Planewave algorithm which ALWAYS gives me nearly perfect focus.

If we can get ASTAP working on SGP, I can find a situation where they differ significantly.

KG

KG,

I haven’t received any response back from PlaneWave on the request to use PlateSolve2 for focusing but the request is only four working days old.

@Jared should look to your problem in:

Han

KG,

I am looking forward to the next release of SGP as much as you in the hope that it will fix the issue you had with last version.

From my testing to date of the v4 ASTAP star detection / FocPos calcuIation I find it is putting me at near perfect focus very consistently and in worse seeing conditions than the HFR method of v3.2.0.613 achieved. I very much hope you find the same.

If there are FoVs, optical designs or other circumstances that consistently lead to a poor focus result I guess we will all be interested to take a look to identify a cause.

Here’s to the next version.

Mike

Yes, here’s to the next version Mike. (-:

KG

For each AF run I loaded the 7 AF images plus 1 validation frame into ASTAP, added the FocPos parameter then used the hyperbolic curve fit routine to determine the ASTAP result.

Unless I am missing something these are the same images as analysed by ASTAP during the actual AF run. The only difference I know of is that SGP is using @mikaelA’s parabolic curve fit method rather than ASTAPs hyperbolic fit. I cannot say either is giving a poor result and I guess it is arguable which is the most near perfect from even a theoretical perspective.

Not sure about lucky imaging, but for lengthier exposures I agree that such small differences would in general be totally overwhelmed by atmospheric turbulence etc.

Mike

I’m guessing but one reason could be an asymmetrical V-curve which some people report. One of the wings has a different angle and you will probably find different focus by using a parabolic or hyperbolic match.

With an asymmetrical V-curve, also the calculation method of the curve-fit-error has an influence because it has to find the best fit/compromise. The actual curve and perfect curve will never fit perfectly. Calculating the errors linear or squared will make a difference in the calculated focus I assume.

Han

@mikaelA, cc @jared

Hi,

Have you ever considered offering the user the option of selecting say parabolic, hyperbolic and V-curve fit?

I am thinking that the current AF solution offers good user feed-back as to how an AF run is progressing.

So rather than re-engineer all that useful part, I am thinking that having got a reasonable set of 5, 7, 9 whatever AF data points, the last step would be to use these values to perform a final AF curve fit / best focpos determinaton as selected by the user prior to capturing the validation frame.

From my stand-point I think the hyperbolic fit would best suit the AF curves that I get from my present rig but appreciate that other users may think differently.

By offering a set of options it seems to me that SGP can appeal to the widest audience.

Mike

Hi Mike,

Just for record, I did not write the quadratic fitting routine, which was written by Jerry Macon. I participated in that effort with @bulrichl in that they used my AF logviewer to process a lot of SGP user logs to test out the quadratic routine.

Since then I have developed a hyperbolic routine for a “private” software project, so I can help out with the code if @Jared would like to go in this direction. The modifiations would be quite minor.

I completely agree that it would make sense to let the user chose between a quadratic and hyperbolic routine, as people with a working setup is less inclined to tinker with something that works for them.

Mikael

Mike,

Your comparison of SGP vs. ASTAP results I think shows that for that particular target the difference is not important, with your setup.

In my setup I have really only seen repetedely failed AF runs when imaging some globular clustars, as I think quite a few people have been pointing out on this forum. @han, do you think your star detection routine has any reason to work better on such targets ? As I remember you made some changes to the plate solving part of ASTAP for globular clusters, would that impact the HFD measurement ?

Personally I would be interested in testing out ASTAP focusing on such a “hard” target. I would test it myself, if my imaging gear was not in France, where the current lockdown situation is very strict!