Autofocus Question - Bahtinov Mask Double Check

I’m slowly learning SGP and have finally gotten around to adding an electronic focuser to my set up (HD1100 with a Microtouch Focuser). Good news is I’m finally getting a pretty consistent reasonable looking curve and it returns to the lowest HFR focus focus position from the curve once it’s complete. The bad news is I put on my Bahtinov mask afterwards to check the focus and it says I’m off a bit. If I repeat this I get the same result. I’ve always focused manually and have trusted the Bahtinov mask as very reliable. Any thoughts on this?

1 Like

How are you measuring the accuracy of the Bahtinov mask? Can you quantify “off a bit”? Does your AF curve have “wings” or is it a smooth curve? Do you see an appreciable difference in HFR throughout the run? In other words, the edges of the AF curve should be somewhere around 2.5-3x the HFR of the in focus HFR. Every regression SGPro performs to find the point of focus from a curve has a quality metric associated with it. Do you know what yours typically are (displayed on the AF graph and recorded in the logs)?

Thanks for the reply Ken. From what I remember, after I focus with the B. mask, I go back to the SGP and run the image stats and find the HFR went (on a reasonable night of seeing for my backyard) from about 1.8 to close to 3 so it’s pretty significant. I played with the step size (settled at around 100) till I got rid of the gull wings and have a pretty straight line up both sides and a pretty small U shape at the bottom. The high HFRs are about 4.5 and the low at about 1.8 so the range should be fine. The quality metric is typically around 98 to 99% at the end.

You’re saying that SGPro auto focus curve is smooth, runs through HFRs ~4x (of focus HFR) to 1.0x then back to ~4x, has no wings and also has a regression fit quality of 98%? If all of those things are true and and you still have a focus discrepancy near 100% (expected ~1.8, ended on ~3 HFR), then the problem is almost certainly with the focuser ailing from an inability to return to the desired position properly. Are you using backlash compensation? With respect to an AF run that has all of the properties as defined above, what does the AF graph indicate the HFR should be when done (and is it actually near that value)?

Yes at first I thought the same thing. But I always check the final validated image after AF completes and the HFR is always like that of the best center low value which should indicate it returned to perfect focus. I do use backlash compensation (I put in 2000 to ensure it always soaks it up) as my HD1100 is an SCT with a lot of backlash.

Steve, if it’s any consolation, I found the same thing with my EdgeHD 14" and Moonlite focuser. I focused using SG Pro to the best HFR (below 2), it reported 99% quality. I took a few shots of M57 and they were not very good. I rechecked it with Bahtinov mask and found the focus off a bit. I then refocused using the mask, and then tried SG Pro autofocus once more. The autofocus complained that HFR was almost 4.0. I ping-ponged back and forth and found a discrepancy each time. And as an added data point, I took a few shots of M57 with each focus result, and the shots taken with the Bahtinov mask were clearly better. My plan was to try the autofocus in Prism and Maxim DL next to see how they compare, but I haven’t had a chance to do that yet. I’m a neophyte and still learning.

Sounds very similar Steve to my experience. I’m assuming we’re just missing something and need to carefully check the HFR numbers in SGP right after resetting the focus with the B. mask, record the focuser position, then try moving out of focus in each direction and back into focus without using the AF routine, record the focuser postions that gets that same HFR number and recheck each position for good focus with the mask again. Tedious but something like this should help chase down the backlash and offsets going on. I ran out of clear nights to do this but will pick it up again soon.

The question to answer here is: Does the focuser return to a position that yields the same (or very similar) low HFR value as detected during the run? If you can’t recall, this answer does exist in the logs. After every focus run, SGPro executes an AF verification check to see if there was a problem returning to the desired focus position. The answer here will inform the next steps in troubleshooting…

  • Scenario 1: The focuser returns to the AF-designated position, but HFR is not as expected. This indicates a problem with the focuser. Exactly what problem, it doesn’t identify, slippage, binding, excessive play, gravity and weight, etc.
  • Scenario 2: The focuser returns to the AF-designated position and the HFR of the verification frame is what the AF run expects. This indicates that there is a problem with the AF data itself. More investigation would be required, but this is most commonly caused by performing auto focus on star-poor targets where something that is not a star identifies as one (and there are few enough stars that it actually skews results). Or possibly there are hot pixels… Depending on the issue, it might be correctable by adjusting some AF params.

Thanks Ken. I’ll do some more testing soon. Scenario 2 seems closer to what I’ve seen so far and SCT stars quickly distort into donut shapes and can confuse accurate HFR readings when I go very far from good focus.

Can you post a link to a logfile? From that one can reconstruct the AF curves using the AF logviewer:

