Closed sh-tada closed 9 months ago
I added transmission_grad_test.py
in integration/unittest_long/transmission/
.
If necessary, I will change the file name.
The newly added file is not pytest file. maybe remove _test
from the filename?
I modified the filename and Nx.
This pull request resolves the issue (#463) of NaN values in the gradient of the
ArtTransPure
transmission spectra model with respect to temperature, gravity_btm, radius_btm, and mean molecular weight. The NaN values originated from thejnp.sqrt
function inexojax/spec/opachord.py
.To address this, I implemented
jnp.tril
before thejnp.sqrt
operation. This modification zeros out irrelevant values, ensuring proper gradient calculations. Setting k=-1 injnp.tril
also zeroes the diagonal.Fixes #463