<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body>
<div style="word-wrap:break-word">
<div>
<blockquote type="cite">
<div style="word-wrap:break-word">
<div>
<div>
<div>
<div>
<div>On Apr 12, 2012, at 6:12 PM, Wolfgang Kerzendorf wrote:</div>
<blockquote type="cite">
<div>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.<br>
</div>
</blockquote>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<div><br>
</div>
<div><br>
</div>
<div>This is not in a standard library but should be easily installable:  My webbpsf package (for optical simulations of JWST) includes an implementation of the unbiased floating window centroid algorithm adopted for target acquisitions with JWST.  (Note that
 this algorithm may be considered more smart than quick...)</div>
<div><br>
</div>
<div>You can get the entire webbpsf package from <a href="http://www.stsci.edu/jwst/software/webbpsf">http://www.stsci.edu/jwst/software/webbpsf</a>, but as that's overkill for this purpose I attach here just the one relevant file.</div>
<div><br>
</div>
<div>Cheers, </div>
<div><br>
</div>
<div> - Marshall</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div></div>
</div>
<div style="word-wrap:break-word">
<div></div>
<div><br>
</div>
<br>
<div>
<div>On Apr 12, 2012, at 6:26 PM, Adrian Price-Whelan wrote:</div>
<br class="x_Apple-interchange-newline">
<blockquote type="cite">
<div style="word-wrap:break-word">This may not help you because it's not so smart, but to zeroth order, you can 
<div>do something like this:
<div><br>
</div>
<div><font class="x_Apple-style-span" face="Monaco">import scipy.ndimage as snd<br>
</font>
<div>
<div>
<div><font class="x_Apple-style-span" face="Monaco">labels, num = snd.label(imageData > (2.*sigma), np.ones((3,3)))</font></div>
<div><font class="x_Apple-style-span" face="Monaco">starCoordinates = snd.center_of_mass(imageData, labels, range(1,num+1))</font></div>
</div>
</div>
<div><br>
</div>
<div>Obviously it's making some nasty assumptions about the image, but it's at </div>
<div>least a place to start. </div>
<div><br>
</div>
<div>- Adrian</div>
<div><br>
<div>
<div>On Apr 12, 2012, at 6:12 PM, Wolfgang Kerzendorf wrote:</div>
<br class="x_Apple-interchange-newline">
<blockquote type="cite">
<div>Hey all,<br>
<br>
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.<br>
<br>
Cheers<br>
   Wolfgang<br>
_______________________________________________<br>
AstroPy mailing list<br>
<a href="mailto:AstroPy@scipy.org">AstroPy@scipy.org</a><br>
<a href="http://mail.scipy.org/mailman/listinfo/astropy">http://mail.scipy.org/mailman/listinfo/astropy</a><br>
</div>
</blockquote>
</div>
<br>
<div>
<div>--</div>
<div>Adrian Price-Whelan</div>
<div>Department of Astronomy</div>
<div>Columbia University</div>
<div><br>
</div>
<br class="x_Apple-interchange-newline">
</div>
<br>
</div>
</div>
</div>
</div>
_______________________________________________<br>
AstroPy mailing list<br>
<a href="mailto:AstroPy@scipy.org">AstroPy@scipy.org</a><br>
http://mail.scipy.org/mailman/listinfo/astropy<br>
</blockquote>
</div>
<br>
</div>
</body>
</html>