Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F60269944
run_vclamp.py
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sun, Apr 28, 19:26
Size
1 KB
Mime Type
text/x-python
Expires
Tue, Apr 30, 19:26 (2 d)
Engine
blob
Format
Raw Data
Handle
17296539
Attached To
R4670 PySONIC (old)
run_vclamp.py
View Options
# -*- coding: utf-8 -*-
# @Author: Theo Lemaire
# @Email: theo.lemaire@epfl.ch
# @Date: 2019-08-14 11:56:38
# @Last Modified by: Theo Lemaire
# @Last Modified time: 2019-09-17 17:06:04
from
PySONIC.core
import
Batch
,
VoltageClamp
from
PySONIC.utils
import
logger
from
PySONIC.parsers
import
VClampParser
def
main
():
# Parse command line arguments
parser
=
VClampParser
()
args
=
parser
.
parse
()
logger
.
setLevel
(
args
[
'loglevel'
])
# Run E-STIM batch
logger
.
info
(
"Starting V-clamp simulation batch"
)
queue
=
VoltageClamp
.
simQueue
(
*
parser
.
parseSimInputs
(
args
),
outputdir
=
args
[
'outputdir'
],
overwrite
=
args
[
'overwrite'
])
output
=
[]
for
pneuron
in
args
[
'neuron'
]:
vlcamp
=
VoltageClamp
(
pneuron
)
batch
=
Batch
(
vlcamp
.
simAndSave
if
args
[
'save'
]
else
vlcamp
.
simulate
,
queue
)
output
+=
batch
(
mpi
=
args
[
'mpi'
],
loglevel
=
args
[
'loglevel'
])
# Plot resulting profiles
if
args
[
'plot'
]
is
not
None
:
parser
.
parsePlot
(
args
,
output
)
if
__name__
==
'__main__'
:
main
()
Event Timeline
Log In to Comment