Location: Modeling the Recruitment and Synchronization of SMCs (Koenigsberger et al. 2004) @ eb9b6ae06871 / Simulation / src / simFig2_2.py

Author:
WeiweiAi <wai484@aucklanduni.ac.nz>
Date:
2022-06-15 11:08:09+12:00
Desc:
Include simFig3
Permanent Source URI:
https://models.cellml.org/workspace/874/rawfile/eb9b6ae068716f451953bd5900bcfdaa5761b0cf/Simulation/src/simFig2_2.py

# importing modules
import sys as sys
import os 
import numpy

# Getting the name of the directory where this file is present.
current = os.path.dirname(os.path.realpath(__file__))  # src
# Getting the parent directory name where the current directory is present.
parent = os.path.dirname(current) # Simulation
# Getting the grandparent directory name
gparent = os.path.dirname(parent) # RecruitmentSynchronization_SMCs
# The path where the simExp.py is saved
mpath = gparent + '\\cellLib\\Scripts'
# appending a path
sys.path.append(mpath)
import simExpNrst
# The simulation .sedml file
simfile = gparent+'\\Experiments\\SMC_KCl_noise.sedml'
# Set the parameters for simulation
start, ending, pointInterval = 0, 150, 0.01
mu, sigma = 0, 0.002 # mean and standard deviation
s = numpy.random.normal(mu, sigma, size=(4, 15000))
g_Ca,g_Cl,g_Ki,g_NCX=0.00129,0.00134,0.00446,0.00316
savefiles=[parent+'\\simulatedData\\simFig2_b'+'_'+str(sigma)]
varSet = {'free_para/E':{'constants':0},'free_para/J_PLCagonisti':{'constants':0.06}}
varLoop = {'noise_G/G_Ca':{'constants':g_Ca+s[0,:]},'noise_G/G_Cl':{'constants':g_Cl+s[1,:]},
'noise_G/G_Ki':{'constants':g_Ki+s[2,:]},
'noise_G/G_NCX':{'constants':g_NCX+s[3,:]}}
varSave = {'t':{'voi':False},'output/c_i':{'states':False},'output/s_i':{'states':False},'output/v_i':{'states':False},'output/I_i':{'states':False},'output/w_i':{'states':False}}
simExpNrst.simExp(simfile, savefiles,start, ending, pointInterval,varSet,varLoop,varSave)
savefiles=[parent+'\\simulatedData\\simFig2_c'+'_'+str(sigma)]
varSet = {'free_para/E':{'constants':0},'free_para/J_PLCagonisti':{'constants':0.08}}
simExpNrst.simExp(simfile, savefiles,start, ending, pointInterval,varSet,varLoop,varSave)
savefiles=[parent+'\\simulatedData\\simFig2_d'+'_'+str(sigma)]
varSet = {'free_para/E':{'constants':0},'free_para/J_PLCagonisti':{'constants':0.165}}
simExpNrst.simExp(simfile, savefiles,start, ending, pointInterval,varSet,varLoop,varSave)