[AstroPy] got centroid?

Joe Harrington jh at physics.ucf.edu
Fri Apr 13 08:40:45 EDT 2012


Hi Wolfgang,

> I just wanted to know if anyone has a quick and smart centroid script
> in any of the python libraries (easily installable). Even better would
> be star finding algorithms like sextractor.

A PhD student here, Nate Lust, has spent considerable time evaluating
centering (not centroiding) algorithms.  The quickest and worst is the
usual center-of-light algorithm.  He has a fast Python/C implementation
of the Gunn-Owen least-asymmetry algorithm that he may be willing to
share.  The other easy one is simply fitting a Gaussian + constant
offset to the inner part of the PSF.  Nate is working on a paper that
evaluates these vs. real and synthetic data.  He and Kevin Stevenson
published preliminary results in the Supplementary Information to:

Stevenson, K. B., J. Harrington, S. Nymeyer, N. Madhusudhan, S. Seager,
W. C. Bowman, R. Hardy, D. Deming, E. Rauscher, and N. Lust
2010. Possible thermochemical disequilibrium in the atmosphere of the
exoplanet GJ 436b. Nature 464, 1161–1164.

The short version is that least asymmetry is the most accurate and takes
the longest to calculate.  Gaussian is most precise but can be biased
away from the true answer if the star drifts a lot within the pixel,
especially if the images are underresolved and the center is nearer to a
pixel boundary than a pixel center.  Oddly enough, for our project we
preferred the Gaussian.  Being consistent (i.e., having the aperture
always be off by 0.05 pixels or so) was better than being correct with a
larger scatter.  We consistently get 0.01-pixel precision with the
Gaussian fit on Spitzer data.

Of course, if you have an accurate and 100x-overresolved version of your
PSF, then PSF shifting, rebinning, and fitting will always win out.  But
the PSF needs to be very accurate for this to work.

--jh--



More information about the AstroPy mailing list