pyLIMA.microlcaustics

Created on Thu Apr 20 11:19:38 2017

@author: ebachelet

Module Contents

Functions

find_2_lenses_caustics_and_critical_curves(separation, mass_ratio, resolution=1000) Find and sort caustics for a binary lens
sort_2lenses_resonant_caustic(caustic_points, critical_curves_points) Sort the caustic points to have regular resonant caustic
sort_2lenses_close_caustics(caustic_points, critical_curves_points) Sort the caustic points to have one central caustic and two “planetary” caustics
sort_2lenses_wide_caustics(caustic_points, critical_curves_points) Sort the caustic points to have one central caustic and one “planetary” caustics
compute_2_lenses_caustics_points(separation, mass_ratio, resolution=1000) Find the critical curve points and caustics points associated to a binary lens. See :
find_area_of_interest_around_caustics(caustics, secure_factor=0.1) Find a box around the caustic, the are of interest.
find_2_lenses_caustic_regime(separation, mass_ratio) Find the caustic regime.
change_source_trajectory_center_to_central_caustics_center(separation, mass_ratio) Define a new geometric center, on the central caustic
change_source_trajectory_center_to_planetary_caustics_center(separation, mass_ratio) Define a new geometric center depending of the caustic regime. This helps fit convergence sometimes:
dx(function, x, args)
newtons_method(function, jaco, x0, args=None, e=10**(-10))
foo(x, pp1, pp2, pp3, pp4, pp5)
foo2(X, pp1, pp2, pp3, pp4, pp5)
jaco(x, pp1, pp2, pp3, pp4, pp5)
hessian(x, pp1, pp2, pp3, pp4, pp5)
Jacobian(zi, mtot, deltam, z1)
find_slices(slice_1, slice_2, points)
pyLIMA.microlcaustics.find_2_lenses_caustics_and_critical_curves(separation, mass_ratio, resolution=1000)[source]

Find and sort caustics for a binary lens

Parameters:
  • separation (float) – the projected normalised angular distance between the two bodies
  • mass_ratio (float) – the mass ratio of the two bodies
  • resolution (int) – number of points desired in the caustic computation.
Returns:

the caustic regime, the sorted caustics and the critical curve

Return type:

str, list of array_like, list of array_like

pyLIMA.microlcaustics.sort_2lenses_resonant_caustic(caustic_points, critical_curves_points)[source]

Sort the caustic points to have regular resonant caustic

Parameters:
  • caustic_points (array_like) – the points of the caustics, in complex notation
  • critical_curves_points (array_like) – the points of the critical curve, in complex notation
Returns:

the resonant caustic, the resonant critical curve

Return type:

array_like, array_like

pyLIMA.microlcaustics.sort_2lenses_close_caustics(caustic_points, critical_curves_points)[source]

Sort the caustic points to have one central caustic and two “planetary” caustics

Parameters:
  • caustic_points (array_like) – the points of the caustics, in complex notation
  • critical_curves_points (array_like) – the points of the critical curve, in complex notation
Returns:

the central caustic, the top planetary caustic, the bottom planetary caustic,

the central critical curve, the top critical curve, the bottom critical curve :rtype: array_like, array_like, array_like, array_like, array_like, array_like

pyLIMA.microlcaustics.sort_2lenses_wide_caustics(caustic_points, critical_curves_points)[source]

Sort the caustic points to have one central caustic and one “planetary” caustics

Parameters:
  • caustic_points (array_like) – the points of the caustics, in complex notation
  • critical_curves_points (array_like) – the points of the critical curve, in complex notation
Returns:

the central caustic, the planetary caustic, the central critical curve,

the planetary critical curve :rtype: array_like, array_like, array_like, array_like

