Skip to content

Commit

Permalink
Fixing tests (change to default for P92 FUV lambda caused changes to …
Browse files Browse the repository at this point in the history
…fit results)
  • Loading branch information
karllark committed Jan 13, 2018
1 parent be4846d commit b48a3f5
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
14 changes: 7 additions & 7 deletions dust_extinction/tests/test_axavtoexv.py
Expand Up @@ -52,12 +52,12 @@ def test_AxAvtoExv_with_P92_fitting():

fit_vals = p92_fit._parameters

good_vals = [220.806743348, 0.0474488526572, 88.4203515994, 2.0,
17.0089730125, 0.0729612929387, 1.38876455935, 5.63200040759,
0.052051591862, 0.218617616831, -1.95160129592, 2.0,
0.0, 7.0, -278.831631235, 2.0,
0.0, 21.0, -6617.22039032, 2.0,
0.0, 30.0, -4992.15823779, 2.0,
1.29867067922]
good_vals = [218.353426543, 0.0483364461588, 90.1590593157, 2.0,
19.3315222458, 0.0672874204509, 0.777521482345, 5.05521692376,
0.0550781710089, 0.218663831017, -1.94939455863, 2.0,
0.0, 13.0, 29.389593976, 2.0,
0.0, 21.0, 927.437855498, 2.0,
0.0, 30.0, 777.989416796, 2.0,
1.3044133337]

np.testing.assert_allclose(good_vals, fit_vals)
14 changes: 7 additions & 7 deletions dust_extinction/tests/test_p92.py
Expand Up @@ -63,7 +63,7 @@ def test_extinction_P92_values():
tmodel = P92()

# test
np.testing.assert_allclose(tmodel(x), cor_vals, rtol=0.1, atol=0.01)
np.testing.assert_allclose(tmodel(x), cor_vals, rtol=0.25, atol=0.01)


def test_P92_fitting():
Expand All @@ -82,11 +82,11 @@ def test_P92_fitting():

fit_vals = p92_fit._parameters

good_vals = [222.820720554, 0.0468116978742, 87.5683270158, 2.0,
18.1622695074, 0.0770527204445, 2.83090815471, 6.40496987921,
0.0518566585953, 0.218641802256, -1.95087797308, 2.0,
0.00600017900912, 13.0, 109.369888618, 2.0,
0.09441454528, 15.0, -251.33735749, 2.0,
0.189219789029, 20.0, -1130.90875587, 2.0]
good_vals = [218.957451206, 0.0481323587043, 89.8639079339, 2.0,
19.8918861271, 0.0674934514694, 0.919702726068, 5.1217891448,
0.0548568919776, 0.218664938289, -1.9496661308, 2.0,
0.0, 13.0, 38.279150331, 2.0,
0.0, 15.0, -76.7467816812, 2.0,
0.0, 20.0, -2508.60124085, 2.0]

np.testing.assert_allclose(good_vals, fit_vals)

0 comments on commit b48a3f5

Please sign in to comment.