Skip to content

Commit

Permalink
minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
adajel committed Aug 26, 2024
1 parent 05a77ff commit d68f06a
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 27 deletions.
36 changes: 18 additions & 18 deletions emix-simulations/make_figures_calibration.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,14 +308,14 @@ def plot_3D_concentration_neuron(res, T, dt, fname):
plt.title(r'Membrane potential ODE')
plt.plot(phi_M_ODE, linewidth=3)

print("membrane potential", phi_M[-1])
print("membrane potential", phi_M_ODE[-1])
#print("Na_e", Na_e[-1])
#print("Na_i", Na_i[-1])
#print("K_i", K_i[-1])
#print("K_e", K_e[-1])
#print("Cl_i", Cl_i[-1])
#print("Cl_e", Cl_e[-1])
print("membrane potential", phi_M[0], phi_M[-1])
print("membrane potential", phi_M_ODE[0], phi_M_ODE[-1])
print("Na_e", Na_e[0], Na_e[-1])
print("Na_i", Na_i[0], Na_i[-1])
print("K_i", K_i[0], K_i[-1])
print("K_e", K_e[0], K_e[-1])
print("Cl_i", Cl_i[0], Cl_i[-1])
print("Cl_e", Cl_e[0], Cl_e[-1])

# make pretty
ax.axis('off')
Expand Down Expand Up @@ -406,14 +406,14 @@ def plot_3D_concentration_glial(res, T, dt, fname):
plt.title(r'Membrane potential ODE')
plt.plot(phi_M_ODE, linewidth=3)

print("membrane potential", phi_M[-1])
print("membrane potential", phi_M_ODE[-1])
#print("Na_e", Na_e[-1])
#print("Na_i", Na_i[-1])
#print("K_i", K_i[-1])
#print("K_e", K_e[-1])
#print("Cl_i", Cl_i[-1])
#print("Cl_e", Cl_e[-1])
print("membrane potential", phi_M[0], phi_M[-1])
print("membrane potential", phi_M_ODE[0] ,phi_M_ODE[-1])
print("Na_e", Na_e[0], Na_e[-1])
print("Na_i", Na_i[0], Na_i[-1])
print("K_i", K_i[0], K_i[-1])
print("K_e", K_e[0], K_e[-1])
print("Cl_i", Cl_i[0], Cl_i[-1])
print("Cl_e", Cl_e[0], Cl_e[-1])

# make pretty
ax.axis('off')
Expand Down Expand Up @@ -708,15 +708,15 @@ def get_velocity(fname, T, dt):
# create figures
res_3D = '0' # mesh resolution for 3D axon bundle
dt = 0.1
T = 10
T = 2

#fname = 'results/data/calibration_two_tags/results.h5'
fname = 'results/data/two_tags/results.h5'

#plot_surface(fname, T, dt)
plot_3D_concentration_neuron(res_3D, T, dt, fname)
plot_3D_concentration_glial(res_3D, T, dt, fname)
write_to_pvd(dt, T, fname)
#write_to_pvd(dt, T, fname)

#get_velocity(fname, T, dt)
#plot_surface_time(fname, T, dt)
4 changes: 2 additions & 2 deletions emix-simulations/run_EMIx_simulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class bcolors:

# Time variables (PDEs)
dt = 0.1 # global time step (s)
Tstop = 2 # global end time (s)
Tstop = 50 # global end time (s)
t = Constant(0.0) # time constant

# Time variables (ODEs)
Expand Down Expand Up @@ -99,7 +99,7 @@ class bcolors:
ion_list = [K, Cl, Na]

# Membrane parameters
g_syn_bar = 0 # synaptic conductivity (mS/cm**2)
g_syn_bar = 5 # synaptic conductivity (mS/cm**2)

# Set stimulus ODE
stimulus = {'stim_amplitude': g_syn_bar}
Expand Down
3 changes: 0 additions & 3 deletions emix-simulations/run_calibration_ODE.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
import dolfin as df
import numpy as np
import matplotlib.pyplot as plt
#import mm_hh_calibration_ODE as ode
#import mm_glial_calibration_ODE as ode
#import mm_leak_calibration_ODE as ode
import mm_hh_glial_calibration_ODE as ode
from knpemidg.membrane import MembraneModel
from collections import namedtuple
Expand Down
2 changes: 1 addition & 1 deletion emix-simulations/run_calibration_two_tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class bcolors:

# Time variables PDEs
dt = 0.1 # global time step (ms)
Tstop = 10 # global end time (ms)
Tstop = 2 # global end time (ms)
t = Constant(0.0) # time constant

# Time variables ODEs
Expand Down
6 changes: 3 additions & 3 deletions emix-simulations/run_two_tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class bcolors:

# Time variables PDEs
dt = 0.1 # global time step (ms)
Tstop = 10 # global end time (ms)
Tstop = 2 # global end time (ms)
t = Constant(0.0) # time constant

# Time variables ODEs
Expand Down Expand Up @@ -114,8 +114,8 @@ class bcolors:
ion_list = [K, Cl, Na]

# Membrane parameters
g_syn_bar = 5.0 # synaptic conductivity (mS/cm**2)
#g_syn_bar = 0.0 # synaptic conductivity (mS/cm**2)
#g_syn_bar = 5.0 # synaptic conductivity (mS/cm**2)
g_syn_bar = 0.0 # synaptic conductivity (mS/cm**2)

# Set stimulus ODE
stimulus = {'stim_amplitude': g_syn_bar}
Expand Down

0 comments on commit d68f06a

Please sign in to comment.