pvplot 0.6.0__tar.gz → 0.6.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. {pvplot-0.6.0 → pvplot-0.6.1}/PKG-INFO +1 -1
  2. {pvplot-0.6.0 → pvplot-0.6.1}/pvplot/__main__.py +12 -23
  3. {pvplot-0.6.0 → pvplot-0.6.1}/pvplot/pvplot.py +20 -17
  4. {pvplot-0.6.0 → pvplot-0.6.1}/pyproject.toml +1 -1
  5. {pvplot-0.6.0 → pvplot-0.6.1}/LICENSE +0 -0
  6. {pvplot-0.6.0 → pvplot-0.6.1}/README.md +0 -0
  7. {pvplot-0.6.0 → pvplot-0.6.1}/cad_epics/__init__.py +0 -0
  8. {pvplot-0.6.0 → pvplot-0.6.1}/cad_epics/epics.py +0 -0
  9. {pvplot-0.6.0 → pvplot-0.6.1}/fallback/__main__.py +0 -0
  10. {pvplot-0.6.0 → pvplot-0.6.1}/ln/liteaccess/.__init__.py.swp +0 -0
  11. {pvplot-0.6.0 → pvplot-0.6.1}/ln/liteaccess/__init__.py +0 -0
  12. {pvplot-0.6.0 → pvplot-0.6.1}/ln/liteaccess/liteCNS.py +0 -0
  13. {pvplot-0.6.0 → pvplot-0.6.1}/ln/liteaccess/liteaccess.py +0 -0
  14. {pvplot-0.6.0 → pvplot-0.6.1}/ln/liteserver/__init__.py +0 -0
  15. {pvplot-0.6.0 → pvplot-0.6.1}/ln/liteserver/device/__init__.py +0 -0
  16. {pvplot-0.6.0 → pvplot-0.6.1}/ln/liteserver/device/helpers.py +0 -0
  17. {pvplot-0.6.0 → pvplot-0.6.1}/ln/liteserver/device/i2c.py +0 -0
  18. {pvplot-0.6.0 → pvplot-0.6.1}/ln/liteserver/device/liteCNSserver.py +0 -0
  19. {pvplot-0.6.0 → pvplot-0.6.1}/ln/liteserver/device/liteGQ.py +0 -0
  20. {pvplot-0.6.0 → pvplot-0.6.1}/ln/liteserver/device/liteLabjack.py +0 -0
  21. {pvplot-0.6.0 → pvplot-0.6.1}/ln/liteserver/device/liteMCUFEC.py +0 -0
  22. {pvplot-0.6.0 → pvplot-0.6.1}/ln/liteserver/device/litePeakSimulator.py +0 -0
  23. {pvplot-0.6.0 → pvplot-0.6.1}/ln/liteserver/device/liteScaler.py +0 -0
  24. {pvplot-0.6.0 → pvplot-0.6.1}/ln/liteserver/device/liteUSBCam.py +0 -0
  25. {pvplot-0.6.0 → pvplot-0.6.1}/ln/liteserver/device/liteUvcCam.py +0 -0
  26. {pvplot-0.6.0 → pvplot-0.6.1}/ln/liteserver/device/liteVGM.py +0 -0
  27. {pvplot-0.6.0 → pvplot-0.6.1}/ln/liteserver/device/liteWLM.py +0 -0
  28. {pvplot-0.6.0 → pvplot-0.6.1}/ln/liteserver/device/senstation.py +0 -0
  29. {pvplot-0.6.0 → pvplot-0.6.1}/ln/liteserver/liteAccess.py +0 -0
  30. {pvplot-0.6.0 → pvplot-0.6.1}/ln/liteserver/liteCNS.py +0 -0
  31. {pvplot-0.6.0 → pvplot-0.6.1}/ln/liteserver/liteserver.py +0 -0
  32. {pvplot-0.6.0 → pvplot-0.6.1}/pvplot/__init__.py +0 -0
  33. {pvplot-0.6.0 → pvplot-0.6.1}/tmp.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pvplot
