diff --git a/dust_extinction/shapes.py b/dust_extinction/shapes.py index 562999f..35229ce 100644 --- a/dust_extinction/shapes.py +++ b/dust_extinction/shapes.py @@ -121,8 +121,7 @@ def _curve_F99_method( spline_x = np.concatenate([x_splineval_optir, x_splineval_uv]) spline_y = np.concatenate([y_splineval_optir, y_splineval_uv]) - spline_rep = interpolate.splrep(spline_x, spline_y) - axav[indxs_opir] = interpolate.splev(x[indxs_opir], spline_rep, der=0) + axav[indxs_opir] = interpolate.CubicSpline(spline_x, spline_y, bc_type='natural')(x[indxs_opir]) # return A(x)/A(V) return axav diff --git a/dust_extinction/tests/test_corvals.py b/dust_extinction/tests/test_corvals.py index 0c29e4b..e11e0e4 100644 --- a/dust_extinction/tests/test_corvals.py +++ b/dust_extinction/tests/test_corvals.py @@ -57,7 +57,7 @@ "Rv": 3.1, "x_values": [0.377, 0.820, 1.667, 1.828, 2.141, 2.433, 3.704, 3.846], "y_values": np.array([0.185, 0.772, 2.688, 3.055, 3.805, 4.315, 6.456, 6.781]) / 3.1, - "atol": 1e-3, + "atol": 4e-3, # from Fitzpatrick (1999) Table 3 # keep optical from Fitzpatrick (1999), # replce NIR with Fitzpatrick (2004) function for Rv=3.1: