Skip to content

Commit

Permalink
Update triexp_fitting_algorithms.py
Browse files Browse the repository at this point in the history
Similar changes that Daan made to line 107-109
  • Loading branch information
paulienvoorter authored Oct 24, 2024
1 parent a3f8a8f commit 61a0ef3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/original/PV_MUMC/triexp_fitting_algorithms.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,9 @@ def monofit(bvalues, Dpar, Fp):
Dpar1 = params[0]
if IR:
if not fitS0:
bounds = ([bounds[0][1] , bounds[0][2] , bounds[0][3] , bounds[0][4] , bounds[0][5] ],
newbounds = ([bounds[0][1] , bounds[0][2] , bounds[0][3] , bounds[0][4] , bounds[0][5] ],
[Dpar1 , bounds[1][2] , bounds[1][3] , bounds[1][4] , bounds[1][5] ])
params, _ = curve_fit(tri_expN_noS0_IR, bvalues, dw_data, p0=[Dpar1, 0.0, (bounds[0][3]+bounds[1][3])/2, 0.05, (bounds[0][5]+bounds[1][5])/2], bounds=bounds)
params, _ = curve_fit(tri_expN_noS0_IR, bvalues, dw_data, p0=[Dpar1, 0.0, (bounds[0][3]+bounds[1][3])/2, 0.05, (bounds[0][5]+bounds[1][5])/2], bounds=newbounds)
Dpar, Fint, Dint, Fmv, Dmv = params[0], params[1], params[2], params[3], params[4]
#when the fraction of a compartment equals zero (or very very small), the corresponding diffusivity is non-existing (=NaN)

Expand Down

0 comments on commit 61a0ef3

Please sign in to comment.