From fd2d4f09942e1417ce0dbb3e15ae81e822b10d78 Mon Sep 17 00:00:00 2001 From: jaehongpark00 Date: Fri, 18 Oct 2019 12:09:29 +0200 Subject: [PATCH] Fixed the 2LPT bug (#20) * bug fixed * Improved stability of 'tauX' and 'Mass_limit' calculation * Conflict fixed * (1) Added function to compute the volume filling factor Q, (2) Added python script to generate a summary plot which are a lightcone slice, the brightness temperature and the power spectrum at k=0.1Mpc^-1 (3) Improved stability of 'tauX' and 'Mass_limit' calculation and (4) Updated Out-of-box-Output * Updated 'HII_ROUND_ERR' to avoid discontinuous of the redshift evolution in PS * Replaced the function 'Mass_limit_bisection' with a simple analytic form, and fixed the interpolation in high density region for the SFRD calculation. * Fixed bug when using 'SUBCELL_RSD' without 'USE_TS_IN_21CM' in delta_T.c. * Updated to support 'USE_HALO_FIELD' when using the new parametrization. * Fixed 2LPT bug * Fixed 2LPT bug --- Programs/init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Programs/init.c b/Programs/init.c index ee6252f..fe02e86 100755 --- a/Programs/init.c +++ b/Programs/init.c @@ -634,7 +634,6 @@ int main(int argc, char ** argv){ *((float *)box + R_FFT_INDEX((unsigned long long)(i),(unsigned long long)(j),(unsigned long long)(k)) ) -= ( *((float *)(phi_1[PHI_INDEX(l, m)]) + R_FFT_INDEX((unsigned long long)(i),(unsigned long long) (j),(unsigned long long)(k) ) ) ) * ( *((float *)(phi_1[PHI_INDEX(l, m)]) + R_FFT_INDEX((unsigned long long)(i),(unsigned long long)(j),(unsigned long long)(k) )) ); //box[R_FFT_INDEX(i,j,k)] -= phi_1[PHI_INDEX(l, m)][R_FFT_INDEX(i,j,k)] * phi_1[PHI_INDEX(l, m)][R_FFT_INDEX(i,j,k)]; //fprintf(stderr, "%.2e ", *((float *)box + R_FFT_INDEX((unsigned long long)(i),(unsigned long long)(j),(unsigned long long)(k)) ) ); - *((float *)box + R_FFT_INDEX((unsigned long long)(i),(unsigned long long)(j),(unsigned long long)(k)) ) /= TOT_NUM_PIXELS; // smoothed_box[HII_R_INDEX(i,j,k)] = // *((float *)box + R_FFT_INDEX((unsigned long long)(i*f_pixel_factor+0.5), @@ -643,6 +642,7 @@ int main(int argc, char ** argv){ } } //fprintf(stderr, "\n"); + *((float *)box + R_FFT_INDEX((unsigned long long)(i),(unsigned long long)(j),(unsigned long long)(k)) ) /= TOT_NUM_PIXELS; } } }