HajimeKawahara / exojax

🐈 Automatic differentiable spectrum modeling of exoplanets/brown dwarfs using JAX, compatible with NumPyro and JAXopt
http://secondearths.sakura.ne.jp/exojax/
MIT License
45 stars 14 forks source link

The mmw derivative of the transmission spectra model becomes NaN when using 32-bit #473

Closed sh-tada closed 5 months ago

sh-tada commented 7 months ago

I encountered an issue where the derivative of the transmission spectra model (ArtTransPure) with respect to the mean molecular weight (mmw) results in NaN (Not a Number) when operating in a 32-bit environment. This problem does not occur in a 64-bit setting.

You can reproduce this issue by running exojax/tests/integration/unittests_long/transmission /transmission_grad_test.py after commenting out config.update("jax_enable_x64", True) and adding allow_32bit=True to OpaPremodit.