synthpop.modules.kinematics =========================== .. py:module:: synthpop.modules.kinematics Submodules ---------- .. toctree:: :maxdepth: 1 /autoapi/synthpop/modules/kinematics/_kinematics/index /autoapi/synthpop/modules/kinematics/besancon2003/index /autoapi/synthpop/modules/kinematics/kinematics_from_grid/index /autoapi/synthpop/modules/kinematics/koshimoto2021_bulge/index /autoapi/synthpop/modules/kinematics/koshimoto2021_disk/index /autoapi/synthpop/modules/kinematics/velocity_gradient/index Classes ------- .. autoapisummary:: synthpop.modules.kinematics.Kinematics Package Contents ---------------- .. py:class:: Kinematics(sun: types.ModuleType = None, coord_trans: types.ModuleType = None, density_class: types.ModuleType = None, logger: types.ModuleType = None, **kwargs) Bases: :py:obj:`abc.ABC` The 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_name : str 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. .. py:attribute:: logger :value: None .. py:attribute:: kinematics_func_name :value: 'None' .. py:attribute:: sun .. py:attribute:: coord_trans :value: None .. py:attribute:: density_class :value: None .. py:method:: 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] :abstractmethod: 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, z : nparray, float [kpc] galactocentric coordinates mass : ndarray, float , optional [Msun] mass of the stars. Has to be the same format and shape as x,y & z all_x, all_y, all_z : nparray, optional [kpc] galactocentric coordinates of all stars generated in all populations all_mass : nparray, optional [kpc] mass of all the generated stars. Has to have the same length as all_x all_density_classes : Tuple[Type] the population density class of all population see _population_density/_population_density for available functions. Returns ------- u, v, w : ndarray [km/s] velocity in galactocentric x,y,and z direction.