3
- Version: 0.6.0
3
+ Version: 0.6.1
4
4
  Summary: Plotting tool for EPICS PVs, ADO and LITE parameters
5
5
  Project-URL: Homepage, https://github.com/ASukhanov/pvplot
6
6
  Project-URL: Bug Tracker, https://github.com/ASukhanov/pvplot/issues
@@ -1,30 +1,21 @@
1
1
  #!/usr/bin/env python3
2
- """Plotting tool for EPICS PVs, ADO and LITE parameters.
2
+ """Dynamic plotting tool for control system frameworks.
3
+ Frameworks supported: EPICS, ADO, LiteServer.
4
+ The framework is distinguished by adding a prefix to Process Variable names:
5
+ 'E:' - for EPICS, 'L:" - for LiteServer.
3
6
  """
4
7
  import sys,os
5
8
  from . import pvplot
6
9
 
7
- """ Zooming does not work
8
- # The --zoom should be handled prior to QtWidgets.PVPlot.qApplication
9
- for i,argv in enumerate(sys.argv):
10
- if argv.startswith('-z'):
11
- zoom = argv[2:]
12
- if zoom == '':
13
- zoom = sys.argv[i+1]
14
- print(f'zoom: `{zoom}`')
15
- os.environ["QT_SCALE_FACTOR"] = zoom
16
- break
17
- """
18
-
19
10
  def main():
20
11
  import argparse
21
12
  global pargs
22
13
  parser = argparse.ArgumentParser(description=__doc__
23
14
  ,formatter_class=argparse.ArgumentDefaultsHelpFormatter
24
15
  ,epilog=(f'pvplot: {pvplot.__version__}'))
25
- parser.add_argument('-a', '--ado', default='', help=\
16
+ parser.add_argument('-a', '--ado', default='L:localhost:dev1', help=\
26
17
  'Default Device/ADO name. Useful for plotting parameters from single device.')
27
- parser.add_argument('-s', '--sleepTime', type=float, default=1,
18
+ parser.add_argument('-s', '--sleepTime', type=float, default=0.1,
28
19
  help='sleep time between data delivery [s]')
29
20
  parser.add_argument('-v', '--verbose', nargs='*', help=\
30
21
  'Show more log messages (-vv: show even more).')
@@ -36,16 +27,14 @@ def main():
36
27
  'Parameter, which provides dynamic scale for Y-axis')
37
28
  parser.add_argument('-Y', '--yrange', help=\
38
29
  'Fixed range of Y axis, e.g: -y1000:4095')
39
- #parser.add_argument('-z', '--zoomin', help=\
40
- # 'Zoom the application window by a factor')
30
+ parser.add_argument('-z', '--zoomin', type=float, default=1., help=\
31
+ 'Zoom the application window by a factor')
41
32
  parser.add_argument('-#','--dock', action='append', nargs='*',
42
33
  help='''plot the ADO parameter in a specified dock, i.e: to plot the
43
34
  scrolling plot in dock#1 and correlation plot in dock#2:
44
- -#0simple.test:sinM -#1simple.test:degM,simple.test:sinM ''')
45
- parser.add_argument('parms', nargs = '?',#nargs='*',
46
- default='simple.test:sinM am_simple.0:sinM simple.test:degM',
47
- help='''String with space-separated parameters, e.g.
48
- 'simple.test:sinM am_simple.0:sinM simple.test:degM' ''')
35
+ -#0yMax -#1yMin''')
36
+ parser.add_argument('parms', nargs = '?', default='yMax yMin',
37
+ help='''For stripchart: space-separated list, for correlation plot: comma-separated list of PVs.''')
49
38
  pargs = parser.parse_args()
50
39
  PVPlot = pvplot.PVPlot
51
40
  PVPlot.pargs = pargs
@@ -53,7 +42,7 @@ def main():
53
42
  if pargs.ado != '':
54
43
  pargs.ado += ':'
55
44
 
56
- #``````````````arrange keyboard interrupt to kill the program
45
+ #``````````````arrange keyboard interrupt to kill the program from terminal.
57
46
  import signal
58
47
  signal.signal(signal.SIGINT, signal.SIG_DFL)
59
48
 
@@ -1,14 +1,14 @@
1
1
  #!/usr/bin/env python3
2
2
  """Plotting package for EPICS PVs, ADO and LITE parameters.
