EinsteinPy - Making Einstein possible in Python¶
EinsteinPy is an open source pure Python package dedicated to problems arising in General Relativity and gravitational physics, such as geodesics plotting for Schwarzschild, Kerr and Kerr Newman space-time model, calculation of Schwarzschild radius, calculation of Event Horizon and Ergosphere for Kerr space-time. Symbolic Manipulations of various tensors like Metric, Riemann, Ricci and Christoffel Symbols is also possible using the library. EinsteinPy also features Hypersurface Embedding of Schwarzschild space-time, which will soon lead to modelling of Gravitational Lensing! It is released under the MIT license.
View source code of EinsteinPy!
Key features of EinsteinPy are:
Geometry analysis and trajectory calculation in vacuum solutions of Einstein’s field equations
Various utilities related to above geometry models
Event horizon and ergosphere for Kerr black hole
Maxwell Tensor and electromagnetic potential in Kerr-Newman space-time
And much more!
Symbolic Calculation of various quantities
Riemann Curvature Tensor
Index uppering and lowering!
Simplification of symbolic expressions
Static Plotting using Matplotlib
Interactive 2D plotting
Environment aware plotting!
Coordinate conversion with unit handling
Hypersurface Embedding of Schwarzschild Space-Time
Shadow cast by an thin emission disk around a Schwarzschild Black Hole
And more to come!
Einsteinpy is developed by an open community. Release announcements and general discussion take place on our mailing list and chat.
The source code, issue tracker and wiki are hosted on GitHub, and all contributions and feedback are more than welcome. You can test EinsteinPy in your browser using binder, a cloud Jupyter notebook server:
EinsteinPy works on recent versions of Python and is released under the MIT license, hence allowing commercial use of the library.
from einsteinpy.plotting import GeodesicPlotter from einsteinpy.examples import perihelion a = GeodesicPlotter() a.plot(perihelion()) a.show()
- Getting started
- User guide
- Vacuum Solutions to Einstein’s Field Equations
- Jupyter notebooks
- Plotting Spacial Hypersurface Embedding for Schwarzschild Space-Time
- Shadow cast by an thin emission disk around a Schwarzschild Black Hole
- Animations in EinsteinPy
- Using Geodesics (Back-ends & Plotting)
- Visualizing Event Horizon and Ergosphere (Singularities) of Kerr Metric or Black Hole
- Visualizing Frame Dragging in Kerr Spacetime
- Visualizing Precession in Schwarzschild Spacetime
- Einstein Tensor calculations using Symbolic module
- Lambdify in symbolic module
- Contravariant & Covariant indices in Tensors (Symbolic)
- Predefined Metrics in Symbolic Module
- Ricci Tensor and Scalar Curvature calculations using Symbolic module
- Symbolically Understanding Christoffel Symbol and Riemann Curvature Tensor using EinsteinPy
- Weyl Tensor calculations using Symbolic module
- What’s new
- Developer Guide
- EinsteinPy API
- Code of Conduct