synthpop.modules.kinematics._kinematics
This file contains the base class for the velocity distributions.
Classes
The Kinematics base class for a Population class. The appropriate subclass is |
Module Contents
- class synthpop.modules.kinematics._kinematics.Kinematics(sun: types.ModuleType = None, coord_trans: types.ModuleType = None, density_class: types.ModuleType = None, logger: types.ModuleType = None, **kwargs)
Bases:
abc.ABCThe Kinematics base class for a Population class. The appropriate subclass is assigned based on the kinematics_func_kwargs through the “get_subclass” factory.
Attributes
- kinematics_func_namestr
name of the Kinematics Class
(more attributes are specified in the subclasses)
Methods
- __init__(self, Population)None
initialize the Kinematics class
- draw_random_velocity(self, x: ndarray, y: ndarray, z: ndarray, mass: ndarray = None,
all_x: ndarray = None, all_y: ndarray = None, all_z: ndarray = None, all_mass: ndarray = None ) : ndarray [km/s]
returns a random velocity of a star in km/s.
- logger = None
- kinematics_func_name = 'None'
- sun = None
- coord_trans = None
- density_class = None
- abstract draw_random_velocity(x: np.ndarray or float, y: np.ndarray or float, z: np.ndarray or float, mass: np.ndarray or float = None, all_x: np.ndarray or float = None, all_y: np.ndarray or float = None, all_z: np.ndarray or float = None, all_mass: np.ndarray or float = None, all_density_classes: Tuple[Type] = None, **kwargs) Tuple[np.ndarray, np.ndarray, np.ndarray] or Tuple[float, float, float]
Generate a random velocities u,v,w by using a velocity dispersion arguments starting with ‘all_’ are only provided if the “kinematics_at_the_end” keyword in the configuration is set to True
Parameters
- x, y, znparray, float [kpc]
galactocentric coordinates
- massndarray, float , optional [Msun]
mass of the stars. Has to be the same format and shape as x,y & z
- all_x, all_y, all_znparray, optional [kpc]
galactocentric coordinates of all stars generated in all populations
- all_massnparray, optional [kpc]
mass of all the generated stars. Has to have the same length as all_x
- all_density_classesTuple[Type]
the population density class of all population see _population_density/_population_density for available functions.
Returns
- u, v, wndarray [km/s]
velocity in galactocentric x,y,and z direction.