MulensModel.trajectory module

class MulensModel.trajectory.Trajectory(times, parameters, parallax=None, coords=None, satellite_skycoord=None, earth_coords=None)

Bases: object

The (dimensionless) X, Y trajectory of the source in the source plane. This class includes internal functions that calculate how microlensing parallax affects the trajectory.

For binary lens, the origin of the coordinate system is at the center of mass with higher mass (assuming q < 1) at negative X and Y=0.

This class follows the conventions defined in Appendix A of Skowron et al. (2011) except the definition of alpha, which is shifted by 180 deg.

Arguments :
times: [float, list, np.ndarray], required

the times at which to generate the source trajectory, e.g. a vector.

parameters: instance of ModelParameters, required

a ModelParameters object specifying the microlensing parameters

parallax: boolean dictionary, optional

specifies what parallax effects should be used. Default is False for each of ‘earth_orbital’, ‘satellite’, and ‘topocentric’. (differs from Model which defaults to True)

coords: str, or Coordinates, Astropy.coordinates.SkyCoord, optional

sky coordinates of the event; required for parallax calculations

satellite_skycoord: Astropy.coordinates.SkyCoord, optional

sky coordinates of the satellite specified by the ephemerides file. See satellite_skycoord.

Attributes :
times: np.ndarray

input epochs

parameters: ModelParameters

input ModelParameters

satellite_skycoord: Astropy.coordinates.SkyCoord

input satellite_skycoord

parallax: dict

specifies which types of microlensing parallax will be taken into account; boolean dict with keys: earth_orbital, satellite, and topocentric (default values are False)

coords: Coordinates

event coordinates

property x


Dimensionless X coordinates of trajectory.

property y


Dimensionless Y coordinates of trajectory.

property parallax_delta_N_E


Net North (key=’N’) and East (key=’E’) components of the parallax offset calculated for each time stamp (so sum of the offsets from all parallax types).

property d_perp


Projection of the Earth-Satellite separation vector (in AU) on the sky.


For a given set of parameters (a ModelParameters object), calculate the xy position of the source.

This function has no input and no output. It sets x and y attributes.