MulensModel.pointlens module

class MulensModel.pointlens.PointLens(parameters=None)

Bases: object

DEPRECATED

The PointLens class has been replaced with separate classes for each magnification method.

class MulensModel.pointlens.PointSourcePointLensMagnification(trajectory)

Bases: MulensModel.pointlens._PointLensMagnification

Equations for calculating point-source–point-lens magnification and its derivatives.

Arguments :
trajectory: Trajectory

Including trajectory.parameters = ModelParameters

get_magnification()

Calculate the magnification

Parameters : None

Returns :
magnification: float or np.ndarray

The magnification for each point specified by u in trajectory.

get_d_A_d_u()

Calculate dA/du for PSPL point-source–point-lens model.

No parameters.

Returns :
dA_du: np.ndarray

Derivative dA/du evaluated at each epoch.

class MulensModel.pointlens.FiniteSourceUniformGould94Magnification(direct=False, **kwargs)

Bases: MulensModel.pointlens._PointLensMagnification

Equations for calculating finite-source–point-lens magnification and its derivatives following the Gould 1994 ApJ, 421L, 71 prescription assuming a uniform (and circular) source.

Arguments :
trajectory: Trajectory

Including trajectory.parameters = ModelParameters

direct: bool

Use direct calculation (slow) instead of interpolation. Default is False.

get_d_A_d_u()

Calculate dA/du for USPL uniform-source–point-lens model.

No parameters.

Returns :
dA_du: np.ndarray

Derivative dA/du evaluated at each epoch.

get_magnification()

Calculate magnification for point lens and finite source (for a uniform source). The approximation was proposed by: Gould A. 1994 ApJ 421L, 71 “Proper motions of MACHOs” and later the integral calculation was simplified by: Yoo J. et al. 2004 ApJ 603, 139 “OGLE-2003-BLG-262: Finite-Source Effects from a Point-Mass Lens” This approach assumes rho is small (rho < 0.1). For larger sources use FiniteSourceUniformLee09Magnification.

Returns :
magnification: float, np.array

The finite-source source magnification for each epoch.

get_d_A_d_params(parameters)

Return the gradient of the magnification with respect to the FSPL parameters for each epoch.

Parameters :
parameters: list

List of the parameters to take derivatives with respect to.

Returns:
dA_dparams: dict

Keys are parameter names from parameters argument above. Values are the partial derivatives for that parameter evaluated at each epoch.

get_d_A_d_rho()

Return the derivative of the magnification with respect to rho for each epoch.

No parameters.

Returns :
dA_drho: np.ndarray

Derivative dA/drho evaluated at each epoch.

property z_

np.ndarray

Magnitude of lens-source separation scaled to rho for each epoch (i.e., z = u/rho).

property b0

np.ndarray

The value of the B_0(z) function for each epoch.

property db0

np.ndarray

Derivative of the B_0(z) function for each epoch.

class MulensModel.pointlens.FiniteSourceLDYoo04Magnification(gamma=None, **kwargs)

Bases: MulensModel.pointlens.FiniteSourceUniformGould94Magnification

Equations for calculating finite-source–point-lens magnification and its derivatives following the Gould 1994 ApJ, 421L, 71 prescription assuming a limb-darkened (and circular) source.

Arguments :
trajectory: Trajectory

Including trajectory.parameters = ModelParameters

direct: bool

Use direct calculation (slow) instead of interpolation. Default is False.

gamma: float

The limb-darkening coefficient. See also LimbDarkeningCoeffs

get_magnification()

Calculate magnification for point lens and finite source (for a uniform source). The approximation was proposed by: Gould A. 1994 ApJ 421L, 71 “Proper motions of MACHOs” and later the integral calculation was simplified by: Yoo J. et al. 2004 ApJ 603, 139 “OGLE-2003-BLG-262: Finite-Source Effects from a Point-Mass Lens” This approach assumes rho is small (rho < 0.1). For larger sources use FiniteSourceLDLee09Magnification.

Returns :
magnification: float, np.array

The finite-source source magnification for each epoch.

get_d_A_d_u()

Finite-source modification to derivatives of other parameters. = Factor due to rho for multiplying derivatives due to non-rho parameters.

