Skip to content

Commit

Permalink
change delta limit, force QAG over GL at high delta
Browse files Browse the repository at this point in the history
  • Loading branch information
daviesje committed Mar 25, 2024
1 parent f64e489 commit 37fc87f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/py21cmfast/src/ps.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ static gsl_spline *erfc_spline;
#define Mhalo_min (double)(1e6)
#define Mhalo_max (double)(1e16)

#define MAX_DELTAC_FRAC (float)0.995 //max delta/deltac for the mass function integrals
#define MAX_DELTAC_FRAC (float)0.99 //max delta/deltac for the mass function integrals

bool initialised_ComputeLF = false;

Expand Down Expand Up @@ -1458,7 +1458,7 @@ double MFIntegral_Approx(double lnM_lo, double lnM_hi, struct parameters_gsl_MF_
}

double IntegratedNdM(double lnM_lo, double lnM_hi, struct parameters_gsl_MF_integrals params, int type, int method){
if(method==0)
if(method==0 || (method==1 && params.delta > global_params.CRIT_DENS_TRANSITION))
return IntegratedNdM_QAG(lnM_lo, lnM_hi, params, type);
if(method==1)
return IntegratedNdM_GL(lnM_lo, lnM_hi, params, type);
Expand Down

0 comments on commit 37fc87f

Please sign in to comment.