Half flux, automatic star recognition with source code

Oh boy… I cannot rely on sgp to do focusing automatically - and it’s clear many others are hit by this problem of small stars. I need to babysit it because it will easily generate bad curves. The two core features of centering accurately and focusing accurately do not work for me - and I have been providing workarounds that would likely solve the problem for me - and improve robustness for others.

I have written my own autofocus code and it works very well - but I can’t easily hook it into sgp to automate it.

When I babysit the focusing I am getting deep sky images autoguided with MetaGuide at around 1.6" fwhm with CGE-Pro. This requires good focus and good guiding - and SGP has the potential to realize this performance for more people and more easily.

I am not asking for bells and whistles to make things a little nicer for my specific needs - I’m asking for small changes in implementation to make the core automatic features of sgp work well enough for me to use without me watching - and that would benefit all users through improved robustness and less need to tweak the existing settings - per target - of NStars and Neb. rejection.

Frank

1 Like

Microastro,

Read the manual on how to setup autofocus. It’s pretty clear and works well for refractors. If you’re still having issues post your settings and logs.

Free star,

Sounds like a good discussion for Ken and Jared. I’m sure they’re just worried about using your technique in their commercial software.

Despite reading this in detail I ran into problems. I had the focus steps and number points perfect but did not understand how best to set the stars slider.

More stars is better, right? WRONG.

The stellar profiles are much different for small stars than larger or medium size stars.
There many challenges to understanding this setting other than hot pixels.

It sure is an issue. I would not be so dismissive. I almost did not buy SGP because of this.

I have been able to make autofocus work first time out with four other software packages using a variety of scopes.

mads0100,

Actually had a clearish night to work on my focusing and huge improvement from setting up the backlash properly. The new warning system on focus actually alerted me that the problem might be backlash. Now that it is setup I’m getting much better autofocus. Seems I wasn’t really seeing the problem on my f/7 refractor but with my f/5.5 refractor and the smaller CFZ the backlash issue was more apparent.

…Keith

1 Like

Maxm,

I don’t work for MSS, I’m just a mod. But, I have been using SGP for several years; 2 different scopes but both of them are refractors. I’m not very good at setting it all up either. I’ve never had issues with focus that weren’t user induced. I don’t know what perfect step sizes are; I just do what’s in the manual and set it up to search around HFR3 on either side of my focus. I use offsets. I found those by individually running each filter through an autofocus and comparing it to my L filter. Beyond that, I have a moonlite focuser and I don’t think there is a ton of backlash. I don’t mess around with how many stars it checks or nebuloisty. I don’t remember the last time SGP didn’t successfully focus. I don’t think all the other pixels on the screen hi lighted as stars really matter because it’s averaging those.

Based on my experience, the focus routine works just fine. But, I’m not trying to shoe horn a stepper onto a focuser like an SCT. Ultimately, I think a Crayford is probably a better setup for those scopes and maintaining a very tight focus distance that ensures donuts aren’t a problem by keeping your HFR under where it starts to show.

I get it. It sucks when a piece of hardware isn’t working and you think it’s easier to just change the software. But maybe the solution is hardware for your particular case? What are the four different software packages you tried? I’m only aware of SGP, MaximDL, and FocusMax.

I have never been troubled by backlash. Keith mentioned that.

I have tried Focus max, Software Bisque, MaxIM DL and the automation software by ASA called “Sequence”. They all use a V curve on single star. They worked about the same for me.
Software determined most of the settings.

Max

Chris,

In my experience SGP’s AF works amazingly well with my refractor. But with my longer focal length reflector with a large central obstruction, AF is not nearly as good. This is absolutely not a focuser hardware problem in my case, it really is a case of the software simply not being able to cope with the AF images as well as it does with the refractor.

Here are the issues I see. These have all been reported before, so nothing new here, I just wanted to summarize my situation and describe what is preventing me from letting AF run unattended as I do with my refractor.

  • the donut problem: HFR focus metric fails outside a narrow range around focus. AF only works if I manually ensure it is starting very close to focus. When it fails it can get very confused and do things like move farther and farther from focus.
  • when expanding the focus range, SGP often moves too far and gets into donut territory. SGP moves 1/2 the full AF range, even if there was a local minimum present. Someone made the suggestion to start at the local minimum and that would be a big improvement in my case.
  • an asymmetric V curve confuses AF and causes the slope-based focus point calculation make a poor focus point selection;
  • non-stars are sometimes selected and throw off the metric. Even when I have my AF sliders tuned well for the target field, AF can sometimes get fooled and lock on to noise or a satellite trail. I can get this to happen almost every time if I run AF before my camera has cooled sufficiently. Frank’s minimum HFR suggestion would definitely help me since the tiny non-stars are well below the minimum possible HFR.

Andy

1 Like

Hmm. It sounds like you have not done much imaging with sct’s - and you are not only dismissing my feature request as a “non issue” - you are disparaging my setup and giving advice on better hardware approaches.

Well let me enlighten you a little. The idea of "shoe horn"ing a stepper onto the primary focuser of an sct dates back to the first appearance of RoboFocus, where they demonstrated the viability of that approach. Today, I find that the best results in terms of focus and guiding with sct’s are done with OAG and automatic focusing with the primary. Not only does it work well - it has produced the best results I have seen with EdgeHD - showing small, sharp stars across the sensor.

There are many advantages to primary focusing: 1) You save needed backfocus 2) The image train is rigidly attached to the back of the OTA with no moving parts 3) The sct’s already come with a built in focuser - so you don’t need to buy one. The combination lets an sct act like a high end RC that focuses with the secondary - where the image train is rigidly attached with no flexure.

Examples:

J P Mestsavainio with several APOD’s - EdgeHD with primary focuser: http://astroanarchy.blogspot.com

