Half flux, automatic star recognition with source code

I got green lines for the first time last night. The trick was to move the star slider down to about 30%.

It eliminated small stars that were throwing the calculations way off. Works pretty good now with both FWHM and HFR methods. Angles on each slide were slightly different but it was crossing at the low point.
By the way, I never have gone out enough to see doughnuts even before. So my problems were not do to CO.

I agree a method that tosses out the smaller stars is a good idea. Could this be based the on pixel size and focal length?
I could be a automated then.

I think everyone should have focal length and pixsize set properly for a session - and if they don’t then min hfd could be one pixel or something as a default - in other words no change from current behavior.

If people change binning it is important that these limits be set in arc-seconds.

An alternative approach to removing bad outliers would be to use a median/sigma rejection heuristic. I think in most cases the bad big and small stars would be recognized as outliers in a histogram so they could be removed automatically. This would avoid having the user set limits and doing things in arc-seconds - but I would like arc-seconds anyway.

It might need setting a rejection criterion for the n-sigma rejection limit - but a fixed default might also work.

Frank

Frank,

Agreed, if pixel scale is not available use statistics to reject outliers, however as soon as the user successfully solve an image the pixel scale is accurately known, no need for the user to enter anything if blind solve is performed. Most if not all SGP users rely on plate solvers and the information provided by solving an image could be use not just for centering the mount.

Cheers,

Jose

Yes - I think there are ways to do this - but I realize the UI implications aren’t trivial, as Ken alluded, and I don’t know what scope is involved. There is a chance it could cause failures due to a setting being wrong or something. But for some of us the autofocus is very close to working well with sct except for some issues - so I’m just providing possible ways around them.

I see talk of fairly involved things like defining autofocus regions for an object - and my feeling is that if the core behavior were changed to be more robust then it could make features like that no longer needed and keep things simpler.

Frank

2 Likes

Not saying you’re wrong, just noting that there may be issues where equipment based ROI focus would be useful… for instance, at least a few folks have noted that they have not “quite flat” fields and wish average star metrics from one area, but not another. I am guessing both areas would meet HFR rejection criteria as outlined above.

+1. I too find that SGP seems to focus on a lot of tiny stars which tend to shift a great deal from frame to frame. Perhaps having a low cutoff would improve frame-to-frame star selection.

So based on what you’re seeing, is your focus significantly worse than if you used a bhatinov mask or another autofocus program?

I think you guys are hunting a non issue.

Actually I’m having a really hard time getting good autofocus on my short SV60EDS refractor. I’ve often puzzled why when I watch autofocus the stars picked for measurement varies so much between frames, and it seems to mostly be the really tiny stars that blink on and off from one frame to the next. That’s why I was wondering, as other have, if a low star size cutoff might help. Haven’t tried a Bhatinov mask though.

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.