Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing multiplane #244

Closed
wants to merge 1 commit into from
Closed

Fixing multiplane #244

wants to merge 1 commit into from

Conversation

AlexandreAdam
Copy link
Collaborator

coauthor: @andreasfilipp

We are fixing the math of the multiplane class based on Fleury et al. (2022). Doing this, we realize that lenstronomy must be wrong. The multiplane equation is actually much simpler than we thought. It's just recursively applying the single thin lens equation, while updating the coordinate.

All the normalization quantities, like $\Sigma_{\mathrm{crit}}$, are computed by taking the next plane as the source plane. This is how the math stays internally consistent.

Also fixed the Shapiro time delay units, from days * arcsec^2 to days. A conversion factor was missing.

This PR also attempts to fix the circular logic in the ThinPlane class by forcing inherited class to implement the reduced_deflection_angle method. The physical_deflection_angle method is then just a wrapper on the previous one. See Issue #242.

…formula from Fleury et al. Time delay also reformated and corrected. Unit of Shapiro time delay is now days instead of days*arcsec^2. Time delay API changed and clarified.
@AlexandreAdam AlexandreAdam added bug Something isn't working fix A bug fix patch for the codebase labels Jul 23, 2024
@AlexandreAdam AlexandreAdam self-assigned this Jul 23, 2024
Copy link

codecov bot commented Jul 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.14%. Comparing base (9806a84) to head (79888d3).
Report is 41 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #244      +/-   ##
==========================================
- Coverage   93.22%   93.14%   -0.09%     
==========================================
  Files          59       59              
  Lines        2732     2741       +9     
==========================================
+ Hits         2547     2553       +6     
- Misses        185      188       +3     
Flag Coverage Δ
unittests 93.14% <100.00%> (-0.09%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fix A bug fix patch for the codebase
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant