Bug 432546 - SEP-MultiStar Broken; Loses Track of Guide Star
Summary: SEP-MultiStar Broken; Loses Track of Guide Star
Status: RESOLVED UNMAINTAINED
Alias: None
Product: kstars
Classification: Applications
Component: general (show other bugs)
Version: 3.5.1
Platform: Other Other
: NOR normal
Target Milestone: ---
Assignee: John Evans
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-02-05 16:59 UTC by MountainAirCA
Modified: 2023-06-01 19:37 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Guide Log (307.87 KB, text/plain)
2021-02-05 16:59 UTC, MountainAirCA
Details
Screen shot (545.84 KB, image/png)
2021-02-05 17:26 UTC, MountainAirCA
Details
GuideCam image (1.36 MB, application/zip)
2021-10-11 10:33 UTC, MountainAirCA
Details

Note You need to log in before you can comment on or make changes to this bug.
Description MountainAirCA 2021-02-05 16:59:49 UTC
Created attachment 135452 [details]
Guide Log

SUMMARY

Since 3.5.0, I have been unable to rely on SEP-MultiStar guiding (it worked very well prior to that).  It starts the calibration process but quickly loses the guide star even though it is centered in the middle of an appropriately-sized selection box.  This can happen 5, 10 times in a row.  It usually happens quickly, but sometimes I can almost make it through to the end of calibration and other times I can start guiding but it fails within minutes.  I tried guiding in different parts of the sky east/west, tried changing selection box sizes and calibration pulses, etc.  When I can guide, the SNR is typically 400+ so I don't think that's the issue.  

When switching from SEP-MultiStar to Smart, it works immediately and reliably every time, even with the same guide star.

ALSO:  SEP MultiStar sometimes selects double stars.  I'm not sure Smart does this (it seems to be better, but maybe I just never had a need to watch it).

GUIDE LOG ATTACHED.

STEPS TO REPRODUCE
1. Set guiding settings to default.
2. Change to SEP Multi-Star
3. Attempt to guide.

OBSERVED RESULT
The guide star is lost 9 out of 10 times.

EXPECTED RESULT


SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: RPi4 Stellarmate 1.5.1
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 MountainAirCA 2021-02-05 17:26:06 UTC
Created attachment 135453 [details]
Screen shot

This is a screen shot of the issue, after several failed attempts.  It's like KStars just can't see the star in the box!
Comment 2 MountainAirCA 2021-02-06 05:37:11 UTC
The previous comments were for KStars 3.5.0 on Mac.   Just to give you an example, I just ran into the same issue on Stellarmate 1.5.1 on RPi4-8GB.  After several attempts at starting guiding, I gave up and went back to the Smart algorithm.  That immediately and reliably worked.

I'm not sure if this is important, but I am using GA guiding when SEP Multi-star fails.
Comment 3 Hy 2021-02-06 22:14:33 UTC
Thanks for the report. I looked at your log. I'm wondering if the issue is related to a bad value for the  parameter in the guider settings called "Max MultiStar HFR".

To find that, go to the guide page, then click options on the lower right, then click on the Guide tab on the left. You should now see many options and in particular, see that "Max MultiStar HFR" one. Do you have it set to 2 or something like that?  Could you try e.g. 4 for that?

What this parameter does is limit the HFR for the chosen guide star. In your case, according to the log, it seems to be always choosing very low-HFR guide stars and then losing them. This will allow it to choose more reliable stars.

Currently that parameter defaults to 4.5, but it's possible it had a different default at some point, or that you changed its value. In any case, let us know if this fixes things.
Comment 4 MountainAirCA 2021-02-06 23:38:47 UTC
Thanks Hy!

I just checked, and I am indeed using the default of 4.5.  I tend to customize very few things, and only after testing one change at a time, and then carefully document it.  After restoring defaults (or doing a clean install of StellarMate), I:

1. Change the algorithm to SEP Multi-star
2. Enable dithering (default values for everything)
3. Enable GPG RA guider (sorry I called it GA before, my head was in Google Analytics)
4. Change GPG Major Period to 400
5. Uncheck Estimate Period

