Skip to content

Commit

Permalink
commenting parallax and flux unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
rpoleski committed Apr 26, 2018
1 parent febd48d commit 4e5b22c
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions source/MulensModel/tests/test_Event.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,16 +201,15 @@ def test_event_chi2_gradient():
'pi_E_N': -187878.357, 'pi_E_E': 129162.927,
'f_source': -83124.5869, 'f_blend': -78653.242}
test_2 = (parameters_2, params_2, gradient_2)

# We're not applying the test above, yet. See 'for' loop below.

data = MulensData(file_name=SAMPLE_FILE_02)

coords = '17:47:12.25 −21:22:58.7'
for test in [test_1, test_2]:
kwargs = {'datasets': [data], 'coords': '17:47:12.25 −21:22:58.7'}

for test in [test_1]:#, test_2]:
(parameters, params, gradient) = test
event = Event(
datasets=[data], model=Model(parameters), coords=coords)
event = Event(model=Model(parameters), **kwargs)
result = event.chi2_gradient(params, fit_blending=False)

reference = np.array([gradient[key] for key in params])
np.testing.assert_almost_equal(reference/result, 1., decimal=1)

0 comments on commit 4e5b22c

Please sign in to comment.