21cmfast / 21cmFAST

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

[POTENTIAL BUG] Why do we need an rtol of 1e-4 when comparing run_coeval with spin_temp? #308

Open steven-murray opened 1 year ago

steven-murray commented 1 year ago

The new fix for cloud-in-cell in #303 required changing the rtol in the spin_temp consistency test to 1e-4. Nominally, this should be machine-precision, though it's probably some rounding errors that are somehow different between the two consistency runs.

What we care about is whether there is any substantive difference between running run_coeval vs. spin_temp directly. We might be able to test this by just running spin_temp twice and seeing what the differences are. This would verify whether it's just random error, or whether its an actual difference between the two functions.