1
0
Fork 0
mirror of https://github.com/cosmo-sims/MUSIC.git synced 2024-09-19 17:03:46 +02:00

added output of 0 for delta_bc and theta_bc

This commit is contained in:
Oliver Hahn 2023-02-15 09:55:02 -08:00
parent b0f9afab25
commit c010a5eecc

View file

@ -213,6 +213,7 @@ public:
//! Computes the transfer function for k in Mpc/h by calling TFfit_onek
inline double compute(double k, tf_type type) const
{
if( type == theta_bc || type == delta_bc ) return 0.0;
return etf_.at_k(k);
}
@ -305,6 +306,7 @@ public:
inline double compute(double k, tf_type type) const
{
if( type == theta_bc || type == delta_bc ) return 0.0;
return etf_.at_k(k) * pow(1.0 + pow(m_WDMalpha * k, 2.0 * wdmnu_), -5.0 / wdmnu_);
}
@ -354,6 +356,8 @@ public:
double kkfs2 = kkfs * kkfs;
double kkd2 = (k / kd_) * (k / kd_);
if( type == theta_bc || type == delta_bc ) return 0.0;
// in principle the Green et al. (2004) works only up to k/k_fs < 1
// the fit crosses zero at (k/k_fs)**2 = 3/2, we just zero it there...
if (kkfs2 < 1.5)