MulensModel.caustics module

class MulensModel.caustics.Caustics(q, s)

Bases: object

Class for the caustic structure corresponding to a given (q, s), i.e. mass ratio and separation. Implemented for 2-body lenses only.

Attributes :
q: float
mass ratio between the 2 bodies; always <= 1
s: float
separation between the 2 bodies (as a fraction of the Einstein ring)
plot(n_points=5000, **kwargs)

Plots the caustics using matplotlib.pyplot.scatter().

Parameters :
n_points: int, optional
The number of points to calculate along the caustic. Defaults to 5000.
**kwargs
keywords accepted by matplotlib.pyplot.scatter()
get_caustics(n_points=5000)

Returns x and y vectors corresponding to the outlines of the caustics. Origin is center of mass and larger mass is on the left (for q < 1).

Parameters:
n_points : int, optional
The number of points to calculate along the caustic.
Returns:
x, y : list
Two lists of length n_points giving the x, y coordinates of the caustic points.
critical_curve

Critical curve stored as CriticalCurve object, read-only

class CriticalCurve

Bases: object

Internal class of Caustics. Defines the critical curve (in the lens plane). Origin is center of mass with larger mass on the left (q < 1).

Attributes:
x, y : list
Two lists of length n_points giving the x, y coordinates of the caustic points.