LinearVelocityField#
- class agabpylib.simulation.starclusters.kinematics.LinearVelocityField(v, s, omega, kappa)#
Bases:
Kinematics
General linear velocity field for the cluster stars which besides the mean cluster velocity can include a rotation and isotropic expansion/contraction term, both defined with respect to the cluster centre. The velocities are generated according to equations (3) and (4) in Lindegren et al (2000, https://ui.adsabs.harvard.edu/abs/2000A%26A…356.1119L/abstract), where the “dilation” terms are not used.
Specifically the dilation terms \(w_1, w_2, w_3\) are set to zero, while the diagonal terms of the matrix \(T\) are set equal to the expansion rate \(\kappa\) (i.e., \(w_4=w_5=T_{zz}=\kappa\)).
- v#
Mean cluster velocity [v_x, v_y, v_z] km/s.
- Type:
astropy.units.Quantity 3-vector
- s#
Cluster velocity dispersion [s_x. s_y, s_z] in km/s.
- Type:
astropy.units.Quantity 3-vector
- omega#
Angular speed of the cluster [omega_x, omega_y, omega_z] in km/s/pc
- Type:
astropy.units.Quantity 3-vector
- kappa#
Cluster expansion/contraction rate in km/s/pc
- Type:
astropy.units.Quantity
- tmat#
The matrix describing the linear velocity field of the cluster with respect to the cluster barycentre.
- Type:
astropy.units.Quantity 3x3 matrix
Methods Summary
addinfo
()- returns:
info -- String with specific information about the cluster kinematics.
generate_kinematics
(x, y, z, rng)Generate the velocity vectors of the stars randomly according to the prescribed kinematics of the cluster.
getmeta
()- returns:
meta -- Metadata on the kinematics of the cluster stars.
Methods Documentation
- addinfo()#
- Returns:
info – String with specific information about the cluster kinematics.
- Return type:
str
- generate_kinematics(x, y, z, rng)#
Generate the velocity vectors of the stars randomly according to the prescribed kinematics of the cluster.
- Parameters:
x (astropy.units.Quantity arrays) – The x, y, z positions of the stars with respect to the barycentre, in units of pc, where the barycentre of the cluster is assumed to be at (0, 0, 0) pc!
y (astropy.units.Quantity arrays) – The x, y, z positions of the stars with respect to the barycentre, in units of pc, where the barycentre of the cluster is assumed to be at (0, 0, 0) pc!
z (astropy.units.Quantity arrays) – The x, y, z positions of the stars with respect to the barycentre, in units of pc, where the barycentre of the cluster is assumed to be at (0, 0, 0) pc!
rng (numpy.random.Generator) – Random number generator. This is provided separately to enable user control over the random number sequence.
- Returns:
v_x, v_y, v_z – The v_x, v_y, v_z velocity components of the stars in units of km/s.
- Return type:
astropy.units.Quantity arrays
- getmeta()#
- Returns:
meta – Metadata on the kinematics of the cluster stars.
- Return type:
dict