From 47677f3052a42c9c7895c5634c5f94d0bb20aa8b Mon Sep 17 00:00:00 2001 From: Michael Joseph Date: Fri, 10 Dec 2021 11:05:51 -0500 Subject: [PATCH] add ExponentialIsotropicModel if multi-shell --- eddymotion/model.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/eddymotion/model.py b/eddymotion/model.py index 27a9e310..7599b60b 100644 --- a/eddymotion/model.py +++ b/eddymotion/model.py @@ -55,10 +55,14 @@ def init(gtab, model="DTI", **kwargs): elif model.lower() in ("sfm", "gp"): Model = SparseFascicleModel - param = { - "solver": "ElasticNet", - "isotropic": ExponentialIsotropicModel, - } + param = {"solver": "ElasticNet"} + + from dipy.core.gradients import check_multi_b + multi_b = check_multi_b(gtab, 2, non_zero=False) + if multi_b: + from dipy.reconst.sfm import ExponentialIsotropicModel + param["isotropic"].append(ExponentialIsotropicModel) + if model.lower() == "gp": from sklearn.gaussian_process import GaussianProcessRegressor