get_d_A_d_rho()

Return the derivative of the magnification with respect to rho for each epoch.

No parameters.

Returns :
dA_drho: np.ndarray

Derivative dA/drho evaluated at each epoch.

property b1

np.ndarray

Value of the B_1(z) function for each epoch.

property db1

np.ndarray

Derivative of the B_1(z) function for each epoch.

property gamma

float

Limb-darkening gamma coefficient.

class MulensModel.pointlens.FiniteSourceUniformWittMao94Magnification(**kwargs)

Bases: MulensModel.pointlens._PointLensMagnification

Calculate magnification for the point lens and uniform source. This approach works well for small and large sources (e.g., rho~0.5). The method was presented by:

Witt and Mao 1994 ApJ 430, 505 “Can Lensed Stars Be Regarded as Pointlike for Microlensing by MACHOs?”

Arguments :
trajectory: Trajectory

Including trajectory.parameters = ModelParameters

get_magnification()

Calculate magnification for the point lens and uniform source.

Returns :
magnification: float, np.array

The finite-source source magnification for each epoch.

get_d_A_d_params(parameters)

Derivative calculations Not Implemented for WittMao94

get_d_u_d_params(parameters)

Derivative calculations Not Implemented for WittMao94

get_d_A_d_u()

Derivative calculations Not Implemented for WittMao94

get_d_A_d_rho()

Derivative calculations Not Implemented for WittMao94

class MulensModel.pointlens.FiniteSourceLDWittMao94Magnification(gamma=None, **kwargs)

Bases: MulensModel.pointlens.FiniteSourceUniformWittMao94Magnification

Calculate magnification for the point lens and finite source with limb-darkening. This approach works well for small and large sources (e.g., rho~0.5). Here multiple annuli (each with uniform source) are used to approximate finite source with limb-darkening. For uniform source calculation see:

Witt and Mao 1994 ApJ 430, 505 “Can Lensed Stars Be Regarded as Pointlike for Microlensing by MACHOs?”

The approximation of multiple sources in presented by, e.g.,:

Bozza et al. 2018 MNRAS 479, 5157 “VBBINARYLENSING: a public package for microlensing light-curve computation”

Arguments :
trajectory: Trajectory

Including trajectory.parameters = ModelParameters

gamma: float

Gamma limb darkening coefficient. See also LimbDarkeningCoeffs.

get_magnification()

Calculate magnification for the point lens and finite source with limb-darkening.

Returns :
magnification: float, np.array

The finite-source source magnification for each epoch.

property gamma

float

Limb-darkening gamma coefficient.

class MulensModel.pointlens.FiniteSourceUniformLee09Magnification(**kwargs)

Bases: MulensModel.pointlens._PointLensMagnification

Calculate magnification for the point lens and uniform finite source. This approach works well for small and large sources (e.g., rho~0.5). Uses the method presented by:

Lee, C.-H. et al. 2009 ApJ 695, 200 “Finite-Source Effects in Microlensing: A Precise, Easy to Implement, Fast, and Numerically Stable Formalism”

Arguments :
trajectory: Trajectory

Including trajectory.parameters = ModelParameters

get_magnification()

Calculate magnification for the point lens and uniform finite source.

Returns :
magnification: np.array

The finite source magnification.

class MulensModel.pointlens.FiniteSourceLDLee09Magnification(gamma=None, **kwargs)

Bases: MulensModel.pointlens.FiniteSourceUniformLee09Magnification

Calculate magnification for the point lens and finite source with limb-darkening. This approach works well for small and large sources (e.g., rho~0.5). Uses the method presented by:

Lee, C.-H. et al. 2009 ApJ 695, 200 “Finite-Source Effects in Microlensing: A Precise, Easy to Implement, Fast, and Numerically Stable Formalism”

Arguments :
trajectory: Trajectory

Including trajectory.parameters = ModelParameters

gamma: float

Gamma limb darkening coefficient. See also LimbDarkeningCoeffs.

get_magnification()

Calculate magnification for the point lens and finite source with limb-darkening.

Returns :
magnification: float, np.array

The finite-source source magnification for each epoch.

property gamma

float

Limb-darkening gamma coefficient.