pyLIMA.microlcaustics.compute_2_lenses_caustics_points(separation, mass_ratio, resolution=1000)[source]
Find the critical curve points and caustics points associated to a binary lens. See :
“On the Minimum Magnification Between Caustic Crossings for Microlensing by Binary and Multiple Stars” Witt and Mao 1995 http://adsabs.harvard.edu/abs/1995ApJ…447L.105W “Investigation of high amplification events in light curves of gravitationally lensed quasars” Witt H.J 1990 http://adsabs.harvard.edu/abs/1990A%26A…236..311W
Parameters:
  • separation (float) – the projected normalised angular distance between the two bodies
  • mass_ratio (float) – the mass ratio of the two bodies
  • resolution (int) – number of points desired in the caustic computation. :return: the central caustic, the top planetary caustic, the bottom planetary caustic, the central critical curve, the top critical curve, the bottom critical curve :rtype: array_like, array_like, array_like, array_like, array_like, array_like
pyLIMA.microlcaustics.find_area_of_interest_around_caustics(caustics, secure_factor=0.1)[source]

Find a box around the caustic, the are of interest.

Parameters:
  • caustics (list) – a list containing all array_like of caustics
  • secure_factor (float) – an extra limit around the box, in Einstein ring unit
Returns:

the are of interest, a list containin x limits, y limits and x,y center

Return type:

list

pyLIMA.microlcaustics.find_2_lenses_caustic_regime(separation, mass_ratio)[source]
Find the caustic regime.
“An alternative parameterisation for binary-lens caustic-crossing events” Cassan A.2008 http://adsabs.harvard.edu/abs/2008A%26A…491..587C “Speeding up Low-mass Planetary Microlensing Simulations and Modeling: The Caustic Region Of INfluence” Penny M.2014 http://adsabs.harvard.edu/abs/2014ApJ…790..142P
Parameters:
  • separation (float) – the projected normalised angular distance between the two bodies
  • mass_ratio (float) – the mass ratio of the two bodies
Returns:

caustic_regime: close, wide or resonant

Return type:

str

pyLIMA.microlcaustics.change_source_trajectory_center_to_central_caustics_center(separation, mass_ratio)[source]
Define a new geometric center, on the central caustic
resonant : (0,0) close : (x_central_caustic,0) wide : (x_central_caustic, 0)

“Speeding up Low-mass Planetary Microlensing Simulations and Modeling: The Caustic Region Of INfluence” Penny M.2014 http://adsabs.harvard.edu/abs/2014ApJ…790..142P “Microlensing observations rapid search for exoplanets: MORSE code for GPUs” McDougall A. and Albrow M. http://adsabs.harvard.edu/abs/2016MNRAS.456..565M

Parameters:
  • separation (float) – the projected normalised angular distance between the two bodies
  • mass_ratio (float) – the mass ratio of the two bodies
Returns:

x_center, y_center : the new system center

Return type:

str

pyLIMA.microlcaustics.change_source_trajectory_center_to_planetary_caustics_center(separation, mass_ratio)[source]
Define a new geometric center depending of the caustic regime. This helps fit convergence sometimes:
resonant : (0,0) close : (x_planetary_caustic, y_planetary_caustic) wide : (x_planetary_caustic, y_planetary_caustic)

“Speeding up Low-mass Planetary Microlensing Simulations and Modeling: The Caustic Region Of INfluence” Penny M.2014 http://adsabs.harvard.edu/abs/2014ApJ…790..142P “Microlensing observations rapid search for exoplanets: MORSE code for GPUs” McDougall A. and Albrow M. http://adsabs.harvard.edu/abs/2016MNRAS.456..565M

Parameters:
  • separation (float) – the projected normalised angular distance between the two bodies
  • mass_ratio (float) – the mass ratio of the two bodies
Returns:

x_center, y_center : the new system center

Return type:

str

pyLIMA.microlcaustics.dx(function, x, args)[source]
pyLIMA.microlcaustics.newtons_method(function, jaco, x0, args=None, e=10**(-10))[source]
pyLIMA.microlcaustics.foo(x, pp1, pp2, pp3, pp4, pp5)[source]
pyLIMA.microlcaustics.foo2(X, pp1, pp2, pp3, pp4, pp5)[source]
pyLIMA.microlcaustics.jaco(x, pp1, pp2, pp3, pp4, pp5)[source]
pyLIMA.microlcaustics.hessian(x, pp1, pp2, pp3, pp4, pp5)[source]
pyLIMA.microlcaustics.Jacobian(zi, mtot, deltam, z1)[source]
pyLIMA.microlcaustics.find_slices(slice_1, slice_2, points)[source]