diff --git a/src/cosmology_calculator.hh b/src/cosmology_calculator.hh index f8d4241..1748430 100644 --- a/src/cosmology_calculator.hh +++ b/src/cosmology_calculator.hh @@ -183,10 +183,11 @@ public: transfer_function_ = select_transfer_function_plugin(cf, cosmo_param_); transfer_function_->intialise(); if( !transfer_function_->tf_isnormalised_ ){ - cosmo_param_.set("pnorm", this->compute_pnorm_from_sigma8() ); + cosmo_param_.set("pnorm", this->compute_pnorm_from_sigma8()*Dplus_start_*Dplus_start_ ); }else{ - cosmo_param_.set("pnorm", 1.0/Dplus_target_/Dplus_target_); - auto sigma8 = this->compute_sigma8(); + // WARNING: we do explicit back-scaling here, which is notably different from monofonIC + cosmo_param_.set("pnorm", Dplus_start_*Dplus_start_/Dplus_target_/Dplus_target_); + auto sigma8 = this->compute_sigma8()*Dplus_start_/Dplus_target_; music::ilog << "Measured sigma_8 for given PS normalisation is " << sigma8 << std::endl; } cosmo_param_.set("sqrtpnorm", std::sqrt(cosmo_param_["pnorm"])); diff --git a/src/main.cc b/src/main.cc index 45c2cc8..64d341e 100644 --- a/src/main.cc +++ b/src/main.cc @@ -485,9 +485,9 @@ int main(int argc, const char *argv[]) double cosmo_dplus = the_cosmo_calc->get_growth_factor(astart) / the_cosmo_calc->get_growth_factor(1.0); double cosmo_vfact = the_cosmo_calc->get_vfact(astart); - if (!the_cosmo_calc.get()->transfer_function_.get()->tf_has_total0()){ - the_cosmo_calc->cosmo_param_["pnorm"] *= cosmo_dplus * cosmo_dplus; - } + // if (!the_cosmo_calc.get()->transfer_function_.get()->tf_has_total0()){ + // the_cosmo_calc->cosmo_param_["pnorm"] *= cosmo_dplus * cosmo_dplus; + // } double cosmo_pnorm = the_cosmo_calc->cosmo_param_["pnorm"]; //... directly use the normalisation via a parameter rather than the calculated one cosmo_pnorm = cf.get_value_safe("setup", "force_pnorm", cosmo_pnorm);