Skip to content

Commit

Permalink
test on binary mag. for s of int type
Browse files Browse the repository at this point in the history
  • Loading branch information
rpoleski committed Jan 17, 2025
1 parent d68665b commit 2a813b0
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions source/MulensModel/tests/test_BinaryLens.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,24 @@ def test_gamma_10_quad(self):
self._test_gamma_quad(1.0, self.reference_10[1])


def test_int_input():
"""
Check binary lens calculation with s of int type.
"""
arg_1 = [0.001, 0.001]
arg_2 = {'s': 1., 'q': 0.1}
trajectory_1 = make_trajectory(arg_1, arg_2)
lens_1 = mm.BinaryLensPointSourceMagnification(trajectory=trajectory_1)
result_1 = lens_1.get_magnification()

arg_2['s'] = int(arg_2['s'])
trajectory_2 = make_trajectory(arg_1, arg_2)
lens_2 = mm.BinaryLensPointSourceMagnification(trajectory=trajectory_2)
result_2 = lens_2.get_magnification()

assert result_1 == result_2


def test_BinaryLensVBBLMagnification_1():
"""
check basic magnification calculation using VBBL
Expand Down

0 comments on commit 2a813b0

Please sign in to comment.