From 92524a211e21e2e34caf43c6a6977325136803e9 Mon Sep 17 00:00:00 2001 From: Oliver Hahn Date: Mon, 19 Oct 2015 15:35:35 +0200 Subject: [PATCH] minor fixes to constraints (experimental feature, still not documented) --- constraints.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/constraints.cc b/constraints.cc index c12f06d..58f93bd 100644 --- a/constraints.cc +++ b/constraints.cc @@ -170,6 +170,7 @@ constraint_set::constraint_set( config_file& cf, transfer_function *ptf ) unsigned i=0; + double astart = 1.0/(1.0+pcf_->getValue("setup","zstart")); unsigned levelmin = pcf_->getValue("setup","levelmin"); unsigned levelmin_TF = pcf_->getValueSafe("setup","levelmin_TF",levelmin); constr_level_ = pcf_->getValueSafe("constraints","level",levelmin_TF); @@ -177,7 +178,7 @@ constraint_set::constraint_set( config_file& cf, transfer_function *ptf ) constr_level_ = std::max(constr_level_,levelmin_TF); double omegam = pcf_->getValue("cosmology","Omega_m"); - double rhom = omegam*2.77519737e11; //... mean matter density + double rhom = omegam*2.77519737e11; //... mean matter density in Msun/Mpc^3 //... use EdS density for estimation //double rhom = 2.77519737e11; @@ -218,7 +219,8 @@ constraint_set::constraint_set( config_file& cf, transfer_function *ptf ) new_c.Rg = pow((mass/pow(2.*M_PI,1.5)/rhom),1./3.); new_c.sigma = 1.686/(pccalc_->CalcGrowthFactor(1./(1.+zcoll))/pccalc_->CalcGrowthFactor(1.0)); - + LOGINFO("sigma of constraint : %g", new_c.sigma ); + new_c.sigma *=pccalc_->CalcGrowthFactor(astart)/pccalc_->CalcGrowthFactor(1.0); LOGINFO("Constraint %d : halo with %g h-1 M_o",i,pow(2.*M_PI,1.5)*rhom*pow(new_c.Rg,3)); } else if( new_c.type == peak )