From df8c89c8e34bd309ecf696be6d501fd1e24b6214 Mon Sep 17 00:00:00 2001 From: ralf Date: Mon, 15 Jul 2024 13:55:55 +0300 Subject: [PATCH] Defined new func in Model to import variables into fitter.py yet the issue of correct importing still presists --- Model.py | 24 ++++++++++++++++++++++++ __pycache__/Model.cpython-311.pyc | Bin 14548 -> 15014 bytes fitter.py | 2 +- 3 files changed, 25 insertions(+), 1 deletion(-) diff --git a/Model.py b/Model.py index d14e346..83cf8a2 100644 --- a/Model.py +++ b/Model.py @@ -332,6 +332,30 @@ class Model: n = (t // self.period) * self.period return v1 if t0 + n <= t < t1 + n else self.V_mem_rest + def get_initial_values(self): + Cai_0 = 0.11712 # Cai + FCa_0 = (self.k_on * self.F_tot * Cai_0) / (self.k_on * Cai_0 + self.k_off) + return [ + Cai_0, # Cass + 0.930308e-18, # Os, + 0.124216e-3, # C2, + 0.578679e-8, # C3, + 0.119816e-12, # C4, + 0.497923e-18, # I1, + 0.345847e-13, # I2, + 0.185106e-13, # I3, + 11.2684, # LTRPNCa, + 125.290, # HTRPNCa + 1299.50, # Ca_NSR + 1299.50, # Ca_JSR + 0.0, # P_RyR + 0.149102e-4, # P_O1 + 0.951726e-10, # P_02 + 0.167740e-3, # P_C2 + Cai_0, # Cai + FCa_0, # FCa + ] + def solve(self, initial_values, tspan, dt, times): times = np.arange(*tspan, dt) diff --git a/__pycache__/Model.cpython-311.pyc b/__pycache__/Model.cpython-311.pyc index 36fb931b1698b115f6b0d8cfaed7b529f03757e4..39086a8572cc195ebe5dee14b6b27cab11edc265 100644 GIT binary patch delta 855 zcmcaoxU7_KIWI340}#~ypOR*0vypEKBcsmb#f<7)EeuiYDQv+En(Uj;F~+FMGlEn> zfe?^p2I9{ZKw>&W3S%wfWN9Xu`WnV6RtAO|hAgN$AR8va1QV(PGOD|Q@Rk)1pN{#m(mmexIa$G=6R2Uv4viRvhDM4 z)&VVorQnVoqslag~H`eoAVN9;S>xFr15Xf!Z1vZU~5Xu-*_9ogz6S zWKPsYLG=}?7X|e`H-m#zZfgfR5)QUnaxZ)qi8Nj;XDvA zA4Dtw5eq@YA`r0{L@WUjOF_gk5V0IYtN;-!LBuK$u^L2hf(UjXp~+Ho9mKu?B5s0+ zTaz!E=`x<5{NK#j{4r4A7Hcjjq>I*oBvIq8Xf0U2peQr11Y!)tf0J{~B^cjMZZnTI Yh+tzB{=k5p{0J8Rf-GA$S&go3Aj&sBYHKT*A)w9HfY0 z@;QU`j7gj84CR;@{Ws4wKF-X@J~`FgMEL?xvS=BI@CFf{Ac7S}a03~|5t9#^yG$0b z(5_GCP}tfz`S)J?^k0E3F^-ysHtEfJ+XDW(E7+&o_|BTL#RVdr0f3p@c3A`?1o32sUvopI>%_05pSB;qdpm>LLphXM}ep4KZ zmH_E=R<0c$w_M)arC)e_P(@esmTkJglSc~_v;U~t7jXg=6tM#dO_rjgAoej3aU4XP zn7rIVmvQgps}{!A7l8t|Sab7JQgd#xIwxkv8x&c9)R=<^OR%Jyb7H)~E!Kjf%)Ana nQINoxY;P&Scz1GyWwe0<8>8?C2JGZVu=p2bS+~iLEe`_#7BGIs diff --git a/fitter.py b/fitter.py index 3b1f4c7..61a7da6 100644 --- a/fitter.py +++ b/fitter.py @@ -23,7 +23,7 @@ class Fitter: self.fit_results = {} self.tspan = [0, 1000] - self.initial_values=[] + self.initial_values = self.model.get_initial_values(self) self.dt = 1 # 1.0 self.time_points = np.arange(*self.tspan, self.dt)