Location: Computational analysis of the human sinus node action potential @ cce2f4422134 / Figure01.py

Author:
nima <nafs080@aucklanduni.ac.nz>
Date:
2021-05-05 10:08:43+12:00
Desc:
Run the model for longer time and capture the results at different time in order to make sure the simulation gets to steady state.
Permanent Source URI:
https://staging.physiomeproject.org/workspace/648/rawfile/cce2f4422134edf6acdb765a9cdd9ff5e69b3006/Figure01.py

import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
import sys
#import plot_func
#reload (plot_func)
import os


data = pd.read_csv('Figure01.csv')

X = data[data.keys()[0]]*1000
Y1 = data[data.keys()[1]]
Y2 = data[data.keys()[2]]*1e6


plt.figure(figsize=(10,7))

plt.subplot(2,1,1)
plt.plot(X, Y1, 'navy' ,linestyle='-',  label = '',linewidth=3)


plt.xlim(0, 1600, 1000)
plt.yticks(np.arange(-70, 40, 20))
plt.ylabel ('potential(mV)',fontsize=12)
plt.xlabel ('Time(ms)',fontsize=12)
plt.title('A' ,fontsize=20)
#plt.legend(loc = 'best',fontsize=10)

plt.grid()
plt.subplots_adjust(bottom=0.5, right=0.8, top=1)
plt.tight_layout(pad=0.4, w_pad=0.5, h_pad=1.0)

plt.subplot(2,1,2)
plt.plot(X, Y2, 'navy' ,linestyle='-',  label = '',linewidth=3)

plt.xlim(0, 1600, 1000)
plt.yticks(np.arange(50,300,50))
plt.ylabel ('[Ca$^{2+}$(nM)',fontsize=12)
plt.xlabel ('Time(ms)',fontsize=8)
plt.title('B' ,fontsize=20)
plt.grid()
plt.subplots_adjust(bottom=0.5, right=0.8, top=1)
plt.tight_layout(pad=0.4, w_pad=0.5, h_pad=1.0)

plt.savefig('C:/Nima/ABI/Physiome Journal/sinus/Python_codes/figure01.png')
plt.show()

plt.subplot(6,2,4)
plt.plot(X, Y3, 'navy' ,linestyle='-',  label = '',linewidth=3)

plt.xlim(0, 1600, 1000)
plt.yticks(np.arange(0, 300, 50))
plt.ylabel ('J$_{rel}$(mM/s)',fontsize=12)
# plt.xlabel ('Time(ms)',fontsize=12)
plt.title('B' ,fontsize=20)
plt.grid()
plt.subplots_adjust(bottom=0.5, right=0.8, top=1)
plt.tight_layout(pad=0.4, w_pad=0.5, h_pad=1.0)