Skip to content

Commit

Permalink
Updated scale dependence check when isitgr isn't called
Browse files Browse the repository at this point in the history
  • Loading branch information
sankarshana16 authored Nov 22, 2024
1 parent 83821ca commit b91d688
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions pyccl/cosmology.py
Original file line number Diff line number Diff line change
Expand Up @@ -480,11 +480,21 @@ def _build_parameters(
c1_mg = self.mg_parametrization.c1_mg
c2_mg = self.mg_parametrization.c2_mg
lambda_mg = self.mg_parametrization.lambda_mg
gr_flag_scale_dep = 0.

if(c1_mg != 0. or c2_mg !=0. or lambda_mg != 0.):

if(c1_mg == 1. and c1_mg == 1.):

gr_flag_scale_dep = 1.

elif(c1_mg == 0. and c2_mg == 0. and lambda_mg == 0.):

gr_flag_scale_dep = 1.

if isinstance(self.mg_parametrization, modified_gravity.MuSigmaMG) and self.transfer_function_type is not 'boltzmann_isitgr':
raise ValueError("mu-Sigma parametrization is inconsistent with your transfer function choice (required to use isitgr)")
if(gr_flag_scale_dep == 0):

if isinstance(self.mg_parametrization, modified_gravity.MuSigmaMG) and self.transfer_function_type != 'boltzmann_isitgr':
raise ValueError("Your choice of c1_mg, c2_mg, and lambda_mg values is inconsistent with your transfer function choice (you must choose istigr).")

self._fill_params(
m_nu=nu_mass, sum_nu_masses=sum(nu_mass), N_nu_mass=N_nu_mass,
Expand Down

0 comments on commit b91d688

Please sign in to comment.