find_centre_of_density¶
- clustertools.analysis.functions.find_centre_of_density(cluster, xstart=0.0, ystart=0.0, zstart=0.0, vxstart=0.0, vystart=0.0, vzstart=0.0, indx=None, nsphere=100, rmin=0.1, rmax=None, nmax=100, method='harfst', nneighbour=6)[source]¶
Find cluster’s centre of density
- Find cluster’s centre of density:
if method==’harfst’ use (Harfst, S., Gualandris, A., Merritt, D., et al. 2007, NewA, 12, 357) courtesy of Yohai Meiron if method==’casertano’ use (Casertano, S., Hut, P. 1985, ApJ, 298, 80)
- Parameters:
- clusterclass
StarCluster
- xstart,ystart,zstartfloat
starting position for centre (default: 0,0,0)
- vxstart,vystart,vzstartfloat
starting velocity for centre (default: 0,0,0)
- indx: bool
subset of stars to perform centre of density calculation on (default: None)
- nsphereint
number of stars in centre sphere (default:100)
- rminfloat
minimum radius of sphere around which to estimate density centre (default: 0.1 cluster.units)
- rmaxfloat
maxmimum radius of sphere around which to estimate density centre (default: None cluster.units, uses maximum r)
- nmaxfloat
maximum number of iterations (default:100)
- methodstr
method for finding the centre of density (‘harfst’ (default), ‘casertano’)
- if method==’casertano’
- nneighbourint
number of neighbours for calculation local densities
- Returns:
- xc,yc,zc,vxc,vyc,vzcfloat
coordinates of centre of mass