From 928de19c99e759f5d049ac60d71dc4f1732f6a4d Mon Sep 17 00:00:00 2001 From: radek_poleski Date: Wed, 26 Oct 2022 15:26:50 +0200 Subject: [PATCH] v2.13 - correcting bug in MagnificationCurve --- source/MulensModel/magnificationcurve.py | 7 ++++--- source/MulensModel/version.py | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/source/MulensModel/magnificationcurve.py b/source/MulensModel/magnificationcurve.py index 5ce8aebf..a020bf04 100644 --- a/source/MulensModel/magnificationcurve.py +++ b/source/MulensModel/magnificationcurve.py @@ -50,7 +50,7 @@ class MagnificationCurve(object): def __init__(self, times, parameters, parallax=None, coords=None, satellite_skycoord=None, gamma=0.): # Set times - self.times = np.asarray(times) + self.times = np.atleast_1d(times) # Check for ModelParameters and set. if isinstance(parameters, ModelParameters): @@ -255,13 +255,14 @@ def get_point_lens_magnification(self): " lenses") pspl_magnification = get_pspl_magnification(self.trajectory) - if self._methods_epochs is None: + methods = np.array(self._methods_for_epochs()) + if np.all(methods == None): return pspl_magnification + point_lens = PointLens(self.parameters) magnification = pspl_magnification u2 = self.trajectory.x**2 + self.trajectory.y**2 u_all = np.sqrt(u2) - methods = np.array(self._methods_for_epochs()) for method in set(methods): kwargs = {} diff --git a/source/MulensModel/version.py b/source/MulensModel/version.py index 95a6d3a7..930e2cd6 100644 --- a/source/MulensModel/version.py +++ b/source/MulensModel/version.py @@ -1 +1 @@ -__version__ = "2.12.0" +__version__ = "2.13.0"