Skip to content

Commit

Permalink
Allow a step kwarg, or using the step assigned in the model, or default.
Browse files Browse the repository at this point in the history
  • Loading branch information
arokem committed Feb 2, 2016
1 parent fc87b90 commit b77a5a4
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions dipy/reconst/dti.py
Expand Up @@ -1133,7 +1133,7 @@ def adc(self, sphere):
"""
return apparent_diffusion_coef(self.quadratic_form, sphere)

def predict(self, gtab, S0=1, step=1e4):
def predict(self, gtab, S0=1, step=None):
r"""
Given a model fit, predict the signal on the vertices of a sphere
Expand Down Expand Up @@ -1164,9 +1164,8 @@ def predict(self, gtab, S0=1, step=1e4):
"""
shape = self.model_params.shape[:-1]
size = np.prod(shape)
step = self.model.kwargs.get('step', size)
#if step == 2:
# 1/0.
if step is None:
step = self.model.kwargs.get('step', size)
if step >= size:
return tensor_prediction(self.model_params[..., 0:12], gtab, S0=S0)
params = np.reshape(self.model_params,
Expand Down

0 comments on commit b77a5a4

Please sign in to comment.