Skip to content

Commit 61a0ef3

Browse files
Update triexp_fitting_algorithms.py
Similar changes that Daan made to line 107-109
1 parent a3f8a8f commit 61a0ef3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/original/PV_MUMC/triexp_fitting_algorithms.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,9 @@ def monofit(bvalues, Dpar, Fp):
8888
Dpar1 = params[0]
8989
if IR:
9090
if not fitS0:
91-
bounds = ([bounds[0][1] , bounds[0][2] , bounds[0][3] , bounds[0][4] , bounds[0][5] ],
91+
newbounds = ([bounds[0][1] , bounds[0][2] , bounds[0][3] , bounds[0][4] , bounds[0][5] ],
9292
[Dpar1 , bounds[1][2] , bounds[1][3] , bounds[1][4] , bounds[1][5] ])
93-
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)
93+
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)
9494
Dpar, Fint, Dint, Fmv, Dmv = params[0], params[1], params[2], params[3], params[4]
9595
#when the fraction of a compartment equals zero (or very very small), the corresponding diffusivity is non-existing (=NaN)
9696

0 commit comments

Comments
 (0)