MulensModel.mulensobjects.mulenssystem module

class MulensModel.mulensobjects.mulenssystem.MulensSystem(lens=None, source=None, mu_rel=None)

Bases: object

A microlensing system consisting of a lens and a source.

property lens

A Lens object. Physical properties of the lens. Note: lens mass must be in solMasses.

property source

Source object. Physical properties of the source.

property mu_rel


Relative proper motion between the source and lens stars. If set as a float, units are assumed to be mas/yr.

property t_E


The Einstein crossing time (in days). If set as a float, assumes units are in days.

property pi_rel

astropy.Quantity, read-only

The source-lens relative parallax in milliarcseconds.

property pi_E

float, read-only

The Einstein ring radius. It’s equal to pi_rel / theta_E. Dimensionless.

property theta_E

astropy.Quantity, read-only

The angular Einstein Radius in milliarcseconds.

property r_E

astropy.Quantity, read-only

The physical size of the Einstein Radius in the Lens plane (in AU).

property r_E_tilde

astropy.Quantity, read-only

The physical size of the Einstein Radius projected onto the Observer plane (in AU).

plot_magnification(u_0=None, alpha=None, **kwargs)

Plot the magnification curve for the lens. u_0 must always be specified. If the lens has more than one body, alpha must also be specified.

Parameters :
u_0: float

Impact parameter between the source and the lens (as a fraction of the Einstein ring)

alpha: astropy.Quantity, float

If float then degrees are assumed as a unit. See MulensModel.modelparameters.ModelParameters.alpha


See MulensModel.model.Model.plot_magnification()

plot_caustics(n_points=5000, **kwargs)

Plot the caustics structure using Pyplot scatter. See MulensModel.caustics.Caustics.plot()

Parameters :
n_points: int

Number of points be plotted.


Keyword arguments passed to Pyplot scatter