[AstroPy] got centroid?

Adrian Price-Whelan adrianmpw at gmail.com
Thu Apr 12 18:26:15 EDT 2012

This may not help you because it's not so smart, but to zeroth order, you can 
do something like this:

import scipy.ndimage as snd
labels, num = snd.label(imageData > (2.*sigma), np.ones((3,3)))
starCoordinates = snd.center_of_mass(imageData, labels, range(1,num+1))

Obviously it's making some nasty assumptions about the image, but it's at 
least a place to start. 

- Adrian

On Apr 12, 2012, at 6:12 PM, Wolfgang Kerzendorf wrote:

> Hey all,
> 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.
> Cheers
>    Wolfgang
> _______________________________________________
> AstroPy mailing list
> AstroPy at scipy.org
> http://mail.scipy.org/mailman/listinfo/astropy

Adrian Price-Whelan
Department of Astronomy
Columbia University

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/astropy/attachments/20120412/84a3d6fb/attachment.html>

More information about the AstroPy mailing list