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 keywordsdata_ref
andfit_blending
.- REMOVED keyword
fit_blending
of methodsget_ref_fluxes()
,get_chi2()
,
get_chi2_for_dataset()
,get_chi2_per_point()
, andget_chi2_gradient()
.
Usefix_blend_flux
instead. reset_best_chi2()
best_chi2
best_chi2_parameters
Model Class
- ADDED
get_magnification_curve()
andget_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 toTrue
ifsource_flux_ratio
is provided and toFalse
otherwise).
- REMOVED keyword
- REMOVED deprecated functions and attributes:
plot_magnification()
: REMOVED keywordflux_ratio_constraint
.plot_lc()
: REMOVED keywordsdata_ref
,flux_ratio_constraint
,fit_blending
,f_source
, andf_blend
.plot_trajectory()
: REMOVED keywordshow_data
.set_default_magnification_method()
. UseModel.default_magnification_method = XXX
, instead.magnification()
replaced byget_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 afloat
) from properties:t_star
,t_eff
,t_E
,alpha
,ds_dt
,dalpha_dt
,t_star_1
,t_star_2
,gamma_parallel
,gamma_perp
, andgamma
. Also REMOVED from functionget_alpha()
. -
Property
pi_E
REMOVED. Propertiespi_E_E
andpi_E_N
are still there. -
Properties that are not defined now raise
AttributeError
(previouslyrho
was returning None, and some other ones raisedKeyError
). -
Warnings for unexpected values of angles (e.g., 1000 deg) are not raised anymore.
-
Changes in default values for
t_0_par
andt_0_kep
:- If
t_0_par
is not defined, then it defaults tot_0_kep
,t_0
,t_0_1
in that order. - If
t_0_kep
is not defined, then it defaults tot_0_par
,t_0
,t_0_1
in that order.
- If
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
andplot_residuals
keywords fromplot()
.
- coordinates (i.e.,
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
andmagnification_curves
-
DEPRECATED subclass
FSPL_Derivatives
. Most its methods are replaced byPointLens
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
, REMOVEDtype
keyword. Usephot_fmt
instead.
- In
Point Lens
The PointLens and BinaryLens classes were subdivided into separate classes for
each magnification method.
- Function
get_pspl_magnification()
frompointlens.py
was removed. Use classes listed in next point instead. - Point Lens classes ADDED:
PointSourcePointLensMagnification
FiniteSourceUniformGould94Magnification
FiniteSourceLDYoo04Magnification
FiniteSourceUniformWittMao94Magnification
FiniteSourceLDWittMao94Magnification
FiniteSourceUniformLee09Magnification
FiniteSourceLDLee09Magnification
PointLensWithShear
REPLACED byPointSourcePointLensWithShearMagnification
.
Binary Lenses
BinaryLens
class REMOVED.- Binary classes ADDED:
BinaryLensPointSourceWM95Magnification
BinaryLensPointSourceVBBLMagnification
BinaryLensPointSourceMagnification
BinaryLensQuadrupoleMagnification
BinaryLensHexadecapoleMagnification
BinaryLensVBBLMagnification
BinaryLensAdaptiveContouringMagnification
BinaryLensPointSourceWithShearWM95Magnification
BinaryLensPointSourceWithShearVBBLMagnification
Caustics
REPLACED byCausticsBinary
.CausticsWithShear
REPLACED byCausticsBinaryWithShear
.
Other
PointLensFiniteSource
REPLACED byB0B1Utils
.- ADDED
EllipUtils
. MagnificationCurve
:- ADDED methods
get_d_A_d_params()
andget_d_A_d_rho()
. - ADDED property
methods_indices
.
- ADDED methods