diff --git a/src/cosmopower.cpp b/src/cosmopower.cpp index 5e58c2c..6108b8c 100644 --- a/src/cosmopower.cpp +++ b/src/cosmopower.cpp @@ -212,6 +212,26 @@ double CosmoPower::powerHuWiggles(double k) return normPower * pow(k,n) * T_k * T_k; } +double CosmoPower::sample_BAO(double k) +{ + // BAO wiggle parameterization for reconstruction + // Babic et al. 2022, https://arxiv.org/abs/2203.06177 + + // No-wiggle transfer function + + double ps_no_wiggle = powerHuBaryons(k); + + // Wiggle parameterization + + double A = 0; + double r_s = 10; + double k_D = 2 * M_PI / 100; + + double param = 1 + A * sin(k * r_s) * exp(- k / k_D); + + return ps_no_wiggle * param; + } + double CosmoPower::primordialPowerSpectrum(double k) { //Primordial power spectrum, needed for PNG @@ -444,6 +464,9 @@ void CosmoPower::setFunction(CosmoFunction f) case POWER_SUGIYAMA: eval = &CosmoPower::powerSugiyama; break; + case SAMPLE_WIGGLES: + eval = &CosmoPower::sample_BAO; + break; case POWER_BDM: eval = &CosmoPower::powerBDM; break; diff --git a/src/cosmopower.hpp b/src/cosmopower.hpp index ba0bffc..7b02f5f 100644 --- a/src/cosmopower.hpp +++ b/src/cosmopower.hpp @@ -89,7 +89,8 @@ namespace CosmoTool { POWER_SUGIYAMA, POWER_BDM, POWER_TEST, - HU_WIGGLES_ORIGINAL + HU_WIGGLES_ORIGINAL, + SAMPLE_WIGGLES }; CosmoPower(); @@ -122,6 +123,7 @@ namespace CosmoTool { double powerBDM(double k); double powerTest(double k); double powerHuWigglesOriginal(double k); + double sample_BAO(double k); }; };