Fix ccl_nonlin_matter_power to call ccl_linear_matter_power if the user specified the linear PS
@@ -671,6 +671,13 @@ TASK: compute the nonlinear power spectrum at a given redshift
double ccl_nonlin_matter_power(ccl_cosmology * cosmo, double a, double k){
+ //If the matter PS specified was linear, then do the linear compuation
+ if(cosmo->config.matter_power_spectrum_method==0){
+
+ return ccl_linear_matter_power(cosmo,a,k);
+
+ } else { //if not, do the nonlin computation
+
ccl_cosmology_compute_power(cosmo);
double log_p_1;
@@ -735,6 +742,8 @@ double ccl_nonlin_matter_power(ccl_cosmology * cosmo, double a, double k){
double p_1 = exp(log_p_1);
return p_1;
+
+ }
}
