Expand description
Gravitational lensing.
Structs§
- Lensing
Field - 2D grid of deflection vectors around a point mass.
- Lensing
Renderer - Renderer for gravitational lensing effects.
Functions§
- apply_
lensing - Apply gravitational lensing to glyph positions. Deflects each position away from the lens center.
- deflection_
angle - Deflection angle for a light ray passing a mass M at impact parameter b. alpha = 4GM / (b * c^2)
- einstein_
radius - Einstein radius: the angular radius of a perfect ring image. theta_E = sqrt(4GM / c^2 * D_ls / (D_l * D_s))
- image_
positions - Image positions for a point lens. Returns two image angles (theta_+, theta_-). theta_+/- = (beta +/- sqrt(beta^2 + 4*theta_E^2)) / 2
- lens_
equation - Lens equation: theta - beta = theta_E^2 / theta Returns theta - beta - theta_E^2/theta (should be zero for image positions).
- magnification
- Magnification of an image at angle theta for Einstein radius theta_E. mu = (theta / theta_E)^4 / ((theta/theta_E)^4 - 1) Equivalently: mu = |theta / beta * d(theta)/d(beta)|
- microlensing_
lightcurve - Microlensing light curve: amplification as a function of time. Paczynski formula: A(u) = (u^2 + 2) / (u * sqrt(u^2 + 4)) where u = sqrt(u_min^2 + ((t - t0)/t_E)^2)
- sis_
critical_ radius - Compute the critical curve radius for a singular isothermal sphere lens.
- total_
magnification - Total magnification from both images of a point lens. A_total = (u^2 + 2) / (u * sqrt(u^2 + 4))