Compare commits
2 Commits
a2bb97fe22
...
06a2b217d4
Author | SHA1 | Date | |
---|---|---|---|
|
06a2b217d4 | ||
|
2a687571c6 |
11
fitter.py
11
fitter.py
@ -100,6 +100,7 @@ class Fitter:
|
|||||||
def optimize(self, init_parameters=None):
|
def optimize(self, init_parameters=None):
|
||||||
t0 = time.time()
|
t0 = time.time()
|
||||||
self.iteration = 0
|
self.iteration = 0
|
||||||
|
|
||||||
if init_parameters is None:
|
if init_parameters is None:
|
||||||
m = self.model()
|
m = self.model()
|
||||||
K_pc_half = m.K_pc_half
|
K_pc_half = m.K_pc_half
|
||||||
@ -118,7 +119,15 @@ class Fitter:
|
|||||||
(10, 100, 100, 100, 10, 10),
|
(10, 100, 100, 100, 10, 10),
|
||||||
)
|
)
|
||||||
|
|
||||||
res = least_squares(self.cost_func, init_parameters, bounds=bounds, xtol=1e-10)
|
res = least_squares(
|
||||||
|
self.cost_func,
|
||||||
|
init_parameters,
|
||||||
|
bounds=bounds,
|
||||||
|
xtol=1e-10,
|
||||||
|
ftol=1e-12,
|
||||||
|
verbose=2,
|
||||||
|
)
|
||||||
|
|
||||||
print()
|
print()
|
||||||
print(" Parameters: [gGaL, ECal, K_pc_half, tau_xfer, tau_RC, offset]")
|
print(" Parameters: [gGaL, ECal, K_pc_half, tau_xfer, tau_RC, offset]")
|
||||||
print(" Initial:", init_parameters.tolist())
|
print(" Initial:", init_parameters.tolist())
|
||||||
|
Loading…
Reference in New Issue
Block a user