[ACP-805]  Avoid selecting saturated guide stars
Type Enhancement
Priority High
Severity Minor
Component AcquireSupport library
Fixed In Version [8.18.1
Versions Affected [6.0.46.0 Hot Fix 4
Severity Closed
Resolution Complete
Reported By Bob Denny
Resources Bob Denny
Start Date 8/5/2014

Description
See this Comm Center thread. Jim McMillan has a good idea on it.

Comments
7/8/2016 10:51:50 AM   Bob Denny
SVN Comment
Author rbdenny
Repository svn+ssh://rbdenny@a2_svn_dc3/home/rbdenny/svn/astro/acp
SVN Revision 934
Affected files /trunk/ACP Help/relnotes.htm (Modified)
/trunk/AcquireSupport.wsc (Modified)
/trunk/Script Components Master/AcquireSupport.wsc (Modified)
Check-in comment Use least-flux saturated star if we're left with no other choice, rather than fail guiding. GEM:805
4/19/2016 4:59:29 PM   Bob Denny
REOPENED

See this Comm Center thread by Mike Miller. There is the possibility that if the initial exposure results in one star and it is saturated, then it silently gives up and says no suitable stars found. Then it tries again at the max exposure, and of course that star is saturated big time, it fails again! Maybe it would be OK at the minimum exposure. So how to deal with this? The problem came up with the ONAG, which is a sort of wide field guider and I expected more than one star in that field. 
9/29/2014 5:54:25 AM   Bob Denny
I declare it working.
8/28/2014 2:17:53 PM   Bob Denny
Holy s**t. I can't use the PSF detector for SNR scaling in SetupGuider(). Back to Aperture with fixed aperture sizes. This is essential for proper scaling of SNR with exposure.
8/28/2014 2:16:11 PM   Bob Denny
SVN Comment
Author rbdenny
Repository svn+ssh://rbdenny@a2_svn_dc3/home/rbdenny/svn/astro/acp
SVN Revision 741
Affected files /trunk/AcquireSupport.wsc (Modified)
/trunk/Script Components Master/AcquireSupport.wsc (Modified)
Check-in comment Go back to Aperture detection of stars, use fixed apertures, and wait for FindImageStars(). Essential for proper scaling of SNR with exposure. GEM:805
8/5/2014 2:57:11 PM   Bob Denny
This will need beta testing by the requesting parties. 
8/5/2014 2:54:33 PM   Bob Denny
SVN Comment
Author rbdenny
Repository svn+ssh://rbdenny@a2_svn_dc3/home/rbdenny/svn/astro/acp
SVN Revision 703
Affected files /trunk/ACP Help/relnotes.htm (Modified)
/trunk/AcquireSupport.wsc (Modified)
/trunk/Script Components Master/AcquireSupport.wsc (Modified)
Check-in comment Refactor SetupGuider() to avoid star changes after first call, avoid saturated stars at the initial guide interval, and also to avoid brighter neighbors by requiring them to be at least 20 pixels away (more than half the trackbox). GEM:805
8/5/2014 11:05:08 AM   Bob Denny
See this Comm center post, repeated here:

I've just spent a couple of hours simulating and thinking... Clearly this is only applicable to widefield/external guidescopes. There are two knotty problems here:

  1. The series of calls to SetupGuider() are assumed to be used to converge on the correct exposure for the desired SNR. If the star switches in the middle of this, the SNR will suddenly switch and invalidate the converging series. The star could switch if, as the exposure interval decreases, a formerly saturated star becomes unsaturated and thus becomes the chosen star, changing the SNR probably dramatically, right in the middle of the converging series of calls. The star cannot switch from rejections coming from neighbors.
  2. Rob's note that trying to guide "on a fainter star" with a saturated neighbor is going to be a loser. MaxIm centroids the entire trackbox (by design). Reducing the trackbox to 16 has other consequences like for dithering. Plus the web UI preview of the guider assumes 32x32 (yes this is a limitation and I just found it while working on this issue). There is no way to read the trackbox size from MaxIm's settings either :-( so I will have to put that in a setting somewhere. Or not...

I think the "engineering" way to solve #1 is to test for saturation and reject a candidate only on the initial call which uses the Initial Guide Exposure Interval. Rejecting a star in that call is no problem, as long as the one chosen in that call remains the same one chosen thereafter. This is imperfect but I think it is a 90%/10% solution.

On #2, I can reject stars for neighbors more intelligently, assuming a 32x32 trackbox. Right now it rejects a guide star with any other star that is within 10 pixels. I can change it to reject a brighter star if it is within +/- 20 pixels (a bit outside the 32x32 box). I can also accept a candidate if the flux of its nearest neighbor is less than 5% of its own flux, giving me more flexibility.

Finally, I note that the logic uses PinPoint's Aperture Photometry detector. The improvements in the PSF detector in PinPoint 6 make PEF the best choice for this job. I'll adjust the detection Sigma values accordingly. I don't believe this process will result in a star switch, but... I may look at also fixing on the star in the first call and forcing subsequent calls to stay on the same star without going back through the selection process.
8/21/2013 8:48:32 AM   Bob Denny
Rob Hawley reports this is good!

1/3/2013 11:29:55 AM   Bob Denny
Needs to be only for separate guide scopes, and tested only when the final exposure interval has been chosen. This will be difficult with the factoring of AutoGuide() and SetupGuider().
1/3/2013 11:21:44 AM   Bob Denny
Missed this for ACP 7 originally, and need to add it. Here is Jim McMillan's solution.