find_centre

clustertools.analysis.functions.find_centre(cluster, xstart=0.0, ystart=0.0, zstart=0.0, vxstart=0.0, vystart=0.0, vzstart=0.0, indx=None, nsigma=1.0, nsphere=100, density=True, rmin=0.1, rmax=None, nmax=100, method='harfst', nneighbour=6)[source]

Find the cluster’s centre

  • The default assumes the cluster’s centre is the centre of density, calculated via the find_centre_of_density function.

  • For density=False, the routine first works to identify a sphere of nsphere stars around the centre in which to perform a centre of mass calculation (similar to NBODY6). Stars beyond nsigma standard deviations are removed from the calculation until only nsphere stars remain. This step prevents long tidal tails from affecting the calculation

Parameters:
clusterclass

StarCluster

xstart,ystart,zstartfloat

starting position for centre

vxstart,vystart,vzstart

starting velocity for centre

indxbool

subset of stars to use when finding center

nsigmaint

number of standard deviations to within which to keep stars

nsphereint

number of stars in centre sphere (default:100)

densitybool

use Yohai Meiron’s centre of density calculator instead (default: True)

rminfloat

minimum radius to start looking for stars

rmaxfloat

maxmimum radius of sphere around which to estimate density centre (default: None cluster.units, uses maximum r)

nmaxint

maximum number of iterations to find centre

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,vzc - coordinates of centre of mass