Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F60499262
plot_batch.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
Tue, Apr 30, 16:23
Size
932 B
Mime Type
text/x-python
Expires
Thu, May 2, 16:23 (2 d)
Engine
blob
Format
Raw Data
Handle
17362067
Attached To
R4670 PySONIC (old)
plot_batch.py
View Options
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Author: Theo Lemaire
# @Date: 2017-03-20 12:19:55
# @Email: theo.lemaire@epfl.ch
# @Last Modified by: Theo Lemaire
# @Last Modified time: 2018-08-21 16:07:30
""" Batch plot profiles of several specific output variables of NICE simulations. """
import
sys
import
logging
from
PySONIC.utils
import
logger
,
OpenFilesDialog
,
InputError
from
PySONIC.plt
import
plotBatch
# Set logging level
logger
.
setLevel
(
logging
.
INFO
)
# Select data files
pkl_filepaths
,
pkl_dir
=
OpenFilesDialog
(
'pkl'
)
if
not
pkl_filepaths
:
logger
.
error
(
'No input file'
)
sys
.
exit
(
1
)
yvars
=
{
'V_m'
:
[
'Vm'
],
'i_{Na}\ kin.'
:
[
'm'
,
'h'
,
'm3h'
,
'n'
],
'i_K\ kin.'
:
[
'n'
],
'i_M\ kin.'
:
[
'p'
]
# 'i_{CaL}\ kin.': ['q', 'r', 'q2r']
}
# Plot profiles
try
:
plotBatch
(
pkl_dir
,
pkl_filepaths
,
title
=
True
,
vars_dict
=
yvars
)
except
InputError
as
err
:
logger
.
error
(
err
)
sys
.
exit
(
1
)
Event Timeline
Log In to Comment