CLUMPY  Version 2011.09_corr2
double rho_EINASTO_N ( double &  r,
double  par[3] 
)

Definition at line 154 of file profiles.cc.

{
   //--- Returns rho(r) for Einasto r^{1/n} profile (Merritt et al. 2006) [Msol/kpc^3]
   //  r         Distance from the centre of the profile [kpc]
   //  par[0]    rho_e: density normalisation [Msol/kpc^3]
   //  par[1]    r_e: radius containing half the mass of the halo (replaces rs for this profile) [kpc]
   //  par[2]    n: integer index of the profile (shape parameter)
   //
   //    => rho(r)= rho_e * exp{-dn [(r/r_e)^{1/n} - 1] }



   if (par[2] < 0.5) {
      cout << "WARNING in rho_EINASTO_N: n < 0.5 not authorised in CLUMPY" << endl;
      abort();
   }
   double dn = 3.*par[2] - 0.3333333333 + 0.0079 / par[2];

   double res = par[0] * exp(-dn * (pow((r / par[1]), (1. / par[2])) - 1.));
   if (res < gDM_RHOSAT)
      return res;
   else
      return gDM_RHOSAT;
}
 All Classes Files Functions Variables Enumerations Enumerator Defines