Closed ben-cassese closed 2 months ago
When working on #17, found some similar spikes and so implemented a fix there. The issue was cartesian_intersection_to_parametric_angle
in squishyplanet.engine.parametric_ellipse
. Previously, we were solving for this angle numerically, and at high $f$ values it sometimes did not converge. When revisiting it, realized there was actually a pretty simple analytic solution, so implemented that instead.
So, should be all set now! I've modified test_projected_parameterization
to test $f$ values up to 0.99, and to look for single isolated spikes. The same code above now produces:
And changing projected_f
to 0.99 now produces:
When generating transit light curves for planets with extreme flattening values (f roughly >0.6), unexpected and isolated spikes occasionally appear in the output:
These values are likely nonphysical (see Berardo and de Wit 2022), but could still cause problems for users who allow exploration of a wide parameter space.
Many thanks to @CalebLammers for pointing this out! Will try to hunt down the cause, but contributions are welcome.