Skip to content

Commit

Permalink
f_guess = 1 - S/S_
Browse files Browse the repository at this point in the history
  • Loading branch information
quantshah committed Jun 15, 2016
1 parent 27bb444 commit f8a89a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dipy/reconst/ivim.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ def two_stage(data, gtab, x0,
# The guess for f is given by 1 - S0/C, where S0 is the data(b = 0) value

C = data[..., gtab.bvals == split_b][0] - D_guess * split_b
f_guess = data[..., 0] / C
f_guess = 1.0 - data[..., 0] / C

This comment has been minimized.

Copy link
@etpeterson

etpeterson Jun 16, 2016

Contributor

I think you need to have it 1-C/data[...,0] because C (intercept of the diffusion only) is < data[...,0](intercept of the perfusion+diffusion).

Also, does the normal DTI fit not potentially return an intercept? The way you're calculating C seems a little fishy although maybe that's because I haven't digested it fully yet.

This comment has been minimized.

Copy link
@arokem

arokem Jun 16, 2016

Contributor

The DTI fit will return an intercept once #1036 gets merged. For the time being, the equation to calculate the intercept from a DTI model is in that PR.

x0[..., 1] = f_guess

return one_stage(data, gtab, x0, jac, bounds, tol, routine, algorithm,
Expand Down

0 comments on commit f8a89a4

Please sign in to comment.