synthpop.modules.kinematics.kinematics_from_grid ================================================ .. py:module:: synthpop.modules.kinematics.kinematics_from_grid .. autoapi-nested-parse:: Kinematic module that interpolates values from a grid Classes ------- .. autoapisummary:: synthpop.modules.kinematics.kinematics_from_grid.KinematicsFromGrid Module Contents --------------- .. py:class:: KinematicsFromGrid(moment_file=None, sun=None, **kwargs) Bases: :py:obj:`synthpop.modules.kinematics._kinematics.Kinematics` Grid interpolation kinematic module Attributes ---------- kinematics_func_name : str name of the Kinematics Class moment_file : str name of a file containing a grid of kinematic information required columns are: r, z, v_phi, sigma_phi, signa_r, sigma_z units must be kpc for distance, and km/s for velocity file must be whitespace delimited and have comments marked with '#' .. py:attribute:: interpolate_v_phi .. py:attribute:: interpolate_sigma_phi .. py:attribute:: interpolate_sigma_r .. py:attribute:: interpolate_sigma_z .. py:attribute:: kinematics_func_name :value: 'kinematics_from_grid' .. py:attribute:: sun .. 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.