lenstronomy-tutorials
lenstronomy-tutorials copied to clipboard
Extension modules to the lenstronomy software package
============================== lenstronomy tutorial notebooks
In this repository you can find a variety of notebooks with tutorials on how to use lenstronomy as well as more advanced and specific example use cases.
If you are new to gravitational lensing, check also out the mini lecture series <https://github.com/sibirrer/strong_lensing_lectures>_ giving an introduction to gravitational lensing
with interactive Jupyter notebooks in the cloud.
You can also check out this self-work tutorial <https://github.com/ajshajib/lens_modeling_tutorial>_ with assignments and Jupyter notebooks designed for undergraduate students to learn the basics of lens modeling with lenstronomy.
Index
Getting started
Starting guide <https://github.com/lenstronomy/lenstronomy-tutorials/blob/main/Notebooks/GettingStarted/starting_guide.ipynb>_(google colab) <https://colab.research.google.com/github/lenstronomy/lenstronomy-tutorials/blob/main/Notebooks/GettingStarted/starting_guide.ipynb>_Units, coordinate system and parameter definitions <https://github.com/lenstronomy/lenstronomy-tutorials/blob/main/Notebooks/GettingStarted/units_coordinates_parameters_definitions.ipynb>_(google colab) <https://colab.research.google.com/github/lenstronomy/lenstronomy-tutorials/blob/main/Notebooks/GettingStarted/units_coordinates_parameters_definitions.ipynb>_Handling FITS files and extracting needed information from the data <https://github.com/lenstronomy/lenstronomy-tutorials/blob/main/Notebooks/GettingStarted/fits_handling_and_extracting_needed_information_from_the_data.ipynb>_(google colab) <https://colab.research.google.com/github/lenstronomy/lenstronomy-tutorials/blob/main/Notebooks/GettingStarted/fits_handling_and_extracting_needed_information_from_the_data.ipynb>_ Lens modelingModeling a simple Einstein ring <https://github.com/lenstronomy/lenstronomy-tutorials/blob/main/Notebooks/LensModeling/modeling_a_simple_Einstein_ring.ipynb>_(google colab) <https://colab.research.google.com/github/lenstronomy/lenstronomy-tutorials/blob/main/Notebooks/LensModeling/modeling_a_simple_Einstein_ring.ipynb>_Modeling a doubly imaged quasar <https://github.com/lenstronomy/lenstronomy-tutorials/blob/main/Notebooks/LensModeling/modeling_a_doubly_imaged_quasar.ipynb>_(google colab) <https://colab.research.google.com/github/lenstronomy/lenstronomy-tutorials/blob/main/Notebooks/LensModeling/modeling_a_doubly_imaged_quasar.ipynb>_Modeling a quadruply imaged quasar <https://github.com/lenstronomy/lenstronomy-tutorials/blob/main/Notebooks/LensModeling/modeling_a_quadruply_imaged_quasar.ipynb>_(google colab) <https://colab.research.google.com/github/lenstronomy/lenstronomy-tutorials/blob/main/Notebooks/LensModeling/modeling_a_quadruply_imaged_quasar.ipynb>_Modeling multiple bands simultaneously <https://github.com/lenstronomy/lenstronomy-tutorials/blob/main/Notebooks/LensModeling/modeling_multiple_bands_simultaneously.ipynb>_(google colab) <https://colab.research.google.com/github/lenstronomy/lenstronomy-tutorials/blob/main/Notebooks/LensModeling/modeling_multiple_bands_simultaneously.ipynb>_Source reconstruction with shapelets <https://github.com/lenstronomy/lenstronomy-tutorials/blob/main/Notebooks/LensModeling/source_reconstruction_with_shapelets.ipynb>_(google colab) <https://colab.research.google.com/github/lenstronomy/lenstronomy-tutorials/blob/main/Notebooks/LensModeling/source_reconstruction_with_shapelets.ipynb>_Modeling of catalogue data <https://github.com/lenstronomy/lenstronomy-tutorials/blob/main/Notebooks/LensModeling/modelling_of_catalogue_data.ipynb>_(google colab) <https://colab.research.google.com/github/lenstronomy/lenstronomy-tutorials/blob/main/Notebooks/LensModeling/modelling_of_catalogue_data.ipynb>_Cosmic shear with Einstein ring simulations <https://github.com/lenstronomy/lenstronomy-tutorials/blob/main/Notebooks/LensModeling/cosmic_shear_with_Einstein_ring_simulations.ipynb>_(google colab) <https://colab.research.google.com/github/lenstronomy/lenstronomy-tutorials/blob/main/Notebooks/LensModeling/cosmic_shear_with_Einstein_ring_simulations.ipynb>_ Line-of-sight effectsLine-of-sight effects tutorial <https://github.com/lenstronomy/lenstronomy-tutorials/blob/main/Notebooks/LineOfSightEffects/line-of-sight_effects_tutorial.ipynb>_(google colab) <https://colab.research.google.com/github/lenstronomy/lenstronomy-tutorials/blob/main/Notebooks/LineOfSightEffects/line-of-sight_effects_tutorial.ipynb>_ NumericsSolving lens equation <https://github.com/lenstronomy/lenstronomy-tutorials/blob/main/Notebooks/Numerics/solving_lens_equation_and_computing_flux_ratios.ipynb>_(google colab) <https://colab.research.google.com/github/lenstronomy/lenstronomy-tutorials/blob/main/Notebooks/Numerics/solving_lens_equation_and_computing_flux_ratios.ipynb>_Lenstronomy numerics <https://github.com/lenstronomy/lenstronomy-tutorials/blob/main/Notebooks/Numerics/lenstronomy_numerics.ipynb>_(google colab) <https://colab.research.google.com/github/lenstronomy/lenstronomy-tutorials/blob/main/Notebooks/Numerics/lenstronomy_numerics.ipynb>_ SimulationsSimulation API <https://github.com/lenstronomy/lenstronomy-tutorials/blob/main/Notebooks/Simulations/simulation_api.ipynb>_(google colab) <https://colab.research.google.com/github/lenstronomy/lenstronomy-tutorials/blob/main/Notebooks/Simulations/simulation_api.ipynb>_Skypy meets Lenstronomy <https://github.com/lenstronomy/lenstronomy-tutorials/blob/main/Notebooks/Simulations/skypy_meets_lenstronomy.ipynb>_(google colab) <https://colab.research.google.com/github/lenstronomy/lenstronomy-tutorials/blob/main/Notebooks/Simulations/skypy_meets_lenstronomy.ipynb>_Simulating different telescopes <https://github.com/lenstronomy/lenstronomy-tutorials/blob/main/Notebooks/Simulations/simulating_different_telescopes.ipynb>_(google colab) <https://colab.research.google.com/github/lenstronomy/lenstronomy-tutorials/blob/main/Notebooks/Simulations/simulating_different_telescopes.ipynb>_
Galaxy light fitting
Fitting galaxy light profile (like Galfit) <https://github.com/lenstronomy/lenstronomy-tutorials/blob/main/Notebooks/Galaxies/galfitting_with_lenstronomy.ipynb>_(google colab) <https://colab.research.google.com/github/lenstronomy/lenstronomy-tutorials/blob/main/Notebooks/Galaxies/galfitting_with_lenstronomy.ipynb>_Quasar-host galaxy decomposition <https://github.com/lenstronomy/lenstronomy-tutorials/blob/main/Notebooks/Galaxies/quasar_host_galaxy_decomposition.ipynb>_(google colab) <https://colab.research.google.com/github/lenstronomy/lenstronomy-tutorials/blob/main/Notebooks/Galaxies/quasar_host_galaxy_decomposition.ipynb>_ Dark matter substructureSubstructure challenge - a simple example <https://github.com/lenstronomy/lenstronomy-tutorials/blob/main/Notebooks/DMSubstructure/substructure_challenge_simple_example.ipynb>_(google colab) <https://colab.research.google.com/github/lenstronomy/lenstronomy-tutorials/blob/main/Notebooks/DMSubstructure/substructure_challenge_simple_example.ipynb>_Substructure challenge - Mock production notebook <https://github.com/lenstronomy/lenstronomy-tutorials/blob/main/Notebooks/DMSubstructure/substructure_challenge_mock_production.ipynb>_(google colab) <https://colab.research.google.com/github/lenstronomy/lenstronomy-tutorials/blob/main/Notebooks/DMSubstructure/substructure_challenge_mock_production.ipynb>_ Time-delay cosmographyTime delay-cosmography simulations <https://github.com/lenstronomy/lenstronomy-tutorials/blob/main/Notebooks/TimeDelayCosmography/time_delay_cosmography_simulations.ipynb>_(google colab) <https://colab.research.google.com/github/lenstronomy/lenstronomy-tutorials/blob/main/Notebooks/TimeDelayCosmography/time_delay_cosmography_simulations.ipynb>_Time delay-cosmography with uncertain PSF <https://github.com/sibirrer/lenstronomy_extensions/blob/main/Notebooks/TimeDelayCosmography/time_delay_cosmography_with_uncertain_psf.ipynb>_(google colab) <https://colab.research.google.com/github/lenstronomy/lenstronomy-tutorials/blob/main/Notebooks/TimeDelayCosmography/time_delay_cosmography_with_uncertain_psf.ipynb>_Sampling of catalogue data with external information <https://github.com/lenstronomy/lenstronomy-tutorials/blob/main/Notebooks/TimeDelayCosmography/sampling_of_catalogue_data_with_external_information.ipynb>_(google colab) <https://colab.research.google.com/github/lenstronomy/lenstronomy-tutorials/blob/main/Notebooks/TimeDelayCosmography/sampling_of_catalogue_data_with_external_information.ipynb>_Cosmology sampling of cosmographic posteriors <https://github.com/lenstronomy/lenstronomy-tutorials/blob/main/Notebooks/TimeDelayCosmography/cosmology_sampling_of_cosmographic_posteriors.ipynb>_(google colab) <https://colab.research.google.com/github/lenstronomy/lenstronomy-tutorials/blob/main/Notebooks/TimeDelayCosmography/cosmology_sampling_of_cosmographic_posteriors.ipynb>_Cosmographic uncertainty estimation and forecasting <https://github.com/lenstronomy/lenstronomy-tutorials/blob/main/Notebooks/TimeDelayCosmography/cosmographic_uncertainty_estimation_and_forecasting_with_kinematics.ipynb>_(google colab) <https://colab.research.google.com/github/lenstronomy/lenstronomy-tutorials/blob/main/Notebooks/TimeDelayCosmography/cosmographic_uncertainty_estimation_and_forecasting_with_kinematics.ipynb>_ ClustersWorking with galaxy clusters <https://github.com/lenstronomy/lenstronomy-tutorials/blob/main/Notebooks/Clusters/clusters.ipynb>_(google colab) <https://colab.research.google.com/github/lenstronomy/lenstronomy-tutorials/blob/main/Notebooks/Clusters/clusters.ipynb>_
Requirements
The notebooks require lenstronomy release version 1.11.2. Instructions for installing lenstronomy and its dependencies can be found in the Installation_ section of the lenstronomy documentation.
.. _Installation: https://lenstronomy.readthedocs.io/en/stable/installation.html
If you are using the GitHub branch of lenstronomy, you may be a bit ahead of the notebooks.
Need help or provide feedback?
Get in touch with the lenstronomy developers ([email protected]) if you encounter problems.
Attribution
A first set of notebooks were written by Simon Birrer sibirrer <https://github.com/sibirrer/>_ as the
lenstronomy_extensions <https://github.com/sibirrer/lenstronomy_extensions>_ package.
Please follow the lenstronomy citation guidelines in using these notebooks.