Skip to content

Commit

Permalink
fixes for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Shahnawaz Ahmed committed May 25, 2016
1 parent 11b2700 commit 951c19f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dipy/reconst/ivim.py
Expand Up @@ -7,7 +7,7 @@
from scipy.optimize import curve_fit

from dipy.core.gradients import gradient_table
from base import ReconstModel
from dipy.reconst.base import ReconstModel
from dipy.reconst.dti import _min_positive_signal


Expand Down
9 changes: 7 additions & 2 deletions dipy/reconst/tests/test_ivim.py
Expand Up @@ -18,6 +18,11 @@
from dipy.data import get_data, dsi_voxels, get_sphere
import dipy.core.gradients as grad
from dipy.sims.voxel import single_tensor
from dipy.io.gradients import read_bvals_bvecs
from dipy.core.gradients import (gradient_table, GradientTable,
gradient_table_from_bvals_bvecs,
reorient_bvecs)
from dipy.sims.voxel import multi_tensor


def test_nlls_fit():
Expand All @@ -39,13 +44,13 @@ def test_nlls_fit():
ivim_model = ivim.IvimModel(gtab)
ivim_fit = ivim_model.fit(data)

S0, f_est, D_star_est, D_est = ivim_fit.model_params
S0_est, f_est, D_star_est, D_est = ivim_fit.model_params
est_signal = ivim.ivim_function(bvals,
S0_est,
f_est,
D_star_est,
D_est)

assert_equal(est_signal.shape, data.shape[:-1])
assert_equal(est_signal.shape, data.shape)
assert_array_almost_equal(est_signal, data)
assert_array_almost_equal(ivim_fit.model_params, [S0, f, D_star, D])

0 comments on commit 951c19f

Please sign in to comment.