quarchpy 2.2.7.dev2__py2.py3-none-any.whl → 2.2.8.dev1__py2.py3-none-any.whl

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 (38) hide show
  1. quarchpy/.idea/workspace.xml +23 -11
  2. quarchpy/_version.py +1 -1
  3. quarchpy/connection_specific/QPS/win-amd64/resources/profiles/3_PHASE_PAM_AC_DEFAULT.rcf +2 -2
  4. quarchpy/connection_specific/QPS/win-amd64/resources/profiles/3_PHASE_PAM_AC_FULL.rcf +5 -56
  5. quarchpy/connection_specific/QPS/win-amd64/resources/profiles/PAM_EXAMPLE_CONFIG.rcf +1 -1
  6. quarchpy/connection_specific/connection_QIS.py +3 -6
  7. quarchpy/connection_specific/mDNS.py +1 -3
  8. quarchpy/debug/SystemTest.py +29 -14
  9. quarchpy/debug/module_debug.py +0 -1
  10. quarchpy/device/quarchPPM.py +1 -2
  11. quarchpy/device/quarchQPS.py +1 -2
  12. quarchpy/device/scanDevices.py +3 -3
  13. quarchpy/docs/CHANGES.rst +3 -2
  14. quarchpy/docs/_build/doctrees/CHANGES.doctree +0 -0
  15. quarchpy/docs/_build/doctrees/environment.pickle +0 -0
  16. quarchpy/docs/_build/doctrees/source/changelog.doctree +0 -0
  17. quarchpy/docs/_build/doctrees/source/quarchpy.fio.doctree +0 -0
  18. quarchpy/docs/_build/html/CHANGES.html +145 -139
  19. quarchpy/docs/_build/html/_sources/CHANGES.rst.txt +7 -0
  20. quarchpy/docs/_build/html/genindex.html +8 -2
  21. quarchpy/docs/_build/html/index.html +71 -70
  22. quarchpy/docs/_build/html/objects.inv +0 -0
  23. quarchpy/docs/_build/html/searchindex.js +1 -1
  24. quarchpy/docs/_build/html/source/changelog.html +216 -209
  25. quarchpy/docs/_build/html/source/quarchpy.fio.html +64 -0
  26. quarchpy/docs/_build/html/source/quarchpy.html +3 -0
  27. quarchpy/fio/FIO_interface.py +0 -1
  28. quarchpy/qis/qisFuncs.py +40 -47
  29. quarchpy/qps/qpsFuncs.py +10 -17
  30. quarchpy/run.py +3 -3
  31. quarchpy/utilities/TestCenter.py +2 -2
  32. {quarchpy-2.2.7.dev2.dist-info → quarchpy-2.2.8.dev1.dist-info}/METADATA +4 -3
  33. {quarchpy-2.2.7.dev2.dist-info → quarchpy-2.2.8.dev1.dist-info}/RECORD +35 -38
  34. quarchpy/connection_specific/QPS/win-amd64/qis/Stream1.csv +0 -234
  35. quarchpy/connection_specific/QPS/win-amd64/qis/Stream1_resampled.csv +0 -31
  36. quarchpy/device/quarchPPM.py.bak +0 -67
  37. {quarchpy-2.2.7.dev2.dist-info → quarchpy-2.2.8.dev1.dist-info}/WHEEL +0 -0
  38. {quarchpy-2.2.7.dev2.dist-info → quarchpy-2.2.8.dev1.dist-info}/top_level.txt +0 -0
@@ -5,9 +5,9 @@
5
5
  </component>
6
6
  <component name="ChangeListManager">
7
7
  <list default="true" id="636aab8d-ddf5-4a16-9afb-6ef6a8d53577" name="Changes" comment="">
8
- <change beforePath="$PROJECT_DIR$/Docs/CHANGES.rst" beforeDir="false" afterPath="$PROJECT_DIR$/Docs/CHANGES.rst" afterDir="false" />
9
- <change beforePath="$PROJECT_DIR$/_version.py" beforeDir="false" afterPath="$PROJECT_DIR$/_version.py" afterDir="false" />
10
- <change beforePath="$PROJECT_DIR$/connection_specific/QPS/win-amd64/qps_lib/JFXUtilities-1.0.jar" beforeDir="false" afterPath="$PROJECT_DIR$/connection_specific/QPS/win-amd64/qps_lib/JFXUtilities-1.0.jar" afterDir="false" />
8
+ <change beforePath="$PROJECT_DIR$/connection_specific/connection_QIS.py" beforeDir="false" afterPath="$PROJECT_DIR$/connection_specific/connection_QIS.py" afterDir="false" />
9
+ <change beforePath="$PROJECT_DIR$/qis/qisFuncs.py" beforeDir="false" afterPath="$PROJECT_DIR$/qis/qisFuncs.py" afterDir="false" />
10
+ <change beforePath="$PROJECT_DIR$/qps/qpsFuncs.py" beforeDir="false" afterPath="$PROJECT_DIR$/qps/qpsFuncs.py" afterDir="false" />
11
11
  </list>
12
12
  <option name="SHOW_DIALOG" value="false" />
13
13
  <option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -23,14 +23,15 @@
23
23
  <option name="hideEmptyMiddlePackages" value="true" />
24
24
  <option name="showLibraryContents" value="true" />
25
25
  </component>
26
- <component name="PropertiesComponent">{
27
- &quot;keyToString&quot;: {
28
- &quot;Python.Main.executor&quot;: &quot;Debug&quot;,
29
- &quot;Python.QisAcStreamExample.executor&quot;: &quot;Debug&quot;,
30
- &quot;RunOnceActivity.ShowReadmeOnStart&quot;: &quot;true&quot;,
31
- &quot;last_opened_file_path&quot;: &quot;P:/Software/Python/QuarchPy/Trunk/quarchpy/run.py&quot;
26
+ <component name="PropertiesComponent"><![CDATA[{
27
+ "keyToString": {
28
+ "Python.Main.executor": "Debug",
29
+ "Python.QisAcStreamExample.executor": "Debug",
30
+ "RunOnceActivity.ShowReadmeOnStart": "true",
31
+ "last_opened_file_path": "P:/Software/Python/QuarchPy/Trunk/quarchpy/run.py",
32
+ "settings.editor.selected.configurable": "reference.idesettings.quicklists"
32
33
  }
33
- }</component>
34
+ }]]></component>
34
35
  <component name="RunManager">
35
36
  <configuration name="Main" type="PythonConfigurationType" factoryName="Python">
36
37
  <module name="quarchpy" />
@@ -47,7 +48,7 @@
47
48
  <option name="ADD_CONTENT_ROOTS" value="true" />
48
49
  <option name="ADD_SOURCE_ROOTS" value="true" />
49
50
  <option name="SCRIPT_NAME" value="$PROJECT_DIR$/run.py" />
50
- <option name="PARAMETERS" value="qps -logging=ON -logtarget=&quot;C:\temp\logDir&quot; -qissamelogging=ON" />
51
+ <option name="PARAMETERS" value="qis" />
51
52
  <option name="SHOW_COMMAND_LINE" value="false" />
52
53
  <option name="EMULATE_TERMINAL" value="false" />
53
54
  <option name="MODULE_MODE" value="false" />
@@ -158,4 +159,15 @@
158
159
  <MESSAGE value="Fixed arguments not being passed correctly to QPS." />
159
160
  <option name="LAST_COMMIT_MESSAGE" value="Fixed arguments not being passed correctly to QPS." />
160
161
  </component>
162
+ <component name="XDebuggerManager">
163
+ <breakpoint-manager>
164
+ <breakpoints>
165
+ <line-breakpoint enabled="true" suspend="THREAD" type="python-line">
166
+ <url>file://C:/Python311/Lib/site-packages/quarchpy/qis/qisFuncs.py</url>
167
+ <line>183</line>
168
+ <option name="timeStamp" value="2" />
169
+ </line-breakpoint>
170
+ </breakpoints>
171
+ </breakpoint-manager>
172
+ </component>
161
173
  </project>
quarchpy/_version.py CHANGED
@@ -1 +1 @@
1
- __version__ = "2.2.7.dev2"
1
+ __version__ = "2.2.8.dev1"
@@ -19,8 +19,8 @@ Currently it supports:
19
19
  <RecordingConfiguration>
20
20
  <Header> <!-- Header information for the recording configuration -->
21
21
  <FileVersion>2.0</FileVersion> <!-- Version of the file, checked on load. -->
22
- <DeviceTarget>QTL2582-01, QTL2751-03, QTL2789-01</DeviceTarget> <!-- Device identifier for the compatible device(s) -->
23
- <FileDescription></FileDescription> <!-- Description of the file to make it clear what the file is intended for -->
22
+ <DeviceTarget>QTL2582-01, QTL2751-03, QTL2789-01, QTL2843-02</DeviceTarget> <!-- Device identifier for the compatible device(s) -->
23
+ <FileDescription>This file contains the default synthetic channel setup for an AC PAM.</FileDescription> <!-- Description of the file to make it clear what the file is intended for -->
24
24
  </Header>
25
25
  <SyntheticChannels> <!-- Root tag for synthetic channels configuration -->
26
26
  <Clear>false</Clear> <!-- Indicates whether to clear existing synthetic channels -->
@@ -2,62 +2,11 @@
2
2
  <RecordingConfiguration>
3
3
  <Header>
4
4
  <FileVersion>2.0</FileVersion>
5
- <DeviceTarget>QTL2582-01, QTL2751-03, QTL2789-01</DeviceTarget>
6
- <FileDescription></FileDescription>
5
+ <DeviceTarget>QTL2582-01, QTL2751-03, QTL2789-01, QTL2843-02</DeviceTarget>
6
+ <FileDescription>This file contains the additional channels of interest for an AC PAM, such as total harmonic distortion and crest factor.</FileDescription>
7
7
  </Header>
8
8
  <SyntheticChannels>
9
9
  <Clear>false</Clear>
10
- <SyntheticChannel>
11
- <Configuration>
12
- <Enable>true</Enable>
13
- <Visible>true</Visible>
14
- </Configuration>
15
- <SyntheticChannelFunction>
16
- <FunctionDetails>
17
- <DisplayGroup>v</DisplayGroup>
18
- <DisplayName>+3.3V_VOLT_RMS</DisplayName>
19
- <FunctionName>rms</FunctionName>
20
- </FunctionDetails>
21
- <FunctionArguments>
22
- <Argument>1ms</Argument>
23
- <Argument>chan(+3.3V,v)</Argument>
24
- </FunctionArguments>
25
- </SyntheticChannelFunction>
26
- </SyntheticChannel>
27
- <SyntheticChannel>
28
- <Configuration>
29
- <Enable>true</Enable>
30
- <Visible>true</Visible>
31
- </Configuration>
32
- <SyntheticChannelFunction>
33
- <FunctionDetails>
34
- <DisplayGroup>a</DisplayGroup>
35
- <DisplayName>+3.3V_CURR_RMS</DisplayName>
36
- <FunctionName>rms</FunctionName>
37
- </FunctionDetails>
38
- <FunctionArguments>
39
- <Argument>1ms</Argument>
40
- <Argument>chan(+3.3V,a)</Argument>
41
- </FunctionArguments>
42
- </SyntheticChannelFunction>
43
- </SyntheticChannel>
44
- <SyntheticChannel>
45
- <Configuration>
46
- <Enable>true</Enable>
47
- <Visible>true</Visible>
48
- </Configuration>
49
- <SyntheticChannelFunction>
50
- <FunctionDetails>
51
- <DisplayGroup>w</DisplayGroup>
52
- <DisplayName>+3.3V_POWER_RMS</DisplayName>
53
- <FunctionName>rms</FunctionName>
54
- </FunctionDetails>
55
- <FunctionArguments>
56
- <Argument>1ms</Argument>
57
- <Argument>chan(+3.3V,v)</Argument>
58
- </FunctionArguments>
59
- </SyntheticChannelFunction>
60
- </SyntheticChannel>
61
10
  <SyntheticChannel>
62
11
  <Configuration>
63
12
  <Enable>true</Enable>
@@ -121,7 +70,7 @@
121
70
  <FunctionDetails>
122
71
  <DisplayGroup>V</DisplayGroup>
123
72
  <DisplayName>L1_HAR</DisplayName>
124
- <FunctionName>subtract</FunctionName>
73
+ <FunctionName>harSubtract</FunctionName>
125
74
  </FunctionDetails>
126
75
  <FunctionArguments>
127
76
  <Argument>100ms</Argument>
@@ -139,7 +88,7 @@
139
88
  <FunctionDetails>
140
89
  <DisplayGroup>V</DisplayGroup>
141
90
  <DisplayName>L2_HAR</DisplayName>
142
- <FunctionName>subtract</FunctionName>
91
+ <FunctionName>harSubtract</FunctionName>
143
92
  </FunctionDetails>
144
93
  <FunctionArguments>
145
94
  <Argument>100ms</Argument>
@@ -157,7 +106,7 @@
157
106
  <FunctionDetails>
158
107
  <DisplayGroup>V</DisplayGroup>
159
108
  <DisplayName>L3_HAR</DisplayName>
160
- <FunctionName>subtract</FunctionName>
109
+ <FunctionName>harSubtract</FunctionName>
161
110
  </FunctionDetails>
162
111
  <FunctionArguments>
163
112
  <Argument>100ms</Argument>
@@ -20,7 +20,7 @@ Currently it supports:
20
20
  <Header> <!-- Header information for the recording configuration -->
21
21
  <FileVersion>2.0</FileVersion> <!-- Version of the file, checked on load. -->
22
22
  <DeviceTarget>QTL2312-01</DeviceTarget> <!-- Device identifier for the compatible device(s) -->
23
- <FileDescription></FileDescription> <!-- Description of the file to make it clear what the file is intended for -->
23
+ <FileDescription>This is an example file for PAMs, showing how to configure channels and add an RMS</FileDescription> <!-- Description of the file to make it clear what the file is intended for -->
24
24
  </Header>
25
25
  <SyntheticChannels> <!-- Root tag for synthetic channels configuration -->
26
26
  <Clear>false</Clear> <!-- Indicates whether to clear existing synthetic channels -->
@@ -1,4 +1,3 @@
1
- # -*- coding: future_fstrings -*-
2
1
  import csv
3
2
  import socket
4
3
  import re
@@ -11,9 +10,9 @@ import threading
11
10
  import math
12
11
  import logging
13
12
  import struct
14
- import xml.etree.ElementTree as ET
15
13
  from io import StringIO
16
14
  from quarchpy.user_interface import *
15
+ import xml.etree.ElementTree as ET
17
16
  from connection_specific.StreamChannels import StreamGroups
18
17
 
19
18
 
@@ -262,10 +261,7 @@ class QisInterface:
262
261
  # streamAverage = self.convertStreamAverage(streamAverage)
263
262
  # stripesPerAverage = float(streamAverage) / (float(baseSamplePeriodS) * 4e-6)
264
263
  if inMemoryData is None:
265
- if sys.version_info[0] >= 3:
266
- f = open(fileName, 'a', newline='') # Python 3
267
- else:
268
- f = open(fileName, 'ab') # Python 2: Use 'b' mode to avoid newline issues
264
+ f = open(fileName, 'a', newline='') #changed from ab to a as all data should be in string format now regardless of py2 or py3
269
265
  isRun = True
270
266
  while isRun:
271
267
  try:
@@ -1686,6 +1682,7 @@ class QisInterface:
1686
1682
 
1687
1683
  except Exception as e:
1688
1684
  #something went wrong during send qis cmd
1685
+ logging.error("Error! Unable to retrieve response from QIS. Command: " + sentText)
1689
1686
  logging.error(e)
1690
1687
  raise e
1691
1688
  finally:
@@ -1,9 +1,7 @@
1
1
  import platform # For getting the operating system name
2
2
  import subprocess # For executing a shell command
3
3
  import logging
4
- import sys
5
- if sys.version_info[0] >= 3:
6
- from zeroconf import Zeroconf
4
+ from zeroconf import Zeroconf
7
5
 
8
6
 
9
7
  def ping(host):
@@ -1,5 +1,6 @@
1
1
  from quarchpy import *
2
2
  from quarchpy.device import *
3
+ from quarchpy.connection_specific.jdk_j21_jres.fix_permissions import main as fix_permissions, find_java_permissions
3
4
  try:
4
5
  from importlib.metadata import distribution
5
6
  except:
@@ -48,6 +49,11 @@ def test_system_info():
48
49
  print(str(bytes(subprocess.check_output(['cat', '/etc/os-release'], stderr=subprocess.STDOUT)).decode()))
49
50
  print("Platform Release: " + platform.release())
50
51
 
52
+ print("\nPYTHON\n------")
53
+ try:
54
+ print("Python Version: " + sys.version)
55
+ except:
56
+ print("Unable to detect Python version")
51
57
  try:
52
58
  print("Quarchpy Version: " + get_quarchpy_version())
53
59
  except:
@@ -57,14 +63,8 @@ def test_system_info():
57
63
  except Exception as e:
58
64
  print(e)
59
65
  print("Unable to detect Quarchpy location")
60
- try:
61
- print("Python Version: " + sys.version)
62
- except:
63
- print("Unable to detect Python version")
64
- try:
65
- print("QIS version number: " + get_QIS_version())
66
- except:
67
- print("Unable to detect QIS version")
66
+
67
+ print("\nJAVA\n----")
68
68
  try:
69
69
  javaVersion = bytes(subprocess.check_output(['java', '-version'], stderr=subprocess.STDOUT)).decode()
70
70
  print("Java Version: " + str(javaVersion))
@@ -78,12 +78,17 @@ def test_system_info():
78
78
  print("Unable to detect java location"
79
79
  "If Java is not installed then QIS and QPS will NOT run")
80
80
  try:
81
- find_java_permissions()
81
+ execute_permissions, message=find_java_permissions()
82
+ print("Execute Permissions: ",execute_permissions, "\n",message)
82
83
  except:
83
84
  print("Unable to get j21 java permissions")
85
+ try:
86
+ print("\nQIS version number: " + get_QIS_version())
87
+ except Exception as e:
88
+ print("\nUnable to detect QIS version. Exception:" +str(e))
84
89
 
85
- # Scan for all quarch devices on the system
86
90
 
91
+ # Scan for all quarch devices on the system
87
92
  def QuarchSimpleIdentify(device1):
88
93
  """
89
94
  Prints basic identification test data on the specified module, compatible with all Quarch devices
@@ -92,7 +97,7 @@ def QuarchSimpleIdentify(device1):
92
97
  ----------
93
98
  device1: quarchDevice
94
99
  Open connection to a quarch device
95
-
100
+
96
101
  """
97
102
  # Print the module name
98
103
  print("MODULE IDENTIFY TEST")
@@ -105,6 +110,7 @@ def QuarchSimpleIdentify(device1):
105
110
  print("Module Identity Information: ")
106
111
  print(device1.sendCommand("*idn?"))
107
112
 
113
+
108
114
  def get_QIS_version():
109
115
  """
110
116
  Returns the version of QIS. This is the version of QIS currenty running on the local system if one exists.
@@ -114,15 +120,20 @@ def get_QIS_version():
114
120
  -------
115
121
  version: str
116
122
  String representation of the QIS version number
117
-
123
+
118
124
  """
119
125
 
120
126
  qis_version = ""
121
127
  my_close_qis = False
122
- if isQisRunning() == False:
128
+ try:
129
+ qisRunning=isQisRunning()
130
+ except Exception as e:
131
+ print("Exception occurred while checking if qis was already running. Error:\n"+str(e))
132
+
133
+ if qisRunning == False:
123
134
  my_close_qis = True
124
135
  startLocalQis(headless=True)
125
-
136
+
126
137
  myQis = qisInterface()
127
138
  qis_version = myQis.sendAndReceiveCmd(cmd="$version")
128
139
  if "No Target Device Specified" in qis_version:
@@ -131,6 +142,7 @@ def get_QIS_version():
131
142
  myQis.sendAndReceiveCmd(cmd = "$shutdown")
132
143
  return qis_version
133
144
 
145
+
134
146
  def get_java_location():
135
147
  """
136
148
  Returns the location of java.
@@ -148,12 +160,14 @@ def get_java_location():
148
160
  location = "Unable to detect OS to check java version."
149
161
  return location
150
162
 
163
+
151
164
  def get_quarchpy_version():
152
165
  try:
153
166
  return __version__
154
167
  except:
155
168
  return "Unknown"
156
169
 
170
+
157
171
  def fix_usb():
158
172
  content_to_write = "SUBSYSTEM==\"usb\", ATTRS{idVendor}==\"16d0\", MODE=\"0666\"" \
159
173
  "SUBSYSTEM==\"usb_device\", ATTRS{idVendor}==\"16d0\", MODE=\"0666\""
@@ -199,6 +213,7 @@ def main (args=None):
199
213
  test_communication()
200
214
 
201
215
 
216
+
202
217
  if __name__ == "__main__":
203
218
  main([])
204
219
  #find_java_permissions()
@@ -1,4 +1,3 @@
1
- # -*- coding: future_fstrings -*-
2
1
  '''
3
2
  ########### REQUIREMENTS ###########
4
3
 
@@ -1,6 +1,5 @@
1
- # -*- coding: future_fstrings -*-
2
1
  from .device import quarchDevice
3
- import logging, sys
2
+ import logging
4
3
  import xml.etree.ElementTree as ET
5
4
  from quarchpy.user_interface.user_interface import printText
6
5
 
@@ -198,8 +198,7 @@ class quarchStream:
198
198
  return (command_response)
199
199
 
200
200
 
201
- def addAnnotation(self, title, annotationTime=0, extraText="", yPos="", titleColor="", annotationColor="",
202
- annotationType="", timeFormat="unix"):
201
+ def addAnnotation(self, title, annotationTime=0, extraText="", yPos="", titleColor="", annotationColor="", annotationType="", annotationGroup="", timeFormat="unix"):
203
202
  """
204
203
  Adds a custom annotation to stream with given parameters.
205
204
 
@@ -504,9 +504,9 @@ def scanDevices(target_conn="all", lanTimeout=1, scanInArray=True, favouriteOnly
504
504
  # Setup mdns with zeroconf
505
505
  # Ensure listener/zeroconf instance stay persistent (ensures only one thread is used for each scan cycle)
506
506
  mdns_listener = MyListener().get_instance()
507
- # zeroconf = mdns_listener.get_zeroconf()
507
+ zeroconf = mdns_listener.get_zeroconf()
508
508
  # Setup new mdns discovery service for every scan cycle
509
- # browser = scan_mDNS(mdns_listener, zeroconf)
509
+ browser = scan_mDNS(mdns_listener, zeroconf)
510
510
  # Set target_conn
511
511
  mdns_listener.target_conn = target_conn.lower()
512
512
  # Setup mdns discovery that stays persistent in the background - (could be removed)
@@ -590,7 +590,7 @@ def scanDevices(target_conn="all", lanTimeout=1, scanInArray=True, favouriteOnly
590
590
  if module_type_filter:
591
591
  foundDevices = filter_module_type(module_type_filter, foundDevices)
592
592
  # Cancels the mdns discovery service (required to close active thread)
593
- # browser.cancel()
593
+ browser.cancel()
594
594
  return foundDevices
595
595
 
596
596
 
quarchpy/docs/CHANGES.rst CHANGED
@@ -13,9 +13,10 @@ Quarchpy
13
13
  Change Log
14
14
  ----------
15
15
 
16
- 2.2.4
16
+
17
+ 2.2.7
17
18
  -----
18
- - Fixed issue with missing native java lib.
19
+ - Bug fix for QIS 1.47 missing lib for linux only
19
20
 
20
21
  2.2.6
21
22
  -----