synthpop.modules.kinematics.besancon2003 ======================================== .. py:module:: synthpop.modules.kinematics.besancon2003 .. autoapi-nested-parse:: Kinematic module from the Besancon Model, as described by Robin et al. (2003), with the rotation curve as tabulated in the Galaxia code data files (Sharma et al., 2011). The module can be adapted for all of the populations, based on assigning the appropriate keyword arguments for velocity dispersions, velocity dispersion gradients, and asymmetric drift handling. Classes ------- .. autoapisummary:: synthpop.modules.kinematics.besancon2003.Besancon2003 Module Contents --------------- .. py:class:: Besancon2003(sigma_u: float, sigma_v: float, sigma_w: float, disp_grad: float = 0, do_V_ad=True, const_V_ad=None, **kwargs) Bases: :py:obj:`synthpop.modules.kinematics._kinematics.Kinematics` Kinematic module for the Robin et al. (2003) Besancon Model. Attributes ---------- sigma_u : float velocity dispersion in x direction sigma_v : float velocity dispersion in y direction sigma_w : float velocity dispersion in z direction disp_grad : float velocity dispersion gradient (dln(sigma_u^2)/dR) do_V_ad : boolean if True, calculate assymmetric drift via the equation in Robin+2003 const_V_ad : float if provided, this will be used as a constant asymmetric drift value 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:: kinematics_func_name :value: 'Besancon2003' .. py:attribute:: sigma_u .. py:attribute:: sigma_v .. py:attribute:: sigma_w .. py:attribute:: disp_grad :value: 0 .. py:attribute:: do_V_ad :value: True .. py:attribute:: const_V_ad :value: None .. py:attribute:: grid_r .. py:attribute:: grid_vcirc .. py:attribute:: interp_vcirc .. py:method:: draw_random_velocity(x: np.ndarray or float, y: np.ndarray or float, z: np.ndarray or float, **kwargs) -> Tuple[numpy.ndarray, numpy.ndarray, numpy.ndarray] Generate a random velocities u,v,w by using a velocity dispersion Parameters ---------- x, y, z : nparray, float [kpc] galactocentric coordinates Returns ------- u, v, w : ndarray [km/s] velocity in galactocentric x,y,and z direction. .. py:method:: mean_galactic_uvw(x: np.ndarray or float, y: np.ndarray or float, z: np.ndarray or float, **kwargs) -> Tuple[numpy.ndarray, numpy.ndarray, numpy.ndarray] Generate a random velocities u,v,w by using a velocity dispersion Parameters ---------- x, y, z : nparray, float [kpc] galactocentric coordinates Returns ------- u, v, w : ndarray [km/s] velocity in galactocentric x,y,and z direction.