Commit 97de0782 authored by lesgourg's avatar lesgourg
Browse files

few extra comkments to Pcb part

parent a3907e03
......@@ -47,7 +47,7 @@ struct nonlinear {
double ** nl_corr_density; /**< nl_corr_density[index_pk][index_tau * ppt->k_size + index_k] */
double ** k_nl; /**< wavenumber at which non-linear corrections become important, defined differently by different non_linear_method's */
int index_tau_min_nl; /**< index of smallest value of tau at which nonlinear corrections have been computed (so, for tau<tau_min_nl, the array nl_corr_density only contains some factors 1 */
//int index_tau_min_nl_cb;
//@}
/** @name - parameters for the pk_eq method */
......
......@@ -185,7 +185,7 @@ struct spectra {
double sigma8; /**< sigma8 parameter */
double sigma8_cb;
double sigma8_cb; /**< if ncdm present: contribution to sigma8 from only baryons and cdm */
double * ln_pk_l; /**q< Total linear matter power spectrum, just
depending on indices index_k, index_tau as:
......@@ -217,12 +217,12 @@ struct spectra {
*/
double * ddln_pk_nl; /**< second derivative of above array with respect to log(tau), for spline interpolation. */
double * ln_pk_cb;
double * ddln_pk_cb;
double * ln_pk_cb_l;
double * ddln_pk_cb_l;
double * ln_pk_cb_nl;
double * ddln_pk_cb_nl;
double * ln_pk_cb; /**< same as ln_pk_l for baryon+cdm component only */
double * ddln_pk_cb; /**< same as ddln_pk_cb for baryon+cdm component only */
double * ln_pk_cb_l; /**< same as ln_pk_cb_l for baryon+cdm component only */
double * ddln_pk_cb_l; /**< same as ddln_pk_cb_l for baryon+cdm component only */
double * ln_pk_cb_nl; /**< same as ln_pk_cb_nl for baryon+cdm component only */
double * ddln_pk_cb_nl; /**< same as ddln_pk_cb_nl for baryon+cdm component only */
int index_tr_delta_g; /**< index of gamma density transfer function */
int index_tr_delta_b; /**< index of baryon density transfer function */
......@@ -474,7 +474,7 @@ extern "C" {
double * zvec,
int zvec_size,
double * pk_tot_out, /* (must be already allocated with kvec_size*zvec_size) */
double * pk_cb_tot_out,
double * pk_cb_tot_out,
int nonlinear);
#ifdef __cplusplus
......
......@@ -968,6 +968,9 @@ cdef class Class:
def Omega_m(self):
return self.ba.Omega0_b+self.ba.Omega0_cdm+self.ba.Omega0_ncdm_tot + self.ba.Omega0_dcdm
# This is commented because in the current form it only applies
# to minimal LambdaCDM.
# On would need to add contributions from ncdm, ddmdr, etc.
#def Omega_r(self):
# return self.ba.Omega0_g+self.ba.Omega0_ur
......
......@@ -718,7 +718,10 @@ int perturb_indices_of_perturbs(
if (ppt->has_nc_rsd == _TRUE_) {
ppt->has_source_theta_m = _TRUE_;
if (pba->has_ncdm == _TRUE_)
ppt->has_source_theta_cb = _TRUE_; //probably we do not need theta_cb at all, rsd always defined for the total matter
/* we may not need theta_cb at all, rsd always defined for
the total matter, but at least this is made
available */
ppt->has_source_theta_cb = _TRUE_;
}
if (ppt->has_nc_lens == _TRUE_) {
ppt->has_source_phi_plus_psi = _TRUE_;
......@@ -5647,8 +5650,8 @@ int perturb_total_stress_energy(
rho_m += ppw->pvecback[pba->index_bg_rho_dcdm];
}
/* infer delta_cb */
if (ppt->has_source_delta_cb)
/* infer delta_cb */
if (ppt->has_source_delta_cb)
ppw->delta_cb = delta_rho_m/rho_m;
/* include any other species non-relativistic today (like ncdm species) */
......@@ -6126,7 +6129,6 @@ int perturb_sources(
_set_source_(ppt->index_tp_delta_cb) = ppw->delta_cb;
}
/* delta_g */
if (ppt->has_source_delta_g == _TRUE_) {
_set_source_(ppt->index_tp_delta_g) = delta_g;
......
......@@ -1345,7 +1345,8 @@ int transfer_get_source_correspondence(
tp_of_tt[index_md][index_tt]=ppt->index_tp_phi_plus_psi;
if (_index_tt_in_range_(ptr->index_tt_density, ppt->selection_num, ppt->has_nc_density))
tp_of_tt[index_md][index_tt]=ppt->index_tp_delta_m;//use delta_cb if density number counts calculated only for codl dark matter + baryon
/* use delta_cb if density number counts calculated only for cold dark matter + baryon */
tp_of_tt[index_md][index_tt]=ppt->index_tp_delta_m;
if (_index_tt_in_range_(ptr->index_tt_rsd, ppt->selection_num, ppt->has_nc_rsd))
tp_of_tt[index_md][index_tt]=ppt->index_tp_theta_m;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment