Skip to content

Commit

Permalink
Testing for successfully compiled code, bug fixed with logBeta_tab
Browse files Browse the repository at this point in the history
* Beta was accidentally being populated by Alpha values. Fixed in hyrec/hydrogen.c/interpolate_rates
* Renamed files from RR to R to be compatible with previous naming convention.
* Producing test_xe.dat to check that the recombination history is sensible.
  • Loading branch information
Hongwan Liu committed Sep 26, 2019
1 parent fe5301b commit e395201
Show file tree
Hide file tree
Showing 6 changed files with 108,525 additions and 114 deletions.
File renamed without changes.
File renamed without changes.
8 changes: 4 additions & 4 deletions hyrec/hydrogen.c
Original file line number Diff line number Diff line change
Expand Up @@ -204,10 +204,10 @@ void interpolate_rates(double Alpha[2], double Beta[2], double *R2p2s, double *R
+ rate_table->logAlpha_tab[l][iTR+2]*coeff2[3]
);
Beta[l] = exp(
rate_table->logAlpha_tab[l][iTR-1]*coeff2[0]
+ rate_table->logAlpha_tab[l][iTR]*coeff2[1]
+ rate_table->logAlpha_tab[l][iTR+1]*coeff2[2]
+ rate_table->logAlpha_tab[l][iTR+2]*coeff2[3]
rate_table->logBeta_tab[l][iTR-1]*coeff2[0]
+ rate_table->logBeta_tab[l][iTR]*coeff2[1]
+ rate_table->logBeta_tab[l][iTR+1]*coeff2[2]
+ rate_table->logBeta_tab[l][iTR+2]*coeff2[3]
);
}

Expand Down
136 changes: 26 additions & 110 deletions notebooks/recfast_fudge.ipynb

Large diffs are not rendered by default.

Loading

0 comments on commit e395201

Please sign in to comment.