MulensModel.causticsbinary module¶
- class MulensModel.causticsbinary.CausticsBinary(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()
Note that default scaling of axis may not be equal on both axis. To mitigate this, use:
plt.gca().set_aspect('equal')
orplt.axis('equal')
(the other possible options are'scaled'
or'square'
).
- 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_pointsint, optional
The number of points to calculate along the caustic.
- Returns:
- x, ylist
Two lists of length n_points giving the x, y coordinates of the caustic points.
- property critical_curve¶
Critical curve stored as
CriticalCurve
object, read-only