clusterCentroid
Return to directory of Todd's CASA extensions
Reads a list of RA/Dec positions (and optionally the corresponding intensity) from a text file and computes
the centroid, or intensity-weighted centroid.
Usage:
au.clusterCentroid(filename, xcol=0, ycol=1, zcol=None, delimiter=None, maxLines=None)
- xcol: column containing RA in the format HH:MM:SS.S
- ycol: column containing Dec in the format DD:MM:SS.S
- zcol: optional column containing intensity (i.e. weight)
- delimiter: column delimiter in the file
- maxLines: max number of lines to be read from the file
Example:
File contains:
17:20:54.625 -35:45:08.75 1.0
17:20:54.622 -35:45:08.77 2.0
17:20:54.622 -35:45:08.81 21.0
17:20:54.622 -35:45:08.51 2.5
17:20:54.613 -35:45:08.60 3.0
17:20:54.618 -35:45:08.62 65.0
Command:
CASA <3>: au.clusterCentroid('ch3oh6.7ghz.py',zcol=2)
17:20:54.61899, -035:45:08.663227
Out[3]: '17:20:54.61899, -035:45:08.663227'
--
ToddHunter - 2014-02-07