3
3
  """
4
- __version__ = 'v0.6.0 2023-08-26'# pvplot module separated from __main__
4
+ __version__ = 'v0.6.1 2023-08-27'# pargs.zoomin is supported
5
5
 
6
6
  #TODO: add_curves is not correct for multiple curves
7
7
  #TODO: move Add Dataset to Dataset options
8
8
  #TODO: if docks are stripcharts then zooming should be synchronized
9
9
  #TODO: add dataset arithmetics
10
10
 
11
- import sys, time
11
+ import sys, os, time
12
12
  timer = time.perf_counter
13
13
  import numpy as np
14
14
  from qtpy import QtWidgets as QW, QtGui, QtCore
@@ -770,26 +770,29 @@ class PVPlot():
770
770
  mapOfDocks = {}
771
771
  mapOfPlotWidgets = {}
772
772
  padding = 0.1
773
- qApp = QApplication([])
774
-
775
- qTimer = QtCore.QTimer()
776
- qWin = QMainWindow()
777
- dockArea = dockarea.DockArea()
778
- qWin.setCentralWidget(dockArea)
779
- qWin.resize(1000,500)
780
- ## Switch to using white background and black foreground
781
- pg.setConfigOption('background', 'w')
782
- pg.setConfigOption('foreground', 'k')
783
-
784
773
  scaleUnits = [[1,'Sample'],[1,'Count']]
785
774
  subscribedParMap = {}
786
- # temporary globals
787
775
  perfmon = False # option for performance monitoring
788
776
  legend = {}# unfortunately we have to keep track of legends
789
777
  access = {'E:':(EPICSAccess,2), 'L:':(LITEAccess,2)}
778
+ qWin = None
779
+ dockArea = None
790
780
 
791
781
  def start():
792
782
  pargs = PVPlot.pargs
783
+
784
+ try: os.environ["QT_SCALE_FACTOR"] = str(pargs.zoomin)
785
+ except: pass
786
+ qApp = QApplication([])
787
+ qTimer = QtCore.QTimer()
788
+ PVPlot.qWin = QMainWindow()
789
+ PVPlot.dockArea = dockarea.DockArea()
790
+ PVPlot.qWin.setCentralWidget(PVPlot.dockArea)
791
+ PVPlot.qWin.resize(1000,500)
792
+ ## Switch to using white background and black foreground
793
+ pg.setConfigOption('background', 'w')
794
+ pg.setConfigOption('foreground', 'k')
795
+
793
796
  PVPlot.qWin.setWindowTitle(f'pvplot {pargs.parms}')
794
797
 
795
798
  # plots for other docks
@@ -821,13 +824,13 @@ class PVPlot():
821
824
  update_data()
822
825
 
823
826
  ## Start a timer to rapidly update the plot in pw
824
- PVPlot.qTimer.timeout.connect(update_data)
825
- PVPlot.qTimer.start(int(pargs.sleepTime*1000))
827
+ qTimer.timeout.connect(update_data)
828
+ qTimer.start(int(pargs.sleepTime*1000))
826
829
 
827
830
  PVPlot.qWin.show()
828
831
  PVPlot.qWin.resize(640,480)
829
832
 
830
833
  # start GUI
831
- PVPlot.qApp.instance().exec_()
834
+ qApp.instance().exec_()
832
835
  print('Application exit')
833
836
 
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "pvplot"
7
- version = "0.6.0"
7
+ version = "0.6.1"
8
8
  authors = [
9
9
  { name="Andrei Sukhanov", email="cyxandr@gmail.com" },
10
10
  ]
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes