synthpop.modules.population_density.besancon2003_halo ===================================================== .. py:module:: synthpop.modules.population_density.besancon2003_halo .. autoapi-nested-parse:: Subclass for a spheroidal density distribution, used e.g. for the Halo in the Besancon Model (Robin et al., 2003). Classes ------- .. autoapisummary:: synthpop.modules.population_density.besancon2003_halo.Besancon2003Halo Module Contents --------------- .. py:class:: Besancon2003Halo(p0=9320.0, e=0.76, ac=0.5, power=-2.44, **kwargs) Bases: :py:obj:`synthpop.modules.population_density._population_density.PopulationDensity` Spheroidal density profile: the density is constant within a radius of ac, and then drops using a power law Attributes ---------- p0: density at the position of the sun e : float Flattening ratio between x (or y) and z axis ac: float Radius until the spheroid has a constant density power: float Slope of the decay. Should be less than 0 .. py:attribute:: population_density_name :value: 'Spheroid' .. py:attribute:: density_unit :value: 'mass' .. py:attribute:: p0 :value: 9320.0 .. py:attribute:: e :value: 0.76 .. py:attribute:: ac :value: 0.5 .. py:attribute:: power :value: -2.44 .. 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.