Add exclude center to autofocus (in same pane as "crop auto focus frame")


#1

Add “exclude center” to autofucus. This, along with “crop auto focus frame” should reduce the focus effects on the edge of field. i.e. if focus is maxed in the very center, the edges will be out of focus. If you max focus half way between edge and center, both the edge and center will be similarly focused.

I saw a discussion that almost touched on this, but it wasn’t explicitly described.

See these mock ups.



#2

Why is this needed? I used to have problems in other programs with things like globular clusters but I’ve never had a focusing issue in the center with SGP since it averages across the whole image.


#3

A good explanation is from Starizona. Way at the bottom, there is a picture to illustrate why this is better.

http://starizona.com/acb/ccd/advtheoryfoc.aspx

“…When an off-axis area of the CCD is used to focus, more of the curved focal plane falls within the depth of focus and a larger area of the CCD will be in focus…”

SGP Autofocus works great on my SCT, but I would like to minimize field curvature effects.


#4

Do you notice that your stars aren’t in focus after the routine? Or is this just theoretical based on a website?

I’m just saying. They can get us multi camera support… or tweak things that are already good enough.


#5

By the way, your software is certainly good. I cut my teeth with BYEOS. It is so nice to just punch in a RA and DEC and then go to bed.

Stars are focused. Center is best and gradually worse as you extend to the edge. This is totally expected from the description of the focus algorithm.

The edge of my field shows partial “donuts” almost like a bunch of Cs.

But I think it can be better. (unless there is something in your algorithm that puts more statistical weight to the stars halfway between the center and edge)

By excluding the middle, more stars will be in better focus and the out-of-focus stars would be less out-of-focus.

Looks like a pretty easy change with a large return.

I would think copying the “crop auto focus frames” routine and modify it slightly to crop the middle could be done. Perhaps the focus algorithm takes this into account by weighting the middle part of the image higher. This would attain the same thing.

Here is a screenshot that shows the improvement (I’ll also link the speadsheet below). The simulation shows a bunch of stars with the same magnitude. The left one shows the HFR after a focus run. The right one shows the same thing except not including the center part in yellow with the algorithm. There are more 1s and 2s in the right one (mode=3). The maximum is lower and also the stdev is lower. The left one had a mode of 6.

.


#6

There is no weighting based on position of the star in the frame. Every star has an equal chance of being used during focus and we use stars from across the entire frame to create an average HFR for the entire frame.

This gets you in best focus across the entire frame. I can’t really see how pulling out the center would change this. This is even illustrated in your example above when you look at the mean for the frame.

One feature that were working on is to allow you to specify a subframe for auto focus. In your case you could specify a subframe that was a top or bottom slice omitting the center and very edge if this is what you feel is necessary.

Thanks
Jared


#7

Jared:
That would work… subframes. Put my vote in for that. Are you talking one subframe or many?

I still can’t get my head around the how the mean HFR per frame / position (without excluding the middle), maximizes the best focus in the two models. Oh, not sure if you clicked on the picture, there is some cutoff unless you click it.

Let me see if I have this straight (very simple analogy), consider moving the focuser +, this would cause all of the numbers to increase by one. Do the same + move and the numbers go up one more. Do the same in the reverse a few steps and when the mean is the smallest, you have the best focus with the V shaped graph.

1 represents perfect focus. The higher the number, the worse the focus.

The one on the left has a higher mean HFR, fewer 2s and 1s and lots of 6s. All stars will either be perfectly focused (only one 1) and the rest will be either over focused or under focused depending on initial focus.

The one on the right (excluding the middle) has way more 1s and 2s and no 6s Some stars will be slightly under focused and some will be slightly over focused.

I’ll do some more thinking… Thanks for getting back so quick. Again, I really like SGP. A total bargain.


#8

The only value that SGP cares about is the Mean HFR across the entire frame. Since we do whole frame auto focus, and don’t weigh stars based on location, we would trend more towards the example on the right vs the left. Essentially we don’t care where the stars are located, we use up to 300 stars across the entire frame and our autofocus will allways use the lowest average HFR produced across the entire image.

So unless you have a surplus of stars at the center, and very few around the middle, then I’m pretty sure our focus algorithm should get you what you’re after, unless I’m missing something.

Thanks,
Jared


#9

I would like to support this request - although I am still on the planning phase for implementing SGP autofocus into my workflow.

The reason: On buying my Tak FSQ85 the vendor strongly recommended to focus on stars, which are on the half way between center and imaging border to get the overall best results.

