aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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: