clustertools.analysis.profiles module

Determine radial profiles of key properties

clustertools.analysis.profiles.alpha_prof(cluster, mmin=None, mmax=None, nmass=10, rmin=None, rmax=None, nrad=20, vmin=None, vmax=None, emin=None, emax=None, kwmin=0, kwmax=1, npop=None, indx=None, bins=None, projected=False, normalize=False, r_lower=None, r_upper=None, aerror=False, mcorr=None, plot=False, **kwargs)[source]

Measure the radial variation in the mass function

  • measure the delta_alpha parameter from Webb & Vesperini 2016

  • Webb, J.J. & Vesperini, E. 2016, MNRAS, 463, 2383

Parameters:
clusterclass

StarCluster

mmin/mmaxfloat

minimum and maximum stellar mass

nmassint

number of mass bins (default: 10)

rmin/rmaxfloat

minimum and maximum stellar radii

nradint

number of radial bins

vmin/vmaxfloat

minimum and maximum stellar velocity

emin/emaxfloat

minimum and maximum stellar energy

kwmin/kwmaxfloat

minimum and maximum stellar type (kw)

npopint

population number

indxfloat

user defined boolean array from which to extract the subset

binsfloat

User defined bins in the form of (rlower,rmean,rupper) (default: None)

projectedbool

use projected values and constraints (default:False)

normalizebool

normalize radial bins by cluster’s half-mass radius (default: True)

r_lowerfloat

lower limits to radial bins

r_upperfloat

upper limits to radial bins

aerrorbool

return error in alpha calculations (default:True)

mcorrfloat

completeness correction for masses (default: None)

plotbool

plot the alpha profile (default: False)

Returns:
rprofnfloat

natural log of each radius bin (normalized by half-mass radius)

aproffloat

slope of the mass function in each bin

dalphafloat

