minor adjustments after trial and error
This commit is contained in:
parent
d76122ee7b
commit
48bd4ffaf2
16
Model.py
16
Model.py
@ -197,13 +197,9 @@ class Model:
|
||||
# Bi = (1 + (self.CMDN_tot * self.Km_CMDN)/(self.Km_CMDN+(Cai))**2)**(-1)
|
||||
# Bss = 1 / ((self.CMDN_tot * self.Km_CMDN) / (self.Km_CMDN + Cass) ** 2)
|
||||
|
||||
Bi = 1 / (
|
||||
1 + (self.CMDN_tot * self.Km_CMDN) / (self.Km_CMDN + Cai) ** 2
|
||||
)
|
||||
Bi = 1 / (1 + (self.CMDN_tot * self.Km_CMDN) / (self.Km_CMDN + Cai) ** 2)
|
||||
|
||||
Bss = 1 / (
|
||||
1 + (self.CMDN_tot * self.Km_CMDN) / (self.Km_CMDN + Cass) ** 2
|
||||
)
|
||||
Bss = 1 / (1 + (self.CMDN_tot * self.Km_CMDN) / (self.Km_CMDN + Cass) ** 2)
|
||||
|
||||
J_xfer = (Cass - Cai) / self.tau_xfer
|
||||
|
||||
@ -216,9 +212,7 @@ class Model:
|
||||
J_trpn = (
|
||||
self.k_htrpn_positive * Cai * (self.HTRPN_tot - HTRPNCa)
|
||||
- self.k_htrpn_negative * HTRPNCa
|
||||
+ self.k_ltrpn_positive
|
||||
* Cai
|
||||
* (self.LTRPN_tot - LTRPNCa)
|
||||
+ self.k_ltrpn_positive * Cai * (self.LTRPN_tot - LTRPNCa)
|
||||
- self.k_ltrpn_negative * LTRPNCa
|
||||
)
|
||||
|
||||
@ -258,9 +252,7 @@ class Model:
|
||||
|
||||
P_C1 = 1 - (P_C2 + P_O1 + P_O2)
|
||||
|
||||
dP_O1dt = (
|
||||
self.k_a_positive * (Cass) ** self.n_ryr * P_C1
|
||||
)
|
||||
dP_O1dt = self.k_a_positive * (Cass) ** self.n_ryr * P_C1
|
||||
-self.k_a_negative * P_O1 - self.k_a_positive * (Cass) ** self.m_ryr * P_O1
|
||||
+self.k_b_negative * P_O2 - self.k_c_positive * P_O1 + self.k_c_negative * P_C2
|
||||
|
||||
|
13
fitter.py
13
fitter.py
@ -25,8 +25,8 @@ class Fitter:
|
||||
self.tspan = [0, 1000]
|
||||
self.dt = 1 # 1.0
|
||||
self.time_points = np.arange(*self.tspan, self.dt)
|
||||
|
||||
model=Model()
|
||||
|
||||
model = Model()
|
||||
self.initial_values = model.get_initial_values()
|
||||
|
||||
self.iteration = 0 # least squares iteration counter
|
||||
@ -61,7 +61,12 @@ class Fitter:
|
||||
model.K_pc_half = K_pc_half
|
||||
model.tau_xfer = tau_xfer
|
||||
|
||||
model.solve(times=self.time_points, tspan=self.tspan, dt=self.dt, initial_values=self.initial_values)
|
||||
model.solve(
|
||||
times=self.time_points,
|
||||
tspan=self.tspan,
|
||||
dt=self.dt,
|
||||
initial_values=self.initial_values,
|
||||
)
|
||||
|
||||
_calc_curr = model.calculated_current()
|
||||
calculated_current = (
|
||||
@ -207,7 +212,7 @@ if __name__ == "__main__":
|
||||
|
||||
eid_cleaned = re.sub(
|
||||
r"[^\w.-]", "", eid
|
||||
) # Eemalda kõik eritähed ja jääb alles alphanumbrilised tähed, sidekriipsud ja punktid
|
||||
) # Eemaldab eritahed
|
||||
fig.savefig(f"plot_{eid_cleaned}.png")
|
||||
fig.savefig(f"plot_{eid_cleaned}.pdf")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user