Andre Paquette EdgeHD on cge-pro: Coma Cluster ( apaquette ) - AstroBin

My images: EdgeHD on cge-pro: http://astrogeeks.com/Bliss/MetaGuide/images/index.html

And there are others. They all show that it not only works - but it works extremely well. There is no “shoe horning” at all because it is an elegant addition of a simple stepper motor - combined with smart software and good technique.

In the list above, I stand out because I am the only one using SGP for focus. I have tried other methods - but I prefer focus methods that use multiple stars and stay close to focus. SGP is 90% there in working reliably - and it has improved greatly over the past year. I’m hoping it can go all the way - and many people with different scopes would benefit.

Frank

After a few tweaks on each of my three refractors (all about f/7, from 350mm to 916mm FL) SGP has focused consistently. I stored these settings in the profiles so that I do not forget them.
I had some more prolonged issues with the 10" f/8 RCT but it seems considerably better behaved (even using HFD) if I have it collimated accurately in the first place and don’t wander too far off-focus. I may not get a perfect V-curve but the focus result compares favorably with an independent test (Goldfocus mask).
For info, I now try and use focus offsets for each filter, rather than AF with each. I calibrated my goldfocus mask with each refractor and it provides a very accurate assessment of each filter’s focus position in pixels, which can be turned into focuser steps. Since seeing is reduced at longer wavelengths, I was considering normalizing on the red filter and doing my AF runs with that.

I think it is still an improvement over @focus2 (TSX) and my monitor thumping days of FM and MDL.

This thread has fallen off the rails… closing.

A couple folks have asked that this thread be re-opened. I closed it because the replies were starting to turn toward the aggressive side. Let’s please remember a couple things here:

  • Have arguments, but be civil
  • There is no need to argue or debate the suitability of SGPro’s AF routine for long FL scopes with a central obstruction. It is a problem and we have already committed to see if we can find a better way.

If you wan’t to use this thread to openly discuss ways to resolve the issue at hand… we would love that. I will re-open and we’ll see how it goes.

Hi,

Another data point.

I have experienced similar behavior with a not so long focal length telescope, 12 inch f/2.8 newtonian (800mm FL). I have a nice moonlite focuser with very minimal backlash and is common that SGP detects out of focus stars as many super small stars, this causes invalid data points.

I like the idea of discarding stars with less than possible physical size, to me it looks like a natural safeguard.

By the way, I do have an small refractor and the focus routine always works perfectly.

Cheers,

Jose

1 Like

Good decision to shut down the thread, and another good decision to re-open it. Sometimes emails come out much more offensive than intended. However, I also noted a bit of aggressiveness in the emails starting to emerge. Hopefully everything is back on track. No need to get offended or argue who’s scope is bigger and so on and so forth.

I have an RC10 and am rather new to SGP. I am using the focus functionality, and I learned early on that if you are not very close to focus the focuser will go in one direction, and won’t be able to tell which side of focus it is on. I believe Andy described it well in his post. I think it starts dialing in on the central obstruction point onjce the donut forms or something like that. I am still trying to figure out things.

The focus seems to work okay for me, and I have experimented with it somewhat by resetting the increments and the number of points so I can capture the bottom of the v of the focus curve. I don’t really get a V as much as I get an elongated U. I also think that discarding stars with less than a possible physical would be a good potential solution.

Nothing but support from this user to continue to refine the product.

1 Like

Get back to the problem…

The code recognizes stellar profiles and measures HFRs fine when they still look like stars.
It has less success when the star goes to the doughnut stage. Single star HFD/HFR like old FocusMax did this well but had the advantage of usual detecting the highest signal in the field.

Perhaps a hybrid approach. Find the only the single brightest doughnut when out well focus , > 3.0 HFR.

Is the nebula slider is a multi-scale separation process?

That’s actually not the case for many of us who find the graph doing well - except when it is pulled down by small non-stars. I think the SGP description of autofocus with sct’s encourages people to stay close to the focus point so that donuts never appear in the first place - and that does work well for me - and it does trace out a repeatable curve that reveals the point of best focus very accurately. If you are finding a problem with donuts confusing the autofocus - there is already a solution - and that is to work closer to focus so donuts don’t appear. But if you do that - you may find the curves confused by small stars that don’t exist and can’t be rejected by the sliders.

I only used the earlier focusmax and it relied on measuring a single bright star far from focus - and that did not work well for me for many reasons - whereas an approach based on multiple stars near focus is hard to go wrong - since it is a direct measurement of actual stars near focus. But many people do see jagged curves appearing that throw things off - and one particular cause of this to look out for is small non stars being counted as stars - hence my suggestion to reject stars below a minimum size in arc-seconds - and to display star sizes in arc-seconds.

Frank

While measuring stars far from focus may not be a reliable way to get an accurate focus I think it would be good if the star size measurer could use stars far from focus.

I’d like to be able to take images far from focus and use the change in size of the doughnut to get close enough to focus that the close focus method would work.

What I seem to see with a RC away from focus is that the star HFD algorithm picks up one side of the doughnut and interprets it as a small star. That’s where it all falls apart.

There’s a lot of literature about detecting circles for computer vision applications but most seem to be interested in detecting their position rather than their size. We don’t care about the position of multiple circles (or rings) but we do care about their size.

The circular Hough transform seems to be the basic circle detection algorithm but it’s tremendously computationally intensive, especially if the circle radius is not known.

Chris

I like your thinking Frank. SGP focus started working only when learn to drop the star slide down. So now it works fine even with a FL 1200 and 50% CO. Most of the time I get V crossing the lowest point in the graph. Hopefully, smaller star spoiling the measurements is the only problem that needs to licked. Hopefully, a system that has gone out of focus during a run due to temperature to can alway be recovered.