fbartolic / caustics

Differentiable microlensing powered by JAX
https://fbartolic.github.io/caustics/
MIT License
13 stars 2 forks source link

Fix finite source test for triple lenses #19

Open fbartolic opened 2 years ago

fbartolic commented 2 years ago

Neither the cusp test nor the "ghost images" test from Bozza et.al. 2018 seem to be working for triple lenses. I must be doing something wrong when computing the derivatives of $f(z)$.

A related issue is that as it is currently implemented, the ghost images tests checks that $$c_g(|I(z_1)| + |I(z_2)|)<\delta$$ where $I$ is an indicator function that evaluates to true if the condition is satisfied, rather than $$c_g(|I(z_1)|)<\delta\quad \text{and} \quad c_g(|I(z_2)|)<\delta$$ The prohibited regions in the source plane don't look right with the latter condition.

Only way to fix these issues is to re-derive all the math from scratch and check that it all makes sense.