aboutsummaryrefslogtreecommitdiff
path: root/eitControl.py
diff options
context:
space:
mode:
authorEugeniy E. Mikhailov <evgmik@gmail.com>2021-06-14 22:06:50 -0400
committerEugeniy E. Mikhailov <evgmik@gmail.com>2021-06-14 22:06:50 -0400
commit0a1c9a4d3cc6b6f814fe36019b501fb1c816e57f (patch)
treea27de051096c1ed51344434aa30ea6d7cc2555ab /eitControl.py
parent3f80587fa292636910028a01d72d44cd84680084 (diff)
downloadpyExpControl-0a1c9a4d3cc6b6f814fe36019b501fb1c816e57f.tar.gz
pyExpControl-0a1c9a4d3cc6b6f814fe36019b501fb1c816e57f.zip
added image export
Diffstat (limited to 'eitControl.py')
-rw-r--r--eitControl.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/eitControl.py b/eitControl.py
index 0ea26a7..84864ae 100644
--- a/eitControl.py
+++ b/eitControl.py
@@ -1,6 +1,7 @@
from pyqtgraph.Qt import QtGui, QtCore
import pyqtgraph as pg
from pyqtgraph.dockarea import *
+from pyqtgraph.exporters import ImageExporter
import platform
import argparse
@@ -121,6 +122,14 @@ class Experiment:
except IOError:
print('I/O error')
+ try:
+ ex = ImageExporter(self.channelGraph['adc0'])
+ ex.parameters()['width'] = 800
+ ex.parameters()['height'] = 600
+ ex.export("snapshot.png")
+ except ZeroDivisionError:
+ print("Early version (0.10.0) of PyQtGraph has bug in exporter. The image file is not generated.")
+
def onTic(self,swp=None):
start = datetime.now()
if swp is None: