Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F62555932
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
Mon, May 13, 23:55
Size
870 B
Mime Type
text/x-python
Expires
Wed, May 15, 23:55 (2 d)
Engine
blob
Format
Raw Data
Handle
17662472
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-09-24 23:52:19
""" Batch plot profiles of several specific output variables of NICE simulations. """
import
logging
from
PySONIC.utils
import
logger
,
OpenFilesDialog
from
PySONIC.plt
import
plotBatch
# Set logging level
logger
.
setLevel
(
logging
.
INFO
)
defaults
=
dict
(
V_m
=
[
'Vm'
],
Q_m
=
[
'Qm'
]
)
def
main
():
# Select data files
pkl_filepaths
,
pkl_dir
=
OpenFilesDialog
(
'pkl'
)
if
not
pkl_filepaths
:
logger
.
error
(
'No input file'
)
return
# Plot profiles
try
:
plotBatch
(
pkl_dir
,
pkl_filepaths
,
title
=
True
,
vars_dict
=
defaults
)
except
Exception
as
err
:
logger
.
error
(
err
)
if
__name__
==
'__main__'
:
main
()
Event Timeline
Log In to Comment