apstrim 4.2.3__tar.gz → 4.3.0__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 (58) hide show
  1. apstrim-4.3.0/PKG-INFO +117 -0
  2. apstrim-4.3.0/README.md +101 -0
  3. {apstrim-4.2.3 → apstrim-4.3.0}/apstrim/view.py +184 -210
  4. {apstrim-4.2.3 → apstrim-4.3.0}/pyproject.toml +3 -3
  5. apstrim-4.2.3/PKG-INFO +0 -99
  6. apstrim-4.2.3/README.md +0 -82
  7. apstrim-4.2.3/apstrim.aps_20251017_1433.aps +0 -0
  8. apstrim-4.2.3/apstrim_20251017_1437.aps +0 -0
  9. apstrim-4.2.3/apstrim_20251017_1526.aps +0 -0
  10. apstrim-4.2.3/cad_env/__init__.py +0 -1
  11. apstrim-4.2.3/cad_env/cad_env +0 -1
  12. apstrim-4.2.3/cad_env/screenlock_user.py +0 -51
  13. apstrim-4.2.3/cad_error/__init__.py +0 -11
  14. apstrim-4.2.3/cad_error/base.py +0 -13
  15. apstrim-4.2.3/cad_error/rhic_errors.py +0 -1752
  16. apstrim-4.2.3/cad_io/__init__.py +0 -0
  17. apstrim-4.2.3/cad_io/adoIf.py +0 -1436
  18. apstrim-4.2.3/cad_io/adoaccess.py +0 -476
  19. apstrim-4.2.3/cad_io/am.py +0 -2483
  20. apstrim-4.2.3/cad_io/ampy.py +0 -758
  21. apstrim-4.2.3/cad_io/cns.py +0 -158
  22. apstrim-4.2.3/cad_io/declarative_manager.py +0 -1617
  23. apstrim-4.2.3/cad_io/epicsAccess_caproto.py +0 -216
  24. apstrim-4.2.3/cad_io/liteAccess.py +0 -664
  25. apstrim-4.2.3/cad_io/liteCNS.py +0 -33
  26. apstrim-4.2.3/cad_io/notif.py +0 -200
  27. apstrim-4.2.3/cad_io/numpyAccess.py +0 -31
  28. apstrim-4.2.3/cad_io/project_url.py +0 -20
  29. apstrim-4.2.3/cad_io/rpc.py +0 -900
  30. apstrim-4.2.3/cad_io/setHistory.py +0 -309
  31. apstrim-4.2.3/data/apstrim.aps +0 -0
  32. apstrim-4.2.3/data/apstrim_100Hz_10Items.aps +0 -0
  33. apstrim-4.2.3/data/apstrim_100Hz_oneItem.aps +0 -0
  34. apstrim-4.2.3/data/apstrim_20251014_1140.aps +0 -0
  35. apstrim-4.2.3/data/apstrim_20251014_1257.aps +0 -0
  36. apstrim-4.2.3/data/apstrim_20251014_1325.aps +0 -0
  37. apstrim-4.2.3/data/apstrim_20251014_1411.aps +0 -0
  38. apstrim-4.2.3/data/apstrim_20251014_1429.aps +0 -0
  39. apstrim-4.2.3/data/apstrim_20251014_1431.aps +0 -0
  40. apstrim-4.2.3/data/apstrim_20251014_1437.aps +0 -0
  41. apstrim-4.2.3/data/apstrim_20251014_1438.aps +0 -0
  42. apstrim-4.2.3/data/apstrim_20251014_1439.aps +0 -0
  43. apstrim-4.2.3/data/apstrim_am_simple_array_simple.test.sinM.aps +0 -0
  44. {apstrim-4.2.3 → apstrim-4.3.0}/CHANGELOG.md +0 -0
  45. {apstrim-4.2.3 → apstrim-4.3.0}/LICENSE +0 -0
  46. {apstrim-4.2.3 → apstrim-4.3.0}/apstrim/__init__.py +0 -0
  47. {apstrim-4.2.3 → apstrim-4.3.0}/apstrim/__main__.py +0 -0
  48. {apstrim-4.2.3 → apstrim-4.3.0}/apstrim/apstrim.py +0 -0
  49. {apstrim-4.2.3 → apstrim-4.3.0}/apstrim/cad_pvaccess.py +0 -0
  50. {apstrim-4.2.3 → apstrim-4.3.0}/apstrim/helpTxtView.py +0 -0
  51. {apstrim-4.2.3 → apstrim-4.3.0}/apstrim/liteCNS.py +0 -0
  52. {apstrim-4.2.3 → apstrim-4.3.0}/apstrim/pubEPICS.py +0 -0
  53. {apstrim-4.2.3 → apstrim-4.3.0}/apstrim/scan.py +0 -0
  54. {apstrim-4.2.3 → apstrim-4.3.0}/config/peaksim_pvp.py +0 -0
  55. {apstrim-4.2.3 → apstrim-4.3.0}/docs/_config.yml +0 -0
  56. {apstrim-4.2.3 → apstrim-4.3.0}/docs/apstrim.html +0 -0
  57. {apstrim-4.2.3 → apstrim-4.3.0}/docs/apstrim_file_format.png +0 -0
  58. {apstrim-4.2.3 → apstrim-4.3.0}/docs/scan.html +0 -0
