21cmfast / 21cmFAST

Official repository for 21cmFAST: a code for generating fast simulations of the cosmological 21cm signal
MIT License
58 stars 38 forks source link

ring sturcture shows up in large-volume simulations #194

Closed qyx268 closed 3 years ago

qyx268 commented 3 years ago

Describe the bug:

When we have large-volume simulations, we get ring structures on scales of Gpc, in particularly in the photoionization rate box. I'm thinking if this is due to the

image

To Reproduce: You just need a large-volume simulation... You can reproduce with this script. run.txt

Expected behavior:

Details:

Additional context

Has anyone had large-volume simulations performed with the old 21cmfast or 21CMMC driver? It will be helpful to see if this is a new thing in v3 or it has always been there but missed.

qyx268 commented 3 years ago

fixed... and you guys won't believe what the problem is.

ZSTEP = prev_redshift - redshift; this line is wrong for the first snapshot where we set prev_redshift=0... It is usually fine for cosmic dawn simulations where we start from higher redshifts and reionization doesn't start in the first snapshot. In this case, ZSTEP is not used to calculate Nrec. However, for these EoR simulations where I start from z=15... we will have negative ZSTEP for the first redshift. This gives those negative Nrec which propagates towards low-z and results in the anomaly (and possibly the ring structure).

image

For v2, this is not an issue because drive_logZscroll_Ts always passes a previous redshift to find_HII_bubbles...

To fix it, I will set ZSTEP=0.2 when prev_redshift<0 (i.e. first snapshot)... I tested using USE_MASS_DEPENDENT_ZETA = False, USE_INTERPOLATION_TABLES=False, PERTURB_ON_HIGH_RES=False, USE_FFTW_WISDOM=False and it worked. I will test with these flags on and with higher cadence.

andreimesinger commented 3 years ago

👌💪

On 09.02.2021., at 12:14, Yuxiang Qin notifications@github.com wrote:

 fixed... and you guys won't believe what the problem is.

ZSTEP = prev_redshift - redshift; this line is wrong for the first snapshot where we set prev_redshift=0... It is usually fine for cosmic dawn simulations where we start from higher redshifts and reionization doesn't start in the first snapshot. In this case, ZSTEP is not used to calculate Nrec. However, for these EoR simulations where I start from z=15... we will have negative ZSTEP for the first redshift. This gives those negative Nrec which propagates towards low-z and results in the anomaly (and possibly the ring structure).

For v2, this is not an issue because drive_logZscroll_Ts always passes a previous redshift to find_HII_bubbles...

To fix it, I will set ZSTEP=0.2 when prev_redshift<0 (i.e. first snapshot)... I tested using USE_MASS_DEPENDENT_ZETA = False, USE_INTERPOLATION_TABLES=False, PERTURB_ON_HIGH_RES=False, USE_FFTW_WISDOM=False and it worked. I will test with these flags on and with higher cadence.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

steven-murray commented 3 years ago

Nice!

BradGreig commented 3 years ago

Great work @qyx268!

qyx268 commented 3 years ago

the results look fine now. For the record, here are the updated LCs and Slides at z=4.9 image

image

andreimesinger commented 3 years ago

awesome! i never get tired of looking at these plots the large density field is especially gorgeous!

On 05.02.2021, at 13:46, Yuxiang Qin notifications@github.com wrote:

the results look fine now. For the record, here are the updated LCs and Slides at z=4.9 https://user-images.githubusercontent.com/15994713/108595778-bb262680-73d5-11eb-912a-e37e39694aef.png https://user-images.githubusercontent.com/15994713/108595785-c2e5cb00-73d5-11eb-91bc-8f814689fcc3.png — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/21cmfast/21cmFAST/issues/194#issuecomment-782635778, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADH2UATBZIOBGN2UMWAQHZTS76VLPANCNFSM4UMM4GLA.

qyx268 commented 3 years ago

Screenshot from 2021-02-21 00-03-22

probably need the higher-res run for my new screen... then I might be willing to give up the fossa :)