apstrim 4.0.2__tar.gz → 4.0.3__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 (56) hide show
  1. {apstrim-4.0.2 → apstrim-4.0.3}/PKG-INFO +1 -1
  2. {apstrim-4.0.2 → apstrim-4.0.3}/apstrim/view.py +14 -4
  3. {apstrim-4.0.2 → apstrim-4.0.3}/pyproject.toml +1 -1
  4. {apstrim-4.0.2 → apstrim-4.0.3}/CHANGELOG.md +0 -0
  5. {apstrim-4.0.2 → apstrim-4.0.3}/LICENSE +0 -0
  6. {apstrim-4.0.2 → apstrim-4.0.3}/README.md +0 -0
  7. {apstrim-4.0.2 → apstrim-4.0.3}/apstrim/__init__.py +0 -0
  8. {apstrim-4.0.2 → apstrim-4.0.3}/apstrim/__main__.py +0 -0
  9. {apstrim-4.0.2 → apstrim-4.0.3}/apstrim/apstrim.py +0 -0
  10. {apstrim-4.0.2 → apstrim-4.0.3}/apstrim/helpTxtView.py +0 -0
  11. {apstrim-4.0.2 → apstrim-4.0.3}/apstrim/liteCNS.py +0 -0
  12. {apstrim-4.0.2 → apstrim-4.0.3}/apstrim/pubEPICS.py +0 -0
  13. {apstrim-4.0.2 → apstrim-4.0.3}/apstrim/pvplot.py +0 -0
  14. {apstrim-4.0.2 → apstrim-4.0.3}/apstrim/scan.py +0 -0
  15. {apstrim-4.0.2 → apstrim-4.0.3}/apstrim/view-v400a.py +0 -0
  16. {apstrim-4.0.2 → apstrim-4.0.3}/apstrim/view_v141.py +0 -0
  17. {apstrim-4.0.2 → apstrim-4.0.3}/apstrim.aps +0 -0
  18. {apstrim-4.0.2 → apstrim-4.0.3}/apstrim.egg-info/PKG-INFO +0 -0
  19. {apstrim-4.0.2 → apstrim-4.0.3}/apstrim.egg-info/SOURCES.txt +0 -0
  20. {apstrim-4.0.2 → apstrim-4.0.3}/apstrim.egg-info/dependency_links.txt +0 -0
  21. {apstrim-4.0.2 → apstrim-4.0.3}/apstrim.egg-info/entry_points.txt +0 -0
  22. {apstrim-4.0.2 → apstrim-4.0.3}/apstrim.egg-info/requires.txt +0 -0
  23. {apstrim-4.0.2 → apstrim-4.0.3}/apstrim.egg-info/top_level.txt +0 -0
  24. {apstrim-4.0.2 → apstrim-4.0.3}/apstrim_20241111_1916.aps +0 -0
  25. {apstrim-4.0.2 → apstrim-4.0.3}/build/lib/apstrim/__init__.py +0 -0
  26. {apstrim-4.0.2 → apstrim-4.0.3}/build/lib/apstrim/__main__.py +0 -0
  27. {apstrim-4.0.2 → apstrim-4.0.3}/build/lib/apstrim/apstrim.py +0 -0
  28. {apstrim-4.0.2 → apstrim-4.0.3}/build/lib/apstrim/apview.py +0 -0
  29. {apstrim-4.0.2 → apstrim-4.0.3}/build/lib/apstrim/deserializer-v04.py +0 -0
  30. {apstrim-4.0.2 → apstrim-4.0.3}/build/lib/apstrim/deserializer.py +0 -0
  31. {apstrim-4.0.2 → apstrim-4.0.3}/build/lib/apstrim/liteCNS.py +0 -0
  32. {apstrim-4.0.2 → apstrim-4.0.3}/build/lib/apstrim/plot.py +0 -0
  33. {apstrim-4.0.2 → apstrim-4.0.3}/build/lib/apstrim/plot1.py +0 -0
  34. {apstrim-4.0.2 → apstrim-4.0.3}/build/lib/apstrim/pubEPICS.py +0 -0
  35. {apstrim-4.0.2 → apstrim-4.0.3}/build/lib/apstrim/pubLITE.py +0 -0
  36. {apstrim-4.0.2 → apstrim-4.0.3}/build/lib/apstrim/scan.py +0 -0
  37. {apstrim-4.0.2 → apstrim-4.0.3}/build/lib/apstrim/view.py +0 -0
  38. {apstrim-4.0.2 → apstrim-4.0.3}/build/lib/apstrim/view_v141.py +0 -0
  39. {apstrim-4.0.2 → apstrim-4.0.3}/config/peaksim_pvp.py +0 -0
  40. {apstrim-4.0.2 → apstrim-4.0.3}/docs/_config.yml +0 -0
  41. {apstrim-4.0.2 → apstrim-4.0.3}/docs/apstrim.html +0 -0
  42. {apstrim-4.0.2 → apstrim-4.0.3}/docs/apstrim_file_format.png +0 -0
  43. {apstrim-4.0.2 → apstrim-4.0.3}/docs/daily_downloads.jpg +0 -0
  44. {apstrim-4.0.2 → apstrim-4.0.3}/docs/scan.html +0 -0
  45. {apstrim-4.0.2 → apstrim-4.0.3}/fallback/scan-v200.py +0 -0
  46. {apstrim-4.0.2 → apstrim-4.0.3}/fallback/v1.4.1/__init__.py +0 -0
  47. {apstrim-4.0.2 → apstrim-4.0.3}/fallback/v1.4.1/__main__.py +0 -0
  48. {apstrim-4.0.2 → apstrim-4.0.3}/fallback/v1.4.1/apstrim.py +0 -0
  49. {apstrim-4.0.2 → apstrim-4.0.3}/fallback/v1.4.1/liteCNS.py +0 -0
  50. {apstrim-4.0.2 → apstrim-4.0.3}/fallback/v1.4.1/pubEPICS.py +0 -0
  51. {apstrim-4.0.2 → apstrim-4.0.3}/fallback/v1.4.1/pubLITE.py +0 -0
  52. {apstrim-4.0.2 → apstrim-4.0.3}/fallback/v1.4.1/scan.py +0 -0
  53. {apstrim-4.0.2 → apstrim-4.0.3}/fallback/v1.4.1/view.py +0 -0
  54. {apstrim-4.0.2 → apstrim-4.0.3}/html/apstrim.html +0 -0
  55. {apstrim-4.0.2 → apstrim-4.0.3}/html/scan.html +0 -0
  56. {apstrim-4.0.2 → apstrim-4.0.3}/pyproject0.toml +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: apstrim