Mikael

I downloaded the logviewer but couldn’t find any HFR logs. I looked and my settings defaulted to “unchecked” for the Save Auto Focus packages box where I’m guessing needs to be checked to save log files. I’ll check this feature and include some data and a plot next time.

The logviewer works with the normal sgp logfiles. It scans it and extracts the data generated by the AF routine.

Mikael

Thanks Mikael! Here’s a typical plot when the seeing was good though it degraded a lot that night while I tried a few things and kept checking the B. mask. This plot has 1.71 as the final HFR and 98% quality. I’ve linked the logfile HERE for that night and a link HERE


for earlier that night while I was still figuring out how to use the tool.

I looked at the AF runs from the two logfiles. With a step size of 100 and 9 steps you get very nice focus curves. Doesnt look like you have a backlash issue, and almost all validation frame HFRs are close to the minimum of the curve, within the expected uncertainty.

However, both logfiles show sudden and large shifts of the minimum. If you look at them all, you can see different groups, here for the 20220815204113 file:

The AF runs 4, 5 and 6 all have very differnt focus positions:

4 08/15/22 21:45:05 30109 1.49 24.34 117(31) Lum 94% (90%) Successful
5 08/15/22 21:52:31 29661 2.5 24.52 135(44) Lum 99% (90%) Successful
6 08/15/22 21:57:57 29345 2.12 24.48 145(60) Lum 98% (90%) Successful

They are shifted by 300-450 steps, which is almost half your AF curve range. Did you do something that caused this ?
Mikael

Hi Ken- thanks for taking a look. Yes I think the jump was when I checked the focus position with the Baht. mask by moving the scope to near by where a bright star was on the sensor and then set the focus to what it said was correct, then moved it back to the earier field and reran the AF. Could a bit of mirror image shift or something mechanical like that account for a shift in focuser position? Im inclined to trust the numbers in the AF routine, take a few images with longer exposure times, and measure the results. If it looks like great focus, that should be confirmation enough i suppose.

My experience was again, similar. The focuser did return to the proper position, and the HFR was again less that 2, can’t recall exactly but I’ll check the logs. The actual photo was a 3 minute at 1:1, and the stars looked like tiny donuts. You could see the black center in each star. I know folks will think I’m nuts, but after trying it dozens of times, it feels like the HFR data is inconsistent with the ‘truth’. It ‘feels’ as if there’s an error calculating the HFR value that leads to the discrepancy. I’ve spent the majority of my career writing specialized software - much of which dealt with data acquisition, regression analysis, digital signal processing, Fourier transforms, blah blah, so I’m biased and tend to always point the finger at the software…:sunglasses:

I hear you Steve. I did check the other night and realized my collimation was off and after I set it I redid the AF and the final “validated” image and numbers look pretty tight without “tiny donuts.” I’ll do it again (maybe tonight) and recheck against the B. mask and see if they are starting to correlate.

I’m going to try (hopefully) again tonight. I did swap cameras. I’m really annoyed with the QHY10 OSC I’ve been using. It does not do subframes, thus may not be a good test candidate. Also, the QHY ASCOM drivers have never worked correctly, and QHY has abandoned the QHY10 camera. I installed a ZWO CMOS camera and will give it a shot later. I hope to also try Maxim DL and Prism to see how they work.

–Steve

Interesting. I have a QHY10 as well and though it had a problem, I returned it for service and it always worked well after. Never had driver issues. I used it mostly with Nebulosity which I think had native drivers built in for that camera. Haven’t tried it yet with SGP.

FYI - my AF update is that several days back I had some clear skies again and rechecked everything. I notices when I zoomed in on the slightly out of focus stars they looked a bit dim on one side of the typical SCT donut. So I went to a brighter star and went well out of focus to check the collimation and it was quite a bit off. I recollimated and then re-Auto Focused in SGP and then checked it on a bright star with the Bahtinov Mask and wha la! Perfect focus! My AF runs seem very repeatable now and I tried a sequence that refocused after every 5 frames and it worked like a champ. Good luck on your set up!

Thanks. I’m forced to use SGPro 3.x which supports the native Windows drivers. SGPro 4.x does not. QHY Ascom drivers do no support the camera in 64-bit mode. I think they gave up - no ROI for older cameras. There are other problems as well. If you open PHD and connect to a QHY ASCOM guider such as the QHY5-II, when you open SGPro the QHY10 cannot connect. You have to connect the QHY10 in SGPro first, then open PHD to select the QHY guider.

I will check the collimation for sure, it’s been a long time and I’ve jostled the OTA around a bit. Thanks.

–Steve