That's it.  Is 4.5 pixels perhaps too low?  I had never customized this before, so I assume it was always this default.  I can try it tonight if you can let me know what you think.  I can tell you that the guide scope was in good focus, with a full-field HFR of something like 1.4 to 1.6 if I recall correctly.
Comment 5 Hy 2021-02-06 23:55:33 UTC
If you have that parameter at 4.5, then that's not the problem. No need to mess with that. I guess I have to look further in your log...3.5.0 was when StellarSolver got introduced, and it is used in guiding, but I thought your log looked like it was detecting stars OK. I'll check again.
Comment 6 MountainAirCA 2021-02-07 00:14:24 UTC
Note, I don't believe I ever had issues with StellarSolver.  It's fast, accurate and reliable.  I wasn't aware that it was used in guiding.

Tonight is likely my last clear night, so if there's any additional logging or sample GuideCam images, etc. that you need just let me know.

Thank you!
Comment 7 MountainAirCA 2021-02-11 15:04:30 UTC
Last weekend I made it out to my dark sky site.  I tried many times to get SEP MultiStar working but would constantly lose track of the guide star even though they were between 30k and 44k —- not dim, not bright — according to star profile.

My guiding is worse with Smart, but it works whereas SEP MultiStar doesn’t.  Yet I know it works for others, and used to work fine for me.  What other settings can I look at?
Comment 8 Hy 2021-02-11 15:48:27 UTC
I'm not sure what's causing your problems, but my guess is this:

with 3.5.0 came the introduction of StellarSolver. SepMultiStar relies on stellar solver to do it star detection.

Each module, focus, guide, and align, have options where you can select which StellarSolver profile to use, and the parameters for those profiles can be edited. It's possible that there's something about the profiles you have set for guiding that can be improved. Also make sure the telescope parameters (focal length and pixel size) are set up right for your guide scope 

I can't point you to the menu where you select and edit the guide profile right now, but if you have trouble finding that let me know.
Comment 9 MountainAirCA 2021-02-11 18:04:29 UTC
Thanks Hy.  I'll try, but I am fairly certain I have tried each one of those profiles at least a couple times.  I always end up putting it back at the default.
Comment 10 MountainAirCA 2021-02-19 20:10:57 UTC
Testing all of the SEP profiles has proven fruitful; "2-AllStars" is the only profile that works on any of my 3 imaging rigs.  EVERY other profile, all of which are un-edited, DO NOT work.  I must have tried 50 times last night.

I *believe* I even saw AllStars occasionally select the same star that other profiles failed on.  Strange, but it echoes what I saw when using the Smart profile.

This is a clean install of KStars 3.5.0 on Mac and StellarMateOS 1.5.1.  These profiles are un-edited, so how is it that they instantly cause calibration to fail for me, yet they (presumably) work for others?  I'm glad it's working, but I wonder how effective this indiscriminate profile will be over the long term.

Another question:  Even with SEP Multi-Star working, I am seeing the secondary stars (round circles) disappearing during guiding.  I'm left only with the primary star with the square box.  What exactly does that mean exactly?
Comment 11 Hy 2021-02-19 20:35:37 UTC
It is my belief that the StellarSolver profiles given are not yet "mature" and could certainly use tweaking for some systems. It may be that you need to adjust parameters for your system, and I recognize that the "how to do that" is not obvious. I'm happy to discuss more and give you my opinions.

The way the algorithm works is, it tries to identify a guide star, which has a certain geometric relationship with other "reference" stars in the image. Field rotation will mess with that relationship, but it should be tolerant to up/down/left/right shifts (unless the reference stars fall off the image).

It tries to get 10 reference stars, to go along with the guide star. It searches for the star that supports the most reference stars. If it can find 8/10 or 9/10 that's fine, but if the best candidate can only find 1/10, then it gives up. I forget where the threshold is, but is's around 1/2 of the reference stars.

So, if you're reporting that you're dropping one or two, no problem. If it's only finding around half, then yes, that's pretty tenuous. When all the circles drop out, that means that it didn't find enough reference stars, and it fell-back to the old scheme of trying to track a single star inside a reticle. 

