Skip to content

Commit

Permalink
swap order of assigning isotropic key
Browse files Browse the repository at this point in the history
  • Loading branch information
josephmje committed Dec 10, 2021
1 parent 4f6633b commit f825a83
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions eddymotion/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import nest_asyncio

import numpy as np
from dipy.core.gradients import gradient_table
from dipy.core.gradients import check_multi_b, gradient_table

nest_asyncio.apply()

Expand Down Expand Up @@ -57,17 +57,15 @@ def init(gtab, model="DTI", **kwargs):
Model = SparseFascicleModel
param = {"solver": "ElasticNet"}

from dipy.core.gradients import check_multi_b
if model.lower() == "gp":
from sklearn.gaussian_process import GaussianProcessRegressor
param = {"solver": GaussianProcessRegressor}

multi_b = check_multi_b(gtab, 2, non_zero=False)
if multi_b:
from dipy.reconst.sfm import ExponentialIsotropicModel
param.update({"isotropic": ExponentialIsotropicModel})

if model.lower() == "gp":
from sklearn.gaussian_process import GaussianProcessRegressor

param = {"solver": GaussianProcessRegressor}

elif model.lower() in ("dti", "dki"):
Model = DTIModel if model.lower() == "dti" else DKIModel

Expand Down

0 comments on commit f825a83

Please sign in to comment.