radial variation in alpha calculated as delta_alpha = d(alpha)/d(ln(r/rm)

edalphafloat

error in dalpha

ydalphafloat

y-intercept in fit to alpha vs ln(r/rm)

eydalphafloat

error in ydalpha

rbinerrorfloat

if mcorr is not None, output lowest corrected mass fraction at each radius

Other Parameters:
kwragsstr

key word arguments for plotting

clustertools.analysis.profiles.beta_prof(cluster, mmin=None, mmax=None, rmin=None, rmax=None, nrad=20, vmin=None, vmax=None, emin=None, emax=None, kwmin=0, kwmax=15, npop=None, indx=None, bins=None, projected=False, normalize=False, plot=False, **kwargs)[source]

Measure the anisotropy profile of the cluster

Parameters:
clusterclass

StarCluster

mmin/mmaxfloat

minimum and maximum stellar mass

rmin/rmaxfloat

minimum and maximum stellar radii

nradint

number of radial bins

vmin/vmaxfloat

minimum and maximum stellar velocity

emin/emaxfloat

minimum and maximum stellar energy

kwmin/kwmaxfloat

minimum and maximum stellar type (kw)

npopint

population number

indxfloat

user defined boolean array from which to extract the subset

binsfloat

User defined bins in the form of (rlower,rmean,rupper) (default: None)

projectedbool

use projected values and constraints (default:False)

normalizebool

normalize radial bins by cluster’s half-mass radius (default: False)

plotbool

plot the density profile (default: False)

Returns:
rprofnfloat

natural log of radius (normalized by half-mass radius)

betaproffloat

orbital anisotropy parameter beta

Other Parameters:
kwragsstr

key word arguments for plotting

clustertools.analysis.profiles.eta_prof(cluster, mmin=None, mmax=None, nmass=10, rmin=None, rmax=None, nrad=20, vmin=None, vmax=None, emin=None, emax=None, kwmin=0, kwmax=15, npop=None, indx=None, bins=None, projected=False, normalize=False, plot=False, meq=False, **kwargs)[source]

Measure the radial variation in eta

Parameters:
clusterclass

StarCluster

mmin/mmaxfloat

minimum and maximum stellar mass

nmassint

number of mass bins (default: 10)

rmin/rmaxfloat

minimum and maximum stellar radii

nradint

number of radial bins

vmin/vmaxfloat

minimum and maximum stellar velocity

emin/emaxfloat

minimum and maximum stellar energy

kwmin/kwmaxfloat

minimum and maximum stellar type (kw)

npopint

population number

indxfloat

user defined boolean array from which to extract the subset

binsfloat

User defined bins in the form of (rlower,rmean,rupper) (default: None)

projectedbool

use projected values and constraints (default:False)

normalizebool

normalize radial bins by cluster’s half-mass radius (default: True)

plotbool

plot the alpha profile (default: False)

Returns:
rprofnfloat

natural log of each radius bin (normalized by half-mass radius)

eproffloat

slope of the sigma_v-mass function

detafloat

radial variation in eta calculated as deta = d(eta)/d(ln(r/rm)

edetafloat

error in deta

ydetafloat

y-intercept in fit to eta vs ln(r/rm)

eydetafloat

error in ydeta

Other Parameters:
kwragsstr

key word arguments for plotting

clustertools.analysis.profiles.m_prof(cluster, mmin=None, mmax=None, rmin=None, rmax=None, nrad=20, vmin=None, vmax=None, emin=None, emax=None, kwmin=0, kwmax=15, npop=None, indx=None, bins=None, projected=False, normalize=False, cumulative=False, plot=False, **kwargs)[source]

Measure the mass profile of the cluster

Parameters:
clusterclass

StarCluster

mmin/mmaxfloat

minimum and maximum stellar mass

rmin/rmaxfloat

minimum and maximum stellar radii

nradint

number of radial bins

vmin/vmaxfloat

minimum and maximum stellar velocity

emin/emaxfloat

minimum and maximum stellar energy

kwmin/kwmaxfloat

minimum and maximum stellar type (kw)

npopint

population number

indxfloat

user defined boolean array from which to extract the subset

binsfloat

User defined bins in the form of (rlower,rmean,rupper) (default: None)

projectedbool

use projected values and constraints (default:False)

normalizebool

normalize radial bins by cluster’s half-mass radius (default: False)

cumalitivebool

determine the cumulative mass profile instead (default: False)

plotbool

plot the mass profile (default: False)

Returns:
rproffloat

radius bins

mproffloat

mass within radial bin (or enclosed mass if cumalitve==True)

nproffloat

number of stars in each bin

Other Parameters:
kwragsstr

key word arguments for plotting

clustertools.analysis.profiles.rho_prof(cluster, mmin=None, mmax=None, rmin=None, rmax=None, nrad=20, vmin=None, vmax=None, emin=None, emax=None, kwmin=0, kwmax=15, npop=None, indx=None, bins=None, projected=False, normalize=False, plot=False, **kwargs)[source]

Measure the density profile of the cluster

Parameters:
clusterclass

StarCluster

mmin/mmaxfloat

minimum and maximum stellar mass

rmin/rmaxfloat

minimum and maximum stellar radii

nradint

number of radial bins

vmin/vmaxfloat

minimum and maximum stellar velocity

emin/emaxfloat

minimum and maximum stellar energy

kwmin/kwmaxfloat

minimum and maximum stellar type (kw)

npopint

population number

indxfloat

user defined boolean array from which to extract the subset

binsfloat

User defined bins in the form of (rlower,rmean,rupper) (default: None)

projectedbool

use projected values and constraints (default:False)

normalizebool

normalize radial bins by cluster’s half-mass radius (default: False)

plotbool

plot the density profile (default: False)

Returns:
rproffloat

radius bins

pproffloat

mass density in each bin

nproffloat

number of stars in each bin

Other Parameters:
kwragsstr

key word arguments for plotting

clustertools.analysis.profiles.sigv_prof(cluster, mmin=None, mmax=None, rmin=None, rmax=None, nrad=20, vmin=None, vmax=None, emin=None, emax=None, kwmin=0, kwmax=15, npop=None, indx=None, bins=None, projected=False, coord=None, normalize=False, plot=False, **kwargs)[source]

Measure the radial variation in the velocity dispersion

Parameters:
clusterclass

StarCluster

mmin/mmaxfloat

minimum and maximum stellar mass

rmin/rmaxfloat

minimum and maximum stellar radii

nradint

number of radial bins

vmin/vmaxfloat

minimum and maximum stellar velocity

emin/emaxfloat

minimum and maximum stellar energy

kwmin/kwmaxfloat

minimum and maximum stellar type (kw)

npopint

population number

indxfloat

user defined boolean array from which to extract the subset

binsfloat

User defined bins in the form of (rlower,rmean,rupper) (default: None)

projectedbool

use projected values and constraints (default:False)

coordstr

choose what coordinate the velocity dispersion profile is to be returned in (default None returns (sigx**2.+sigy**2.+sigz**2.)^1/2). Alternatively can ask for ‘r’, ‘phi’, or ‘theta’ for spherical coordinate velocity dispersions.

normalizebool

normalize radial bins by cluster’s half-mass radius (default: False)

plotbool

plot the velocity disperions profile (default: False)

Returns:
rprofnfloat

natural log of radius (normalized by half-mass radius)

sigvproffloat

velocity dispersion

Other Parameters:
kwragsstr

key word arguments for plotting

clustertools.analysis.profiles.v2_prof(cluster, mmin=None, mmax=None, rmin=None, rmax=None, nrad=20, vmin=None, vmax=None, emin=None, emax=None, kwmin=0, kwmax=15, npop=None, indx=None, bins=None, projected=False, coord=None, normalize=False, plot=False, **kwargs)[source]

Measure the radial variation in the mean squared velocity

Parameters:
clusterclass

StarCluster

mmin/mmaxfloat

minimum and maximum stellar mass

rmin/rmaxfloat

minimum and maximum stellar radii

nradint

number of radial bins

vmin/vmaxfloat

minimum and maximum stellar velocity

emin/emaxfloat

minimum and maximum stellar energy

kwmin/kwmaxfloat

minimum and maximum stellar type (kw)

npopint

population number

indxfloat

user defined boolean array from which to extract the subset

binsfloat

User defined bins in the form of (rlower,rmean,rupper) (default: None)

projectedbool

use projected values and constraints (default:False)

coordstr

choose what coordinate the mean velocity profile is to be returned in (default None returns (vx**2.+vy**2.+vz**2.)^1/2). Alternatively can ask for ‘vr’, ‘vphi’, or ‘vtheta’ for spherical coordinate velocity dispersions.

normalizebool

normalize radial bins by cluster’s half-mass radius (default: False)

plotbool

plot the velocity disperions profile (default: False)

Returns:
rprofnfloat

natural log of radius (normalized by half-mass radius)

vproffloat

mean velocity

Other Parameters:
kwragsstr

key word arguments for plotting

clustertools.analysis.profiles.v_prof(cluster, mmin=None, mmax=None, rmin=None, rmax=None, nrad=20, vmin=None, vmax=None, emin=None, emax=None, kwmin=0, kwmax=15, npop=None, indx=None, bins=None, projected=False, coord=None, normalize=False, plot=False, **kwargs)[source]

Measure the radial variation in the mean velocity

Parameters:
clusterclass

StarCluster

mmin/mmaxfloat

minimum and maximum stellar mass

rmin/rmaxfloat

minimum and maximum stellar radii

nradint

number of radial bins

vmin/vmaxfloat

minimum and maximum stellar velocity

emin/emaxfloat

minimum and maximum stellar energy

kwmin/kwmaxfloat

minimum and maximum stellar type (kw)

npopint

population number

indxfloat

user defined boolean array from which to extract the subset

binsfloat

User defined bins in the form of (rlower,rmean,rupper) (default: None)

projectedbool

use projected values and constraints (default:False)

coordstr

choose what coordinate the mean velocity profile is to be returned in (default None returns (vx**2.+vy**2.+vz**2.)^1/2). Alternatively can ask for ‘vr’, ‘vphi’, or ‘vtheta’ for spherical coordinate velocity dispersions.

normalizebool

normalize radial bins by cluster’s half-mass radius (default: False)

plotbool

plot the velocity disperions profile (default: False)

Returns:
rprofnfloat

natural log of radius (normalized by half-mass radius)

vproffloat

mean velocity

Other Parameters:
kwragsstr

key word arguments for plotting

clustertools.analysis.profiles.vcirc_prof(cluster, mmin=None, mmax=None, rmin=None, rmax=None, nrad=20, vmin=None, vmax=None, emin=None, emax=None, kwmin=0, kwmax=15, npop=None, indx=None, bins=None, projected=False, normalize=False, plot=False, **kwargs)[source]

NAME:

vcirc_prof

PURPOSE:

Measure the circulr velocity profile of the cluster

Parameters:
clusterclass

StarCluster

mmin/mmaxfloat

minimum and maximum stellar mass

nmassint

number of mass bins (default: 10)

rmin/rmaxfloat

minimum and maximum stellar radii

nradint

number of radial bins

vmin/vmaxfloat

minimum and maximum stellar velocity

emin/emaxfloat

minimum and maximum stellar energy

kwmin/kwmaxfloat

minimum and maximum stellar type (kw)

npopint

population number

indxfloat

user defined boolean array from which to extract the subset

binsfloat

User defined bins in the form of (rlower,rmean,rupper) (default: None)

projectedbool

use projected values and constraints (default:False)

normalizebool

normalize radial bins by cluster’s half-mass radius (default: False)

plotbool

plot the alpha profile (default: False)

Returns:
rproffloat

radius bins

vproffloat

circular velocity

rvmaxfloat

radius of maximum circular velocity

vmaxfloat

maximum circular velocity

Other Parameters:
kwragsstr

key word arguments for plotting