Auto focus giving strange V - curves

Does anyone have an opinion as to if this distorted V - curve is likely to be caused by dirt in the auto focus mechanism? After losing the first 3 months of this winter to clouds or wind, I finally got some clear sky a few weeks ago. Unfortunately, my usually rock solid auto focus is now giving me repeatable distorted V- curves. Always the same…with the left side of the curve doing a strange outwards bend. I do not want to start tearing into the Micro Touch in the dusty desert if that is not likely to be the problem. I have submitted a report complete with logs a week or two ago, but haven’t gotten any word back as to if this could be a software issue or not. So I am watching the clock tick down to the next dark period, with no answers as to where the problem may lie. If anyone else is getting curves like this, or has had problems with dirt in the auto focus mechanism, could you let me know if it looked anything like this? I don’t want to lose yet another month to this problem. Thanks, Dean

Link to Logs

Useful Info

OS: Microsoft Windows 10 Home
Ver: 3.1.0.450
.NET: 4.8

Please try 75 instead of 120 for ‘step size’ and 9 instead of 11 for ‘data points’.

Bernd

Bernd’s advice is right on. 75 for step size and 9 data points will give you much better results with the new Quadratic fit routine.

Hi guys,
I will try that as soon as the clouds leave. I cleaned the gears of the Micro Touch today as well in case that was the issue.
My usual setting is 120 with 9 data points. I was experimenting with 11 as I tried to troubleshoot this problem. The setting of 120/9 worked really well for me for years, and I didn’t know that there had been changes to the focusing routine. I will try 75 and see what happens. Thanks!
Dean

I got some clear sky tonight, so I tried the 75/9 settings. No improvement and the curve seems very shallow since the focuser isn’t moving much per step. Here is a link to the logs. https://www.dropbox.com/s/ewok9u272dadi09/sgpro_log_archive_177da6dc-949c-4731-8d2c-95779c068a99.zip?dl=0

I increased the step size in increments of 10 from 75 until up to 105. Still the same distortions to the V curve. I cleaned the Micro Touch gears, though I found no visible debris.
Dean

I used Mikael’s SGP AF LogViewer for analyzing your logfile (‘Show all runs’ checked):

#	Date		Time		Pos	HFR	Temp	Filter	Misc
1	02/11/20	18:11:39	0	0	0	None	User aborted.	
2	02/11/20	18:13:07	0	0	0	None	Failed. Auto Rerun.	
3	02/11/20	18:15:48	30334	2.56	13.87	None	Successful	
4	02/11/20	18:19:06	30304	2.93	13.89	None	Successful	
5	02/11/20	18:22:21	30304	2.93	13.89	None	Failed. Auto Rerun.	
6	02/11/20	18:25:04	30310	3.52	13.93	None	Successful	
7	02/11/20	18:29:40	30316	2.84	13.79	None	Successful	
8	02/11/20	18:32:47	30317	2.76	13.78	None	Rerun	

In run 1, the starting position was 29944 – too far below best focus position. This run was aborted by user. Run 2 and 5 yielded a fit quality of 88 and 87 % respectively. These values obviously were below the quality threshold, so these runs were judged as unsuccessful. Runs 3, 4, 6, 7, and 8 were successful, resulting in fit qualities between 96 and 99 %:

#	Date	    	Time	    	step size	Fit quality / comment
1	02/11/20	18:12:49.812	75		AF abort requested
2	02/11/20	18:15:39.786	75		quality=88%
3	02/11/20	18:18:20.747	75		quality=98%
4	02/11/20	18:21:36.166	85		quality=96%
5	02/11/20	18:24:56.024	95		quality=87%
6	02/11/20	18:27:35.069	95		quality=99%
7	02/11/20	18:32:13.509	105		quality=98%
8	02/11/20	18:35:22.062	105		quality=99%

A step size in the chosen range (75 - 105) seems to be OK. The curves are shallow because the seeing conditions were modest.

I really don’t understand why you complain about these results. The successful AF runs look all right to me. If you observe distorted focus curves more often, this could be due to fluctuations of the seeing conditions (e.g. local seeing caused by thermal effects in the neighborhood of your site).

Bernd

Hello Bernd,
I guess I “complain” about these results because my v - curves for the last 3 years with the same settings have yielded very nice, reliable, symmetrical V curves. No complaints came from me about autofocus, but lots of compliments did. That is not the case anymore. Now the v curve is never symmetrical, no matter how many focus runs I do in a row. It always has the left side of the curve bowing outwards to some degree. Perhaps it still is giving me the best focus under the current conditions. It doesn’t seem to be to me at this point, but I may be wrong. But why is my v curve such an ugly mess compared to how it used to be? Is there any point at being concerned about the shape of the curve anymore? Is a consistently lopsided, outward bowed curve nothing to be concerned about? I would love to be able to go back to the old auto focus routine, which worked beautifully for me for years with this gear.
Dean

There are 3 basic steps to auto focus:
1 - Collect data
2 - Analyze it
3 - Move to best focus

