sibirrer / fastell4py

Python Wrapper of the FASTELL code by Rennan Barkana
MIT License
2 stars 3 forks source link

Caustic curves and critical curves #3

Closed Tabibrh closed 1 year ago

Tabibrh commented 1 year ago

I need to calculate the caustic curves for that we need to set the condition detA =0 now this A is the the Jacobean matrix or the Magnification matrix. I am doing a project and came upon a hurdle which led me to rethink my steps ..... So can you clarify this ..... Thanks

sibirrer commented 1 year ago

Thank you for the issue @Tabibrh ! I would recommend using fastell4py through the lenstronomy interface, there you have the 'SPEMD' or 'PEMD' models with convenient access to the Hessian, as well as caustic and critical curve calculations. See e.g. https://github.com/lenstronomy/lenstronomy/blob/main/lenstronomy/LensModel/Profiles/spemd.py

You can also use the 'EPL' model which is basically the same as the 'PEMD' but does not require a fortran wrapper. For the lensing theory, lenstronomy has also links to some lectures and examples how to execute these calculations.

Cheers, Simon

Tabibrh commented 1 year ago

Okay thanks , can you tell me where would I get the EPL model Thanks Tabib

sibirrer commented 1 year ago

from lenstronomy.LensModel.lens_model import LensModel lens_model = LensModel(['EPL'])

lens_model.hessian()

or likewise use the lens model 'SPEMD' or 'PEMD'. The parameterization and parameters for the different profiles can be seen in the source code or the readthedocs documentation.

There is also an entire set of routines to calculate the caustic curves in lenstronomy as well

Tabibrh commented 1 year ago

Yeah I saw that thankss for so much help before closing this , the set of routines to calculate the caustic is in lenstronomy ? Where can I find those

sibirrer commented 1 year ago

it's here: https://github.com/lenstronomy/lenstronomy/blob/main/lenstronomy/LensModel/lens_model_extensions.py You can also search through the source code and there are many tutorials for lenstronomy

Tabibrh commented 1 year ago

Sorry for bothering you a lot but i am confused i was reading the 'readthedoc' documentation , using fastell i was using arat as the ellipticity but here i come upon the term "eccentricity components" e1 and e2 can you explain what is the difference?

sibirrer commented 1 year ago

Here are some parameter definitions listed: https://github.com/lenstronomy/lenstronomy-tutorials/blob/main/Notebooks/GettingStarted/units_coordinates_parameters_definitions.ipynb

Tabibrh commented 1 year ago

ohh okay thanks