Centroid determination algorithm

182 views
Skip to first unread message

Donald Bruns

unread,
Apr 14, 2016, 7:53:45 PM4/14/16
to astrometry
I am new at running Astrometry.net, so am trying to learn how it works.  For example, I submitted an image and compared its results with some other commercial programs.  Ignoring the star matching, I am just looking at the centroid measurements for the brighter (non-saturated) stars with FWHM between 1.1 and 1.5 pixels.  Surprisingly, individual star centroids vary a lot among the various programs. Typically, the centroids differ by 0.02 to 0.2 pixels!  Astrometry.net seems to have a much larger variance than Astrometrica, Prism, or Pinpoint. Those programs attempt to fit a gaussian profile, which is admittedly difficult when only a few pixels have a signal above noise.  Can anyone here tell me how Astrometry.net finds the centroids?  I suspect it is doing a simple barycentric calculation, since it seems so different than the others.

If anyone has software that does this any better, I would also like to know about that, too.

Thanks!
Don

Dustin Lang

unread,
Apr 14, 2016, 9:02:29 PM4/14/16
to astrometry
Hi,

We use the "simplexy" code from Michael Blanton.  For the peak location, it cuts out a 3x3 box of pixels around the peak and, assuming each row and column is a quadratic, returns the peak, then fits a line to the rows and a line to the columns.  Where they meet is the peak.  It's similar to what is used in SDSS.

https://github.com/dstndstn/astrometry.net/blob/master/util/dcen3x3.c

When you say that Astrometry.net has a much larger variance than the others, what do you mean?  Variance with respect to what?

cheers,
--dustin


Donald Bruns

unread,
Apr 14, 2016, 9:51:04 PM4/14/16
to astrometry
Thanks again, Dustin.  I'll look up that reference.

By "variance", what I actually mean is the variance when I compare the centroids found by one program, compared to another.  The other programs have similar differences, but Astrometry.net is about 3x the difference.  This means that the other program are using similar algorithms, while Astrometry.net apparently uses something different.  Based on your quadratic curve description, I was right.  It should be pretty close to a gaussian fit, but the commercial programs use proprietary algorithms.

My next step is to compare two images taken a minute apart. The telescope was tracked, but small differences in turbulence and precise centering moved the stars between images.  Using one program I found the shift between the images was 1.015 pixel (2.1 arcsec), small enough to ignore distortion.  Using a second program, the difference was1.005 pixel.  The scatter in the differences is a good measure of the centroid accuracy.  For both programs, I get RMS errors of 0.19 arcsec.  The differences between individual data points, however, shows an RMS of 0.1 arcsec.  This will be repeated for Astrometry.net and another program.

By bottom line is that I really need very good centroid measurements.  Once I get those, then my next task will be to compare with star positions (waiting patiently for Gaia, using URAT1 in the meantime).  I'm also planning on measuring the pixel phase error, but for now, I simply need to find a good program that gives me precise centroids.

Don

Dustin Lang

unread,
Apr 15, 2016, 6:28:19 AM4/15/16
to astrometry
Ok, that's a very good definition of the variance =)  And an interesting finding.

One other thing you might want to look at would be the differences between the centroids as a function of position on the chip -- for exampe, split the image into a 4x4 grid and compute the mean difference in each cell and plot the vector differences.  One thing that can affect centroids slightly is the background subtraction.

Are you trying to measure proper motions?

cheers,
--dustin

Donald Bruns

unread,
Apr 16, 2016, 12:55:45 PM4/16/16
to astro...@googlegroups.com
Hi,

I am repeating the experiment that made Einstein famous: an attempt to measure the solar deflection of stars during an eclipse.  The August 21, 2017 eclipse presents the first opportunity to do that in the US, using commercial equipment.  The last success (+/- 11%) was in Africa in 1973, organized by the Univ. of Texas.  Next year, I hope to do ten times better!  Its a difficult experiment, but I think I have a handle on all the little details.  Pixel phase error, turbulence, proper motion, optical distortion, differential refraction and chromatic aberrations, etc.  I was surprised that finding the centroids would be so difficult.  Maybe going back to using the 1973 trial's 12" glass plates and a microdensitometer are not such a bad idea!  I am publishing an article in the August 2016 Sky&Telescope, as well as some other conferences and technical papers.

David W Hogg

unread,
Apr 16, 2016, 7:50:22 PM4/16/16
to Dustin Lang, astrometry
I'm not remembering what A.n does but if it does anything close to what MJ Vakili and I suggest (plus something sensible about sky) then it should saturate the bounds on precision. DSTN: What *do* we do?
--
You received this message because you are subscribed to the Google Groups "astrometry" group.
Visit this group at https://groups.google.com/group/astrometry.

Dustin Lang

unread,
Apr 17, 2016, 9:38:05 AM4/17/16
to astrometry, dstn...@gmail.com, david...@nyu.edu
That's answered earlier in this thread; dcen3x3

cheers,
--dstn

David W Hogg

unread,
Apr 17, 2016, 3:10:16 PM4/17/16
to Dustin Lang, astrometry
Indeed. I just don't remember what the precise algorithm is. Either way it's close to optimal if sky gradients and crowding are small. 
--

You received this message because you are subscribed to the Google Groups "astrometry" group.
Visit this group at https://groups.google.com/group/astrometry.


--
Sent from a tiny device.

E M

unread,
Sep 13, 2022, 3:49:30 AMSep 13
to astrometry
Hi, this thread was posted back in 2016, but I do not see the conclusion of this discussion.  What I mean is that the author (Don) tried Astrometry.net,  Astrometrica, Prism, and Pinpoint in an attempt to obtain the most accurate and most correct measurement of the centroid of the star.  Was the conclusion that Astrometry.net provided the best and most precise location of the centroid when compared to Astrometrica, Prism, or Pinpoint?  Or did one of these other software packages provide the best, most accurate, and most precise centroid location?  Thanks.

Dustin Lang

unread,
Sep 13, 2022, 8:11:31 AMSep 13
to astrometry
Hi,
I have no idea what those other programs use for their localization, but the "simplexy" algorithm used by the Astrometry.net code uses a pretty simple paraboloid-fitting algorithm, looking at only the 3x3 central pixels, to find the peak in the PSF-blurred image.  For images with a narrow PSF, this should be pretty good, but it's definitely not even trying to use the full information available.  Doing that would require a PSF model, which we don't try to do.  The Astrometry.net algorithm is good for robustness.  For example, it works on JPEG images that have an unknown stretch applied to them, and (with --downsample) it even works reasonably well on saturated images without any special handling of saturated pixels.  (A correct method would mask the saturated pixels.)  All that being said, I don't know what the other algorithms do.
cheers,
dustin

E M

unread,
Sep 13, 2022, 3:53:19 PMSep 13
to astrometry
Thanks Dustin.  It does sound like the simplexy algorithm is very flexible.
Reply all
Reply to author
Forward
0 new messages