The only change we made was around step 2. The collection step is what defines the shape of your sampled data and we can’t really affect much change in this area as it has more to do with your optics and focuser than anything. The only thing we could do here would be to adjust how the individual HFR metric is calculated and that would result in more of a flattening/extending of the overall height of your data.

Basically I don’t think what you’re seeing has anything to do with the auto focus changes. I’m guessing it’s something more specific to your focuser/telescope arrangement. Maybe some backlash or a loose gear, maybe something needs some grease. But what you’re seeing is the results of sampling multiple points and calculating a simple metric at each of those points (according to your focuser). If the shape of that data is different than before then it’s likely due to a change in the optical system and not a change in the auto focus as the auto focus has no control of the display of that data.

Jared

Hi Jared,
I have taken the Micro Touch apart and cleaned it. I guess the next step is the scope itself. Maybe something is inhibiting the movement of the mirror.
Before I do that, could you tell me the last version of SGP to use the old focusing routine? I am going to go back to that version tonight and see if that makes a difference. Thanks!
Dean

I can’t specifically recall the version it was introduced in. Anything that is 3.0 or 2.6 should be the old method though. Keeping in mind that your profiles/sequence from 3.1 won’t work in either of the other versions. But you’d really just need to copy over your auto focus settings to give it a run.

Also before you get too into it you may also want to validate that you’re getting worse focus than before. Maybe things don’t look as good but the focus is still just fine?

Thanks,
Jared

Hi Jared,
I’ll do more focus runs tonight using the newest SGP, then follow it up with a run using SGP 3.0. I suspect that you are right and it is likely a mechanical issue rather than software. But I would like to do this last check before disassembling the Edge.
The focus seemed to be erratic with the new method, and seemed to give higher than usual HFR numbers, though that of course could have just been the seeing. With the old method and my Edge, if I did a few focus runs in a row they would usually put me pretty close to the same focuser numbers each time. Now it seems to creep the focuser outwards, recommending a different final focuser number with each run. Combined with the ugly v curves and (apparent) higher HFR numbers, I don’t think it is working as well for me as the older versions did for so long. But again, this may well be a mechanical problem and have nothing to do with SGP at all. I hope to know more tonight.
Dean

Let me kind of summarize what Bernd and Jared are saying above. Both their comments are of course right on.
I am the person who coded the new focus routine, so I can tell you exactly what to expect.

The whole focus process is basically 2 steps:

  1. Take images and calculate the HFR of each image and plot this on a graph. The new quadratic fit process has NOTHING to do with this. If your data points are producing a worse looking V curve than before, it has NOTHING to do with the new focus routine.

  2. the “new focus routine” only changes the 2nd step in this process, which is: calculate the center low point of the V curve as reliably as possible. This is entirely what has changed in the “new focus routine”. This is what we are calling the Quadratic fit routine, because it uses a completely different approach to determining what this best center/low point of the V curve is.

So I have a question for you:
Do you think the best center/low point of the V curve as determined by the new Quadratic fit routine is or is not accurate?

If you don’t think it is accurately choosing the low/center point of your V curve, then please send me your plot and log file, so I can see if my routine needs some tweaking.

NOTE; your graph posted above does show the quadratic routine giving a poor fit to the lower, and most important, data points on the graph. The reason for this is your interval being larger than optimum, plus 11 data points extended the wings too high, thus giving them an excessive contribution in the calculation. That is why we suggested the smaller values. I would like to see some of your graphs using the smaller values.

Regardless, nothing in SGP has changed from 3.0 to 3.1.351 that affects the actual shape of your V curve. Something is now different with your hardware that is making this change.
Do revert back to 3.0 to convince yourself of this.

Hi Jerry,

these are the successful focus curves in logfile “sg_logfile_20200211181032.log” as one JPG file.

The step sizes used were:

#3: 75
#4: 85
#6: 95
#7: 105
#8: 105

Bernd

Hello jmacon,
And thanks for your attention to this issue. I am happy to say that I had a good experience last night with focusing using the new routine. And I had the best results using the 75/9 setting that you recommend.
I downloaded and installed SGP 3.0, but it would not open, so I gave up on that plan. Attached are logs for back to back focus runs using the newest version of SGP with my old settings of 120/9 vs your suggested settings 75/9. While the curve looks uglier at your suggested settings, the focus is better. I think the reason I may have been getting such erratic results the night before was possibly the presence of very thin clouds that couldn’t be seen, but were messing with the focus. This would have been more obvious had I been guiding, but since I had not achieved focus yet, PhD2 was not running. Last night the numbers I was seeing were what I would expect, and the back to back runs were more consistent.
I don’t know if cleaning the gears of the Micro Touch had anything to do with this improvement or not. I still seem to have a very flat, or outward bow to the left side of the v curve that was not there using the old routine. But it is not as bad as it was before I cleaned the focuser. In your experience, would slight binding in the mirror movement cause this slight distortion of the v curve?
Thanks again for the explanation and attention to my problem. The old dog can still learn new tricks, but he may be slower and somewhat set in his previous ways. :slight_smile:
Dean

Link to Logs

Useful Info

OS: Microsoft Windows 10 Home
Ver: 3.1.0.449
.NET: 4.8