Skip to content

Commit 536b53e

Browse files
author
Dilawar Singh
committed
Construct absolute path relative to script directory.
1 parent f5a7d84 commit 536b53e

1 file changed

Lines changed: 9 additions & 8 deletions

File tree

snippets/multiscaleOneCompt.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
import moose
2121
import proto18
2222

23+
scriptDir = os.path.dirname( os.path.realpath( __file__ ) )
2324
#EREST_ACT = -70e-3
2425

2526
def loadElec():
@@ -34,19 +35,19 @@ def loadElec():
3435
for x in moose.wildcardFind( "/library/##" ):
3536
x.tick = -1
3637
model = moose.Neutral( '/model' )
37-
cellId = moose.loadModel( 'soma.p', '/model/elec', "Neutral" )
38+
cellId = moose.loadModel(
39+
os.path.join( scriptDir, 'soma.p')
40+
, '/model/elec', "Neutral"
41+
)
3842
moose.setCwe( '/' )
39-
'''
40-
hsolve = moose.HSolve( '/model/elec/hsolve' )
41-
hsolve.dt = 50.0e-6
42-
hsolve.target = '/model/elec/soma'
43-
moose.reinit()
44-
'''
4543
return cellId
4644

4745
def loadChem():
4846
chem = moose.Neutral( '/model/chem' )
49-
modelId = moose.loadModel( '../genesis/chanPhosphByCaMKII.g', '/model/chem', 'gsl' )
47+
modelId = moose.loadModel(
48+
os.path.join( scriptDir, '..', 'genesis', 'chanPhosphByCaMKII.g' )
49+
, '/model/chem', 'gsl'
50+
)
5051
nmstoich = moose.element( '/model/chem/kinetics/stoich' )
5152

5253
def makeModel():

0 commit comments

Comments
 (0)