Skip to content

Adding multi-source plane lens functionality#75

Open
aangress wants to merge 9 commits into
aymgal:mainfrom
aangress:DSPLs
Open

Adding multi-source plane lens functionality#75
aangress wants to merge 9 commits into
aymgal:mainfrom
aangress:DSPLs

Conversation

@aangress

Copy link
Copy Markdown
Contributor

@aymgal

Still very much a WiP! Attempting to add the plotting functionality for double (and multi) source plane lenses. This hopefully shouldn't be a giant overhaul of the model plotting, just something extra.

@aangress

Copy link
Copy Markdown
Contributor Author

My plans for changes:

  • Allow composable lens model to hold a list of composable mass and light models
  • Evaluate nested multi-lens equation after sorting objects by redshift
  • Will need beta parameter (scaling/angular diameter distance ratio) to evaluate equation. Can retrieve beta in two ways:
  1. If beta was a free parameter during lens modeling, get beta from associated chains file. This will require user to include a list of beta variable names in JSON file to check for in chains file
  2. If beta was not a free parameter, use redshifts/Astropy to calculate angular diameter distances and betas from there

@aymgal

aymgal commented Dec 3, 2025

Copy link
Copy Markdown
Owner

Hi @aangress! That looks very good! I think however that this will be easier to finalise after I push my changes regarding the support of pixelated mass profiles and lens light profiles... Since it is touching the composable models part of it.

Sorry for the lack of quick answers, I am still very busy outside science these days. I hope to be able to work again and hopefully finalise my changes next week, but will let you know if not.

@aangress

aangress commented Jan 5, 2026

Copy link
Copy Markdown
Contributor Author

Happy New Year @aymgal! I just wanted to check in to see how your implementation for the pixelated profiles is going. No rush to push anything!

@aymgal

aymgal commented Jan 7, 2026

Copy link
Copy Markdown
Owner

Hi @aangress, thanks to come and ask about progress. Unfortunately I'm still not having enough free time between my two contracts to work on it (as I initially hoped) 😕 So nothing new, sorry for these delay. Are these critically blocking you for important goals? If so, I can try working on this soon, hopefully.

@aymgal

aymgal commented Feb 16, 2026

Copy link
Copy Markdown
Owner

Hi @aangress , I just merged #76 which in particular adds lens light model supports, and reorganizes a few bits of the ComposableModel classes. Hopefully first updating your branch to these latest changes would make it easier for you to add multi-plane support. Please let me know if you get any trouble in the process, and/or if you have request changes.

@aangress

Copy link
Copy Markdown
Contributor Author

Just a quick update! The main functionality for compound lens systems has been implemented. I'll commit changes soon. Here's a list of things I hope to take care of soon to fix the rest of it up:

Loose ends to tie up

  • Update plotting and analysis tools (e.g., corner plots, etc.) to properly handle multi-plane systems and cross-plane parameter correlations

Validation/ Unit Tests

  • Recover standard single-plane results when reducing to one lens plane
  • Verify that you get the single-plane result when inserting a zero-mass lens plane
  • Directly compare simplified analytical systems to known results (ex: SIS systems)
  • Reproduce results of known/observed compound systems (Jackpot, zig-zag, etc)
  • Check if the generated images for the above tests are equal to the known results within some tolerance
  • Ensure correct behavior for both redshift-derived and user-specified beta values. Results should match if beta values are equal across different COOLEST files, even if one uses user-defined betas while the other uses betas calculated from user-defined redshifts
  • Produce a corner plot. Should match some expected result
  • Analysis functions (Einstein radii, light radius, etc.) should all function as expected

@aymgal

aymgal commented May 27, 2026

Copy link
Copy Markdown
Owner

Thanks a lot @aangress . This week is a bit busy for me but by the end of next week I hope I can have a look at your changes.

@aymgal

aymgal commented Jun 2, 2026

Copy link
Copy Markdown
Owner

@aangress I see there are merging conflicts, could you please solve them?

@aangress

Copy link
Copy Markdown
Contributor Author

Hey @aymgal , I still have a few things left to fix/clean up. I'll push changes and let you know soon!

@aangress

Copy link
Copy Markdown
Contributor Author

Hey @aymgal , I've pushed my changes and everything seems to be in working order. I'm still trying find a Jackpot lens model to reproduce to check to see if my multiplane implementation is working, so you might not want to merge this PR just yet, but feel free to check through what I've added!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants