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

feat: add multipole lens profile #215

Merged
merged 15 commits into from
Oct 18, 2024
Merged

feat: add multipole lens profile #215

merged 15 commits into from
Oct 18, 2024

Conversation

andreasfilipp
Copy link
Collaborator

adresses issue #139

coauthor: @RonanLegin

Multipole Gravitational Lensing Module

This Python module, part of a larger gravitational lensing library, provides functionality to simulate and analyze multipole gravitational lensing effects. It is designed to integrate seamlessly with PyTorch and offers detailed implementations for calculating deflection angles, lensing potentials, and convergence based on multipole expansions.

Features
Gravitational Lensing Calculations: Compute deflection angles, potentials, and convergence for multipole gravitational lenses.

Documentation
Refer to the docstrings within the code for detailed usage and examples. Equations used for the calculations are referenced from "Xu et al. 2014" (https://arxiv.org/pdf/1307.4220).

@andreasfilipp
Copy link
Collaborator Author

the convergence test for some reason does not pass. I do not know why

Copy link
Member

@ConnorStoneAstro ConnorStoneAstro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some minor changes, and one bigger change. Could you make it so that the user passes m as a tuple of which multipole orders they want? Then the individual functions can loop over that tuple and add the contributions from each multipole order.

Also can you add the multipole class to the test_lens_potential.py unit test? It doesn't look like its in there although I thought I saw you running that test

src/caustics/lenses/func/multipole.py Outdated Show resolved Hide resolved
src/caustics/lenses/multipole.py Outdated Show resolved Hide resolved
src/caustics/lenses/multipole.py Outdated Show resolved Hide resolved
src/caustics/lenses/multipole.py Outdated Show resolved Hide resolved
src/caustics/lenses/multipole.py Outdated Show resolved Hide resolved
src/caustics/lenses/multipole.py Outdated Show resolved Hide resolved
src/caustics/models/utils.py Outdated Show resolved Hide resolved
@ConnorStoneAstro ConnorStoneAstro changed the title add multipole lens profile feat: add multipole lens profile Jun 19, 2024
@ConnorStoneAstro ConnorStoneAstro added the feat Features: Introduces a new feature to the codebase label Jun 26, 2024
@ConnorStoneAstro ConnorStoneAstro linked an issue Jun 26, 2024 that may be closed by this pull request
Copy link

codecov bot commented Oct 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.67%. Comparing base (c90b34b) to head (ab45b6f).
Report is 1 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev     #215      +/-   ##
==========================================
+ Coverage   93.52%   93.67%   +0.14%     
==========================================
  Files          61       63       +2     
  Lines        2859     2925      +66     
==========================================
+ Hits         2674     2740      +66     
  Misses        185      185              
Flag Coverage Δ
unittests 93.67% <100.00%> (+0.14%) ⬆️

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.

@ConnorStoneAstro ConnorStoneAstro merged commit 5afeab7 into dev Oct 18, 2024
13 checks passed
@ConnorStoneAstro ConnorStoneAstro deleted the multipole branch October 18, 2024 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat Features: Introduces a new feature to the codebase
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Multipole expansions
2 participants