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

LensedPS before lensing #53

Open
gvernard opened this issue Oct 26, 2023 · 2 comments · May be fixed by #55
Open

LensedPS before lensing #53

gvernard opened this issue Oct 26, 2023 · 2 comments · May be fixed by #55

Comments

@gvernard
Copy link
Collaborator

gvernard commented Oct 26, 2023

It should be very easy to extend the LensedPS class in order to account for a non-lensed PS. This will be useful for codes like MOLET and Herculens. I can add this, for example, by adding a "lensed/unlensed" flag to the class (because only a single image can still be there after lensing). Or we could include the unlensed source position and flux as extra but optional arguments to this class.
Of course when it comes to the plotting API, this will mean that we need our own COOLEST way to find the multiple images if only the unlensed source is given. Or not, we can leave this out, and the plots would check this flag and plot the point source accordingly, either on the lens and/or the source planes.

@aymgal
Copy link
Owner

aymgal commented Oct 27, 2023

Yes! I agree this is needed to have unlensed point source supported here. I think I am in favor of having a single, unified PointSource light profile, with "parameters" fields lensed_positions and observed_positions (or similar), and as you propose, an additional class attribute stating if it is lensed or not. This way, unlensed point sources will have only the observed_positions filled up. And lensed point sources can either have their lensed or unlensed positions filled up, or both which I think could be useful because one can get directly from the temple both sets of positions.
An alternative is to go more minimalist and have only one positions parameters, and depending if the lensed flag is true or not, it contains lensed or unlensed position. But this is more prone to mistakes and misinterpretation in my opinion.

Please go ahead with opening a pull request from a new branch, if you want to have a go at it. That would be great!

I propose that we leave the update of the plotting interface to the next step, after converging on the template interface first.

@gvernard
Copy link
Collaborator Author

gvernard commented Nov 2, 2023

I created a pull request and will be pushing my updates there soon.

@aymgal aymgal linked a pull request Nov 16, 2023 that will close this issue
@aymgal aymgal pinned this issue Nov 16, 2023
@aymgal aymgal unpinned this issue Nov 16, 2023
@aymgal aymgal linked a pull request Nov 16, 2023 that will close this issue
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 a pull request may close this issue.

2 participants