Skip to content

Extended source¤

caustics.extended_source ¤

Compute the magnification of an extended source using contour integration.

mag_extended_source(w0, rho, nlenses = 2, npts_limb = 150, limb_darkening = False, u1 = 0.0, npts_ld = 100, roots_itmax = 2500, roots_compensated = False, **params) ¤

Compute the magnification of an extended source with radius rho for a system with nlenses lenses. If nlenses is 2 (binary lens) or 3 (triple lens), the coordinate system is set up such that the the origin is at the center of mass of the first two lenses which are both located on the real line. The location of the first lens is \(-sq/(1 + q)\) and the second lens is at \(s/(1 + q)\). The optional third lens is located at an arbitrary position in the complex plane \(r_3e^{-i*\psi}\). The magnification is computed using contour integration in the image plane. Boolean flag limb_darkening indicated whether linear limb-darkening needs to taken into account. If limb_darkening is set to True the linear limb-darkening coefficient u1 needs to be specified as well.

If nlenses is 2 only the parameters s and q should be specified. If nlenses is 3, the parameters s, q, q3, r3 and psi should be specified.

Note

Turning on limb-darkening (limb_darkening=True) slows down the computation by up to an order of magnitude.

Parameters:

Name Type Description Default
w0 complex

Source position in the complex plane.

required
rho float

Source radius in Einstein radii.

required
nlenses int

Number of lenses in the system.

2
npts_limb int

Initial number of points uniformly distributed on the source limb when computing the point source magnification. The final number of points is greater than this value because the number of points is decreased geometrically by a factor of 1/2 until it reaches 2.

150
limb_darkening bool

If True, compute the magnification of a limb-darkened source. If limb_darkening is enabled the u1 linear limb-darkening coefficient needs to be specified. Defaults to False.

False
u1 float

Linear limb darkening coefficient. Defaults to 0..

0.0
npts_ld int

Number of points at which the stellar brightness function is evaluated when computing contour integrals \(\int P(z_1^\prime, z_2) dz_1^\prime\) and \(\int Q(z_1, z_2^\prime) dz_2^\prime\) (see Dominik 1998). Defaults to 100.

100
s float

Separation between the two lenses. The first lens is located at \(-sq/(1 + q)\) and the second lens is at \(s/(1 + q)\) on the real line.

required
q float

Mass ratio defined as \(m_2/m_1\).

required
q3 float

Mass ratio defined as \(m_3/m_1\).

required
r3 float

Magnitude of the complex position of the third lens.

required
psi float

Phase angle of the complex position of the third lens.

required
roots_itmax int

Number of iterations for the root solver.

2500
roots_compensated bool

Whether to use the compensated arithmetic version of the Ehrlich-Aberth root solver.

False

Returns:

Name Type Description
float

Total magnification at the source position w0.