Skip to content

Releases: rpoleski/MulensModel

version 3.0.0

29 Nov 06:05
Compare
Choose a tag to compare

There were two major goals for MulensModel V3:

  • Allow for N sources (However, xallarap can only be used with binary source models)
  • Allow the user a direct access to partial derivatives of the magnification relative to the point lens model parameters (in addition to chi2 derivatives)

Implementing these changes involved some major updates to the internal
architecture, but these should mostly be invisible to the user (although they
add new functionality).

We have also cleaned up some problems/bugs/features that will impact the user experience:

  • Shifted the convention of alpha by 180 deg to make MM compatible with convention of Skowron et al. 2011.
  • Removing astropy units from microlensing parameters.
  • Generally improving consistency in naming conventions.
  • Deprecated functions and properties removed.

A detailed list of changes follows.

Changes to Major Classes

Event Class

  • REMOVED deprecated functions and attributes:
    • get_ref_fluxes(): REMOVED keywords data_ref and fit_blending.
    • REMOVED keyword fit_blending of methods get_ref_fluxes(), get_chi2(),
      get_chi2_for_dataset(), get_chi2_per_point(), and get_chi2_gradient().
      Use fix_blend_flux instead.
    • reset_best_chi2()
    • best_chi2
    • best_chi2_parameters

Model Class

  • ADDED get_magnification_curve() and get_magnification_curves() (for multi-source models).
  • get_lc(): updated documentation to reflect that this returns MAGNITUDES (not magnifications)
  • get_magnification():
    • REMOVED keyword flux_ratio_constraint
    • default value of separate changed to None (which defaults to True if source_flux_ratio is provided and to False otherwise).
  • REMOVED deprecated functions and attributes:
    • plot_magnification(): REMOVED keyword flux_ratio_constraint.
    • plot_lc(): REMOVED keywords data_ref, flux_ratio_constraint, fit_blending, f_source, and f_blend.
    • plot_trajectory(): REMOVED keyword show_data.
    • set_default_magnification_method(). Use Model.default_magnification_method = XXX, instead.
    • magnification() replaced by get_magnification().
    • reset_plot_properties()

ModelParameters Class

Even if the user was initializing Model with a dict, that dict is
immediately converted into a ModelParameters object, so many of these changes
could affect the user experience, even if they had not been interacting directly
with the ModelParameters class.

  • Astropy units REMOVED (i.e., now everything is a float) from properties: t_star, t_eff, t_E, alpha, ds_dt, dalpha_dt, t_star_1, t_star_2, gamma_parallel, gamma_perp, and gamma. Also REMOVED from function get_alpha().

  • Property pi_E REMOVED. Properties pi_E_E and pi_E_N are still there.

  • Properties that are not defined now raise AttributeError (previously rho was returning None, and some other ones raised KeyError).

  • Warnings for unexpected values of angles (e.g., 1000 deg) are not raised anymore.

  • Changes in default values for t_0_par and t_0_kep:

    • If t_0_par is not defined, then it defaults to t_0_kep, t_0, t_0_1 in that order.
    • If t_0_kep is not defined, then it defaults to t_0_par, t_0, t_0_1 in that order.

Also, REMOVED which_parameters() from modelparameters.py because it not very
useful and it was very complicated.

MulensData Class

  • REMOVED deprecated functions and attributes:
    • coordinates (i.e., coords, ra, dec) are no longer associated with
      MulensData objects.
    • REMOVED model and plot_residuals keywords from plot().

Trajectory Class

ADDED new keyword arguments to __init__: x and y. They can be provided
instead of the times argument.

Changes to Other Classes

FitData Class

  • Now supports fit_fluxes for multiple sources.

  • ADDED:

    • get_d_A_d_rho()
    • magnification_curve and magnification_curves
  • DEPRECATED subclass FSPL_Derivatives. Most its methods are replaced by PointLens class(es)

  • DEPRECATED:

    • get_d_A_d_u_for_PSPL_model()
    • get_d_A_d_u_for_FSPL_model()
    • get_d_A_d_u_for_point_lens_model()

All get_d_A_d_u* and get_d_u_d_params* functions got moved to the
PoinLens*Magnification classes in pointlens.py (see below). If desired, they
could be accessed instead through FitData.magnification_curve.XXX().

  • REMOVED deprecated functions and attributes:
    • In get_residuals, REMOVED type keyword. Use phot_fmt instead.

Point Lens

The PointLens and BinaryLens classes were subdivided into separate classes for
each magnification method.

  • Function get_pspl_magnification() from pointlens.py was removed. Use classes listed in next point instead.
  • Point Lens classes ADDED:
    • PointSourcePointLensMagnification
    • FiniteSourceUniformGould94Magnification
    • FiniteSourceLDYoo04Magnification
    • FiniteSourceUniformWittMao94Magnification
    • FiniteSourceLDWittMao94Magnification
    • FiniteSourceUniformLee09Magnification
    • FiniteSourceLDLee09Magnification
  • PointLensWithShear REPLACED by PointSourcePointLensWithShearMagnification.

Binary Lenses

  • BinaryLens class REMOVED.
  • Binary classes ADDED:
    • BinaryLensPointSourceWM95Magnification
    • BinaryLensPointSourceVBBLMagnification
    • BinaryLensPointSourceMagnification
    • BinaryLensQuadrupoleMagnification
    • BinaryLensHexadecapoleMagnification
    • BinaryLensVBBLMagnification
    • BinaryLensAdaptiveContouringMagnification
    • BinaryLensPointSourceWithShearWM95Magnification
    • BinaryLensPointSourceWithShearVBBLMagnification
  • Caustics REPLACED by CausticsBinary.
  • CausticsWithShear REPLACED by CausticsBinaryWithShear.

Other

  • PointLensFiniteSource REPLACED by B0B1Utils.
  • ADDED EllipUtils.
  • MagnificationCurve:
    • ADDED methods get_d_A_d_params() and get_d_A_d_rho().
    • ADDED property methods_indices.

version 2.24.0

20 May 16:20
d6a1d35
Compare
Choose a tag to compare

Mass ratio q allowed to be greater than 1.

version 2.23.0

04 May 08:09
Compare
Choose a tag to compare

Binary source combined with xallarap - new parameter added: q_source.

version 2.22.0

27 Apr 05:41
249c49f
Compare
Choose a tag to compare

Adding phot_fmt keyword to Model.plot_lc().

version 2.21.0

21 Mar 13:31
cc365ed
Compare
Choose a tag to compare

Corrected VBBL imports. We had suboptimal performance since v2.14.0.
No changes in public API.

version 2.20.0

25 Jan 14:49
Compare
Choose a tag to compare

Minor changes in AdaptiveContouring submodule to simplify Windows installation.

version 2.19.2

21 Dec 11:33
Compare
Choose a tag to compare

Model.get_trajectory() - keyword satellite_skycoord added. Also the documentation of that function was clarified.
Corrected plotting for datasets with negative uncertainties.

version 2.18.0

15 Sep 09:10
Compare
Choose a tag to compare

chi^2 gradient for the finite-source point-lens models. The most changes were in two classes:

  • FitData - added: get_d_A_d_u_for_PSPL_model(), get_d_A_d_rho(), data_magnification, and class FSPL_Derivatives,
  • Model - added: get_magnification_methods(), methods, default_magnification_method (and its .setter), and get_magnification_methods_parameters().

v2.17.0

25 Jul 13:34
Compare
Choose a tag to compare

Xallarap effect added.

v2.16.0

18 May 15:12
Compare
Choose a tag to compare

VBBL updated to 3.5.0 and changes in the way in which shear calculations are performed.