synthpop.modules.population_density.triaxial_bulge ================================================== .. py:module:: synthpop.modules.population_density.triaxial_bulge .. autoapi-nested-parse:: Bulge density models for all triaxial formulations from Dwek (1995). Classes ------- .. autoapisummary:: synthpop.modules.population_density.triaxial_bulge.TriaxialBulge Module Contents --------------- .. py:class:: TriaxialBulge(triaxial_type: str, density_unit: str, x0: float, y0: float, z0: float, rho0: float, Rmax=np.inf, bar_angle=29.4, **kwargs) Bases: :py:obj:`synthpop.modules.population_density._population_density.PopulationDensity` Bulge density models for all triaxial formulations from Dwek (1995). Attributes ---------- triaxial_type : str functional form as defined in Dwek (1995); available options are 'G1', 'G2', 'G3', 'E1', 'E2', 'E3', 'P1', 'P2', 'P3' density_unit: str options: 'mass' or 'number' x0, y0, z0 : float [kpc] semi major axes of the bulge rho0 : float [m_sun/kpc^3 or stars/kpc^3] central density, unit determined by density_unit Rmax : float [kpc] cutoff radius for bulge bar_angle : float [degrees] angle of the bar .. py:attribute:: population_density_name :value: 'Bulge_Density' .. py:attribute:: density_unit .. py:attribute:: x0 .. py:attribute:: y0 .. py:attribute:: z0 .. py:attribute:: rho0 .. py:attribute:: Rmax .. py:attribute:: bar_ang .. py:attribute:: rho_func .. py:method:: density(r: numpy.ndarray, phi_rad: numpy.ndarray, z: numpy.ndarray) -> numpy.ndarray Estimates the density at the given position Parameters ---------- r : ndarray ['kpc'] Distance to z axis phi_rad : ndarray ['rad'] azimuth angle of the stars. phi_rad = 0 is pointing towards sun. z : height above the galactic plane (corrected for warp of the galaxy) Returns ------- rho : ndarray [M_sun/kpc^3 or #/kpc^3] density at the given location, either in number density evolved mass density or initial mass density should be specified in density_unit.