Best regards

Reinhard


#10

Reinhard,

I use taks and it focuses just fine without it. Can you show documented proof that focusing on the outside makes a difference?


#11

I used my AT66ED w/WO.8 FF/FR and I think it was 15% edge exclusion. Focus did not turn out well at all. The farther from the center the softer the focus was. I got rid of the exclusion and did much better, but not perfect. I’d love to see a subframe for focus as Jared mentioned. I think a crop of the middle third between center and edge would be just the ticket.

Mark


#12

We did commit to adding sub-frame support for AF and we will do it. One hesitation we around this is that it adds yet another AF variable to an already very expensive support item. When using sub-frames, unless you are really sure you need them, AF is much less likely to succeed. We need to figure this part out as well…


#13

Hi Mads,

no I cannot do that - I didn’t make any tests. I just followed the advice. As the explanation from the venodor was reasonable for me and the results by following the advice were good I didn’t make a question mark over it.

So I have to admit that my vote for the request, was a “vote in the dark”.

May be the advice of my vendor (and also the explanation on Starizona) for focussing off-axis is only applicable, if you use a single star for focussing, but if you use a lot of starts it is not required that all these stars are in a certain area.
To be honest I did not think of that to much.

As I mentioned in my first post in this thread I am still using the single focussing method (with a Cuzdi mask), but I have planned to test out the auto focus routine of SG Pro the next possibility (free time matching clear skies).

And also for me “multi camera support” would be more valuable than this (only potential) improvement of the auto focus. But I am not sure if I should start to examine each new feature request under the aspect, if this request might prevent or delay the implementation of a much valueable feature, before supporting a request which I also would like to see.

Best regards

Reinhard


#14

No worries, I was just wondering what you were seeing. The starizona articles were written when focus Max was the only game in town and it was pretty highly scripted (must be a mag 5 star/multiple runs to determine backlash and your curve… etc).

I’ve never had an issue with my stars that was detectable beyond seeing. But, I use a really flat field refractor too.


#15

My take on this is twofold:

  1. To be blunt and maybe unpopular, if bad focus is being caused by optics - you need to fix the optics, not band-aid with software.

  2. Having said that, being able to select a specific sub area is useful and sufficient, the best reason being that some objects can interfere with the focus routine (globulars and some galaxies) so are best to avoid including.


#16

This isn’t something I would ever use because my optics are well corrected - but for people with unflattened RC’s or ACF, or wide refractors, this would be a real need and it does correspond to the recommended way to focus a system with a curved field - and that is to focus a bit off from center so the overall field is an optimal compromise.

And even for people with such optics - they wouldn’t always want to do that because they might have a small galaxy in the center and they want it as sharp as possible.

So I would say this does represent a real need for a small fraction of people.

An alternate way to achieve the same effect would be to allow a fixed offset to be added after focus. So you would still find focus the same way using all the stars - but a bump would be added to the final value - and it’s up to the user to determine what that bump is.

I’m not saying what priority any of this is - and I wouldn’t use it myself - but something like this would be important for a subset of users, and it is a recommended way to get best focus with a curved field.

Frank


#17

This has been an interesting discussion. So… I did some thinking… and putzing with a speadsheet “model.”

As far as I can ascertain, SGP is the only focus software that uses the whole field for focusing. My conclusion is that if the stars are equally distributed, the focus algorithm would indeed converge like the one on the right (above with minimum mean). I was partially wrong.

However, if the star sample had mostly stars around the edge of the screen and a deep sky object in the middle, the focus in the center would be off.

I’ve watched the behavior of the auto focus. If you have a decently long exposure, the star sample will be distributed evenly… usually.

“Forcing” the sample to the middle would reduce the probability of the focus algorithm homing in on stars that are skewed in only one “bad” area (like the edge)

Still, the subframe feature would allow some real life experimentation and also help with the globular issue. Two things for the price of one.

This is not a trivial thing to understand. Hurts my head sometimes.


#18

Just as an fyi we already discard closely grouped stars so the “globular issue” isn’t really an issue. We look for well defined distinct stars. This also helps to reject many galaxy cores and other non star things.

And yes, we’re one of the only applications, to my knowledge, that does entire frame auto focus…and we’ve had that since day one. We feel it makes a pretty significant difference in terms of speed and accuracy. You’ll always get the best overall average focus with our algorithm, regardless of your optics. Now if thats what you want (ie badly curved optics with a daily in the center) well that’s another discussion.

Thanks
Jared


www.mainsequencesoftware.com