/gravitational_lens

Primary LanguageJupyter NotebookMIT LicenseMIT

Gravitational Lensing Image Generator

Compute images with a gravitational lensing effect by placing masses that act as lenses. A thin lens approximation is used.

For the physics behind the phenomena, you could consult Schneider, P. (2005, July). Gravitational lensing statistics.

Lensing Example

Structure

  • code/main.py: Classes with methods to generate the images
  • code/plot_utils.py: Utility functions for plotting.
  • code/example_usage.ipynb: Notebook with examples.

How to Use

Use the /example_usage.ipynb notebook as a reference.

Requirements

Numpy and matplotlib should be enough.

Contributing

Contributions are welcome!

Aknowledgments

Part of this code was first introduced to me in a course at the master in astrophysics of Universidad de La Laguna (ULL)

License

Distributed under the MIT License. See LICENSE for more information.