I'm trying to use Mathematica to drive an autofocus system for a telescope and ccd camera. Three calculations are commonly used FWHM, HFD (half flux diameter) and sigma. So I need to be able to calculate those from a small (100x100) crop from an image produced by my tethering software. I found a Mathematica program to separate the stars out of the small image that works great so that is all sorted. As I understand it you do a gaussian distribution on the pixel data then calculate the two values to use to figure out the direction and when you are in focus. I'm new to Mathematica discovered it when I bought a Raspberry Pi and since I can buy a copy for about half what commercial software to do autofocus costs I thought it would be the way to go as I can use Mathematica for so much more. But I'm not having any luck so far doing the GD. So any clues tips or links are very much appreciated.
Dan