3
- Version: 4.0.2
3
+ Version: 4.0.3
4
4
  Summary: Logger and extractor of time-series data (e.g. EPICS PVs or liteServer LDOs).
5
5
  Project-URL: Homepage, https://github.com/ASukhanov/apstrim
6
6
  Project-URL: Bug Tracker, https://github.com/ASukhanov/apstrim/issues
@@ -1,5 +1,5 @@
1
1
  """Plot data from the apstrim-generated files."""
2
- __version__ = 'v4.0.2 2025-01-23'# Faster plotting of 1D arrays, cleanup.
2
+ __version__ = 'v4.0.3 2025-01-23'# handling case when Y is list of 1-element arrays. Handle setYRange if defined in config.
3
3
  #TODO: Cellname did not change on plot after changing it in dataset options
4
4
  #TODO: data acquisition stops when section is dumped to disk. Is writing really buffered?
5
5
  #TODO: interactive works only for one file
@@ -246,7 +246,7 @@ def set_legend(dockNum:int, state:bool):
246
246
  #print(f'add legends to dock{dockNum}')
247
247
  plotWidget = C.dockList[dockNum]['dock'].widgets[0]
248
248
  listOfItems = plotWidget.getPlotItem().listDataItems()
249
- l = pg.LegendItem((100,60), offset=(70,30), verSpacing=-20,
249
+ l = pg.LegendItem((100,60), offset=(70,30), verSpacing=-10,
250
250
  labelTextColor=TxtColor) # args are (size, offset)
251
251
  l.setParentItem(plotWidget.graphicsItem())
252
252
  C.legends[dockNum] = l
@@ -323,6 +323,8 @@ def xRange(plotDataItem):
323
323
  def get_statistics():
324
324
  statList = []
325
325
  for pvName,cc in C.curves.items():
326
+ if not cc.enabled:
327
+ continue
326
328
  plotDataItem = cc.plotDataItem
327
329
  ileft,iright = xRange(plotDataItem)
328
330
  x,y = plotDataItem.getData()
@@ -681,6 +683,10 @@ def register_dock(dockNum:int):
681
683
  dockName = str(dockNum)
682
684
  dock = Dock(dockName, size=(500,200), hideTitle=True)
683
685
  vb = CustomViewBox(dockNum)
686
+ try: vb.setYRange(C.config.YMINIMUM, C.config.YMAXIMUM)
687
+ except: pass
688
+ #Exception as e:
689
+ # printw(f'in setYRange: {e}')
684
690
  ax = {'bottom':DateAxis(orientation='bottom')}
685
691
  plotWidget = pg.PlotWidget(title=None, name=dockName, viewBox=vb, axisItems=ax)#, plotItem=plotItem)
686
692
  dock.addWidget(plotWidget)
@@ -836,14 +842,17 @@ for extracted in allExtracted:
836
842
  msg = f'PV[{key}] is not array of numbers dtype:{y[0].dtype}'
837
843
  print(f'WARNING: {msg}')
838
844
  #raise ValueError(msg)
839
- y = [float(i) for i in y]
845
+ y = np.array([float(i) for i in y])
840
846
  x = []
841
847
  spread = 0
842
- try: ly = len(y[0])
848
+ try:
849
+ ly = len(y[0])
843
850
  except: ly = 1
844
851
  if ly == 1:
845
852
  # y is 1D list
846
853
  x = np.array(timestamps)
854
+ if isinstance(y[0],np.ndarray):
855
+ y = np.array(y).flatten()
847
856
  else:
848
857
  # y is list of ndarrays. Expand X.
849
858
  for i,tstamp in enumerate(timestamps):
@@ -868,6 +877,7 @@ for extracted in allExtracted:
868
877
  #print(f'pw {cc.cell}: {plotWidget}')
869
878
  symPen,symBrush = pen.color(), pen.color()
870
879
  sym = None if nn > XRangeTooLarge else cc.symbol
880
+ #print(f'x,y of {par}: {len(x),type(x[0]),len(y),type(y[0])}')
871
881
  try:
872
882
  plotDataItem = pg.PlotDataItem(x, y, name=cc.cell,
873
883
  downsample=1, autoDownsample=False, downsampleMethod='peak',#3.6s plotting time, this is default
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "apstrim"
7
- version = "4.0.2"
7
+ version = "4.0.3"
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
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
File without changes
File without changes