All of this depends on good star detection. If the reference star is not detected, then it will never be found. I've toyed with the idea of not naming any guide star, but having the group of stars identify the position. This could be a bit more resilient to marginal star detection and may be part of some future release, but haven't seriously begun work on that.
Comment 12 MountainAirCA 2021-02-19 21:15:58 UTC
Thanks, that detail is very useful.

Maybe this will help:  My guide cams are all ASI290MMs binned 1x1.   They're connected to either 250mm/50mm EvoGuide or 120mm/30mm ZWO mini Guide scopes depending on the rig.  The Guiding module is configured correctly with these params.  I really never have issues seeing plenty of stars to guide on.  This is probably one of the more-common guiding configurations out there for shorter focal lengths.  I'd be happy to test some settings, I just don't know what to change.

Regarding the primary/secondary stars... typically, I see plenty of green secondary stars during the calibration phase.  Occasionally 1 or 2 turn red, but it's very rarely more than that.  But while guiding, the secondaries disappear entirely - no red circle, no line, nothing.  At that point it almost looks like the Smart algorithm vs MultiStar.  I will look for a screen shot.
Comment 13 Jasem Mutlaq 2021-09-14 07:51:43 UTC
Is there anything pending in this report?
Comment 14 MountainAirCA 2021-10-10 06:38:48 UTC
Unfortunately SEP Multistar still does not work for my common guide scope/cam even in KStars 3.5.5.

No matter what SEP Profile I use when SEP MultiStar is the algorithm, upon pressing the Guide button I immediately get a "failed to select an auto star" error.  This happens even when the entire guide cam field is full of good guide stars, and even when one is pre-selected.  If I switch the algorithm to Smart, it all immediately works.  But unfortunately, I need SEP MultiStar since the guiding is so much better.

This is with a clean install of KStars 3.5.5 on StellarMate OS.  I did also try downloading all the necessary index files for my FOV, and checked the various star detection profile settings wherever I could find them.

I have similar issues with my larger EdgeHD 9.25 scope with an ASI174mm OAG, but that one I can usually get working after several tries.  I think it's the SEP-AllStars profile that is passable there.
Comment 15 Jasem Mutlaq 2021-10-10 07:04:02 UTC
Edit the default SEP profile, change FWHM to 1, rmin to 2. Then save and try again. Is it any better?
Comment 16 Hy 2021-10-10 07:59:11 UTC
I'd say, bottom line, you need to find the StellarSolver parameters that work with your guide scope and guide camera. Sometimes getting stellarsolver to work well can be tricky. (For guide, you only need the star-detection part of stellarsolver, not the plate-solving part).

You can do this by getting the guider out of the loop, and e.g. doing this with focus (setting your camera to the guide cam) and then seeing what parameters you need to set to get stars detected. You may have to edit one of the profiles, not simply pick a preset one. Once you have those parameters, and can seem to reliably detect stars, then you copy those back into one of the guide presets, modified your way.
Comment 17 Hy 2021-10-10 08:06:53 UTC
BTW, send a fits file and I can see if I could find some parameters that work for you.