apstrim-4.3.0/PKG-INFO ADDED
@@ -0,0 +1,117 @@
1
+ Metadata-Version: 2.5
2
+ Name: apstrim
3
+ Version: 4.3.0
4
+ Summary: Logger and extractor of time-series data (e.g. EPICS PVs or liteServer LDOs).
5
+ Project-URL: Homepage, https://github.com/ASukhanov/apstrim
6
+ Project-URL: Bug Tracker, https://github.com/ASukhanov/apstrim/issues
7
+ Author-email: Andrey Sukhanov <cyxandr@gmail.com>
8
+ License-File: LICENSE
9
+ Classifier: License :: OSI Approved :: MIT License
10
+ Classifier: Operating System :: OS Independent
11
+ Classifier: Programming Language :: Python :: 3
12
+ Requires-Python: >=3.7
13
+ Requires-Dist: liteaccess
14
+ Requires-Dist: msgpack
15
+ Description-Content-Type: text/markdown
16
+
17
+ # apstrim
18
+
19
+ Logger and extractor of time-series data (e.g. EPICS PVs).
20
+
21
+ - Data are objects indexed in time order.
22
+ - Supported control infrastructures: EPICS Channel Access + PV Access, ADO, and LITE. Easily extendable.
23
+ - Wide range of data objects: strings, lists, maps, NumPy arrays, and custom types.
24
+ - Data objects can be inhomogeneous and have arbitrary frequencies.
25
+ - Self-describing data format; no schema is required.
26
+ - Data objects are binary serialized using MessagePack.
27
+ - Fast online compression.
28
+ - Fast random-access retrieval of data objects for a selected time interval.
29
+ - Simultaneous writing and reading.
30
+ - Typical speed of compressed serialization to a logbook file is 80 MB/s.
31
+ - Deserialization speed is up to 1200 MB/s when the logbook is cached in memory.
32
+ - Basic plotting of logged data.
33
+
34
+ <img src="/docs/apstrim_file_format.png" width="400">
35
+
36
+ ## Installation
37
+
38
+ Main dependency: **msgpack,numpy**
39
+
40
+ Additional dependencies:
41
+ - **lz4framed**, if compression is enabled
42
+ - EPICS PV Access requires **p4p**.
43
+ - EPICS Channel Access requires **caproto**.
44
+ - The program for deserialization and plotting, **apstrim.view**, requires **pyqtgraph**.
45
+
46
+
47
+ ```console
48
+ pip3 install apstrim
49
+ ```
50
+
51
+ ## API reference
52
+
53
+ [apstrim](https://htmlpreview.github.io/?https://github.com/ASukhanov/apstrim/blob/main/docs/apstrim.html)
54
+
55
+ [scan](https://htmlpreview.github.io/?https://github.com/ASukhanov/apstrim/blob/main/docs/scan.html)
56
+
57
+ ## Examples
58
+
59
+ ### Serialization
60
+
61
+ ```console
62
+ # Serialization of one float64 parameter from an EPICS simulated scope IOC:
63
+ python -m apstrim -nEPICS -T59 testAPD:scope1:MeanValue_RBV
64
+ Logging finished for 1 section, 1 parList, 7.263 KB.
65
+ ...
66
+
67
+ # The same with compression:
68
+ python -m apstrim -nEPICS -T59 testAPD:scope1:MeanValue_RBV --compress
69
+ Logging finished for 1 section, 1 parList, 6.101 KB. Compression ratio: 1.19
70
+ ...
71
+
72
+ # Serialization of a 1000-element array and a scalar of floats:
73
+ python -m apstrim -nEPICS -T59 testAPD:scope1:MeanValue_RBV,Waveform_RBV --compress
74
+ Logging finished for 1 section, 2 parLists, 2405.354 KB. Compression ratio: 1.0
75
+ ...
76
+ # Compression is poor for floating-point arrays with high entropy.
77
+
78
+ # Serialization of an incrementing integer parameter:
79
+ python -m apstrim -nLITE --compress liteHost:dev1:cycle
80
+ Logging finished for 1 section, 1 parList, 56.526 KB. Compression ratio: 1.25
81
+ ...
82
+ # In this case, the normalized compressed volume is 9.3 bytes per entry.
83
+ # Each entry consists of an int64 timestamp and an int64 value, which would
84
+ # occupy 16 bytes per entry when written using the standard format.
85
+ ```
86
+
87
+ ### Deserialization
88
+
89
+ Example of deserializing and plotting all parameters from several logbooks:
90
+
91
+ ```console
92
+ python -m apstrim.view -i all -p '*.aps'
93
+ ```
94
+
95
+ Python code snippet for extracting items 1, 2, and 3 from a logbook
96
+ for a 20-second interval starting on 2021-08-12 at 23:31:31:
97
+
98
+ ```python
99
+ from apstrim.scan import APScan
100
+
101
+ apscan = APScan("aLogbook.aps")
102
+ headers = apscan.get_headers()
103
+ print(headers["Index"])
104
+ extracted = apscan.extract_objects(
105
+ span=20,
106
+ items=[1, 2, 3],
107
+ startTime="210812_233131",
108
+ )
109
+ print(extracted[3]) # Print the extracted data for item [3]
110
+ # Returned:
111
+ {
112
+ "par": "liteBridge.peakSimulator:rps", # object (PV) name of item [3]
113
+ "times": [1628825500.8938403, 1628825510.898658], # timestamps for item [3]
114
+ "values": [95.675125, 95.55396], # values for item [3]
115
+ }
116
+ ```
117
+
@@ -0,0 +1,101 @@
1
+ # apstrim
2
+
3
+ Logger and extractor of time-series data (e.g. EPICS PVs).
4
+
5
+ - Data are objects indexed in time order.
6
+ - Supported control infrastructures: EPICS Channel Access + PV Access, ADO, and LITE. Easily extendable.
7
+ - Wide range of data objects: strings, lists, maps, NumPy arrays, and custom types.
8
+ - Data objects can be inhomogeneous and have arbitrary frequencies.
9
+ - Self-describing data format; no schema is required.
10
+ - Data objects are binary serialized using MessagePack.
11
+ - Fast online compression.
12
+ - Fast random-access retrieval of data objects for a selected time interval.
13
+ - Simultaneous writing and reading.
14
+ - Typical speed of compressed serialization to a logbook file is 80 MB/s.
15
+ - Deserialization speed is up to 1200 MB/s when the logbook is cached in memory.
16
+ - Basic plotting of logged data.
17
+
18
+ <img src="/docs/apstrim_file_format.png" width="400">
19
+
20
+ ## Installation
21
+
22
+ Main dependency: **msgpack,numpy**
23
+
24
+ Additional dependencies:
25
+ - **lz4framed**, if compression is enabled
26
+ - EPICS PV Access requires **p4p**.
27
+ - EPICS Channel Access requires **caproto**.
28
+ - The program for deserialization and plotting, **apstrim.view**, requires **pyqtgraph**.
29
+
30
+
31
+ ```console
32
+ pip3 install apstrim
33
+ ```
34
+
35
+ ## API reference
36
+
37
+ [apstrim](https://htmlpreview.github.io/?https://github.com/ASukhanov/apstrim/blob/main/docs/apstrim.html)
38
+
39
+ [scan](https://htmlpreview.github.io/?https://github.com/ASukhanov/apstrim/blob/main/docs/scan.html)
40
+
41
+ ## Examples
42
+
43
+ ### Serialization
44
+
45
+ ```console
46
+ # Serialization of one float64 parameter from an EPICS simulated scope IOC:
47
+ python -m apstrim -nEPICS -T59 testAPD:scope1:MeanValue_RBV
48
+ Logging finished for 1 section, 1 parList, 7.263 KB.
49
+ ...
50
+
51
+ # The same with compression:
52
+ python -m apstrim -nEPICS -T59 testAPD:scope1:MeanValue_RBV --compress
53
+ Logging finished for 1 section, 1 parList, 6.101 KB. Compression ratio: 1.19
54
+ ...
55
+
56
+ # Serialization of a 1000-element array and a scalar of floats:
57
+ python -m apstrim -nEPICS -T59 testAPD:scope1:MeanValue_RBV,Waveform_RBV --compress
58
+ Logging finished for 1 section, 2 parLists, 2405.354 KB. Compression ratio: 1.0
59
+ ...
60
+ # Compression is poor for floating-point arrays with high entropy.
61
+
62
+ # Serialization of an incrementing integer parameter:
63
+ python -m apstrim -nLITE --compress liteHost:dev1:cycle
64
+ Logging finished for 1 section, 1 parList, 56.526 KB. Compression ratio: 1.25
65
+ ...
66
+ # In this case, the normalized compressed volume is 9.3 bytes per entry.
67
+ # Each entry consists of an int64 timestamp and an int64 value, which would
68
+ # occupy 16 bytes per entry when written using the standard format.
69
+ ```
70
+
71
+ ### Deserialization
72
+
73
+ Example of deserializing and plotting all parameters from several logbooks:
74
+
75
+ ```console
76
+ python -m apstrim.view -i all -p '*.aps'
77
+ ```
78
+
79
+ Python code snippet for extracting items 1, 2, and 3 from a logbook
80
+ for a 20-second interval starting on 2021-08-12 at 23:31:31:
81
+
82
+ ```python
83
+ from apstrim.scan import APScan
84
+
85
+ apscan = APScan("aLogbook.aps")
86
+ headers = apscan.get_headers()
87
+ print(headers["Index"])
88
+ extracted = apscan.extract_objects(
89
+ span=20,
90
+ items=[1, 2, 3],
91
+ startTime="210812_233131",
92
+ )
93
+ print(extracted[3]) # Print the extracted data for item [3]
94
+ # Returned:
95
+ {
96
+ "par": "liteBridge.peakSimulator:rps", # object (PV) name of item [3]
97
+ "times": [1628825500.8938403, 1628825510.898658], # timestamps for item [3]
98
+ "values": [95.675125, 95.55396], # values for item [3]
99
+ }
100
+ ```
101
+