Please keep in mind, that the presets profiles are starting points, but you can edit and improve them for your hardware.
Comment 18 MountainAirCA 2021-10-11 10:33:38 UTC
Created attachment 142327 [details]
GuideCam image
Comment 19 MountainAirCA 2021-10-11 10:38:43 UTC
I previously tried (a few times) to customize the profiles, but I never found any detailed instructions on how to do so (perhaps they exist now; I didn't look last night) and fiddling with them previously didn't seem to help much.

I'll try Jasem's suggestions, and have uploaded a sample guide cam photo for you to try with, Hy.  

Thanks for the help with this.  If I missed more detailed customization instructions somewhere, please point me in the right direction.
Comment 20 Hy 2021-10-11 17:51:15 UTC
You said:

 but I never found any detailed instructions on how to do so 

You're right, it isn't well documented. It would be great if you wrote those instructions. I can point you in the general direction of where to do the research.

You didn't send me what parameters you were using that were failing. Please do.
I did the following.

I installed StellarSolver source and compiled the program including the StellarSolverTester program from https://github.com/rlancaste/stellarsolver

I ran StellarSolverTester, loaded your image, clicked on "StartSourceExtraction", and played with the different preset profiles.  Most solved your image, including 1-Default. Can you try that too?

StellarSolver is really a repackaged version of something professional astronomers used call sextractor. There is plenty online help for sectractor, and suggestions for the parameter values. For instance: http://star-www.dur.ac.uk/~pdraper/extractor/Guide2source_extractor.pdf 
Google sextractor for more. Also, Rob does point to some documentation in the profile editor. The column headers below "Sextractor Parameters" contains links to the Extractor Params (https://sep.readthedocs.io/en/v1.0.x/api/sep.extract.html) etc sextractor documentation. The "Star Filtering Parameters" section has tool tips (put your mouse over the field and see some doc) for those parameters.

Summary. (1) Run StellarSolverTester with your image and get "Start Source Extraction" to work, chosing profiles, and if necessary modifying profile parameters. (2) Use those profiles back in Ekos and hopefully things will be working now. (3) Using your image in StellarSolverTester, I was able to solve with many profiles.
Comment 21 MountainAirCA 2021-10-11 20:45:27 UTC
I had not modified any of the profile settings, which is why I didn't mention any special configuration values.  There were 5 profiles, so I just assumed it was a good sampling of possible configs and one would work.

Thanks for the pointers to some documentation - it's already very interesting.  The reference to Sextractor helps me better understand why guiding is using StellarSolver in the first place.

I'll try what I can in a couple weeks when I'm back at the observatory.  THANK YOU!
Comment 22 Hy 2021-10-11 20:59:55 UTC
I'm happy to help, and, as I suggested, you're right that it's not well documented. If/when you do get up to speed, it would be very helpful to have you share your experience by documenting and helping others figure it out. We're just volunteers in this enterprise and the more the merrier.
Comment 23 MountainAirCA 2021-10-31 19:29:21 UTC
Quick update:  3 weeks ago when I had difficulty with this issue, I switched to PHD2 and had success.  This last Friday night, I had focused with the PHD2 HFD indicator but then decided to switch back to KStars.  Well, KStars seemed to work -- but I'm not sure.  "Magically working" implies that it was perhaps the focus of this problematic 30/120mm guide scope that was causing the issue with star detection in KStars.  However, all night I couldn't get the additional "multi-star" circles to show up.  SEP Multi-Star was definitely selected, but regardless if I used AutoStar or not it just didn't seem to pick other stars to include in the tracking session.  So, I'm not sure that SEP MultiStar was being used, and if it wasn't being used, then maybe focusing didn't help -- because this issue only showed up in SEP Multistar.  The single-star guiding actually worked well all night, though (seeing was above average).

I did not have a chance to try Jasem's SEP profile settings changes yet.

Suggestion:  Normally when using KStars I would try to focus using the Focus module (and changing the camera to the guide cam).  However, focus drifts easily with this little guide scope.  It is very convenient having the HFD visible in PHD2, so I think it would be great to add a focus indicator to the KStars guiding module as well.  Then maybe you could even alert the user if focus drifts enough to possibly affect guiding.
Comment 24 John Evans 2023-06-01 19:37:14 UTC
email from Brett when I reached out to him on current status. Resolving issue based on this.

Hi John,
 
You won’t see any further details on my tickets because shortly thereafter I ended up migrating to NINA/PHD2.  I was just struggling with software issues too frequently back then.  My apologies for leaving the tickets hanging.
 
If I recall correctly, the profile parameters in the guiding module that StellarSolver was using just did not work for my combination of equipment.  This was worse on one 250mm FL scope with a ZWO 30mm guide cam, despite my best attempts at focusing.  That was an extremely popular guide cam, but I did replace it with a William Optics Uniguide 32 and was amazed at the quality difference.  Perhaps it was the source of most of these “lost star” issues, but I never went back to check with the newer UniGuide.
 
If this issue is not being reported by others, I think you can probably safely close it.
 
Thanks,
Brett
 
P.S. I’ve been following KStars development and it seems like it really picked up steam.  There have been some great enhancements.  While I’m likely sticking with NINA, there are still several awesome features that I miss from KStars/Ekos.  Keep at it!