spikesafe-python 1.12.12__tar.gz → 1.13.5__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 (48) hide show
  1. {spikesafe_python-1.12.12/spikesafe_python.egg-info → spikesafe_python-1.13.5}/PKG-INFO +1 -1
  2. {spikesafe_python-1.12.12 → spikesafe_python-1.13.5}/pyproject.toml +1 -1
  3. {spikesafe_python-1.12.12 → spikesafe_python-1.13.5}/spikesafe_python/Discharge.py +9 -5
  4. {spikesafe_python-1.12.12 → spikesafe_python-1.13.5}/spikesafe_python/TcpSocket.py +2 -1
  5. {spikesafe_python-1.12.12 → spikesafe_python-1.13.5/spikesafe_python.egg-info}/PKG-INFO +1 -1
  6. {spikesafe_python-1.12.12 → spikesafe_python-1.13.5}/LICENSE +0 -0
  7. {spikesafe_python-1.12.12 → spikesafe_python-1.13.5}/README.md +0 -0
  8. {spikesafe_python-1.12.12 → spikesafe_python-1.13.5}/setup.cfg +0 -0
  9. {spikesafe_python-1.12.12 → spikesafe_python-1.13.5}/setup.py +0 -0
  10. {spikesafe_python-1.12.12 → spikesafe_python-1.13.5}/spikesafe_python/ChannelData.py +0 -0
  11. {spikesafe_python-1.12.12 → spikesafe_python-1.13.5}/spikesafe_python/Compensation.py +0 -0
  12. {spikesafe_python-1.12.12 → spikesafe_python-1.13.5}/spikesafe_python/DigitizerData.py +0 -0
  13. {spikesafe_python-1.12.12 → spikesafe_python-1.13.5}/spikesafe_python/DigitizerDataFetch.py +0 -0
  14. {spikesafe_python-1.12.12 → spikesafe_python-1.13.5}/spikesafe_python/DigitizerEnums.py +0 -0
  15. {spikesafe_python-1.12.12 → spikesafe_python-1.13.5}/spikesafe_python/DigitizerInfo.py +0 -0
  16. {spikesafe_python-1.12.12 → spikesafe_python-1.13.5}/spikesafe_python/DigitizerVfCustomSequence.py +0 -0
  17. {spikesafe_python-1.12.12 → spikesafe_python-1.13.5}/spikesafe_python/DigitizerVfCustomSequenceStep.py +0 -0
  18. {spikesafe_python-1.12.12 → spikesafe_python-1.13.5}/spikesafe_python/EventData.py +0 -0
  19. {spikesafe_python-1.12.12 → spikesafe_python-1.13.5}/spikesafe_python/MemoryTableReadData.py +0 -0
  20. {spikesafe_python-1.12.12 → spikesafe_python-1.13.5}/spikesafe_python/Precision.py +0 -0
  21. {spikesafe_python-1.12.12 → spikesafe_python-1.13.5}/spikesafe_python/PulseWidthCorrection.py +0 -0
  22. {spikesafe_python-1.12.12 → spikesafe_python-1.13.5}/spikesafe_python/ReadAllEvents.py +0 -0
  23. {spikesafe_python-1.12.12 → spikesafe_python-1.13.5}/spikesafe_python/ScpiFormatter.py +0 -0
  24. {spikesafe_python-1.12.12 → spikesafe_python-1.13.5}/spikesafe_python/SerialPortConnection.py +0 -0
  25. {spikesafe_python-1.12.12 → spikesafe_python-1.13.5}/spikesafe_python/SpikeSafeEnums.py +0 -0
  26. {spikesafe_python-1.12.12 → spikesafe_python-1.13.5}/spikesafe_python/SpikeSafeError.py +0 -0
  27. {spikesafe_python-1.12.12 → spikesafe_python-1.13.5}/spikesafe_python/SpikeSafeEvents.py +0 -0
  28. {spikesafe_python-1.12.12 → spikesafe_python-1.13.5}/spikesafe_python/SpikeSafeInfo.py +0 -0
  29. {spikesafe_python-1.12.12 → spikesafe_python-1.13.5}/spikesafe_python/SpikeSafeInfoParser.py +0 -0
  30. {spikesafe_python-1.12.12 → spikesafe_python-1.13.5}/spikesafe_python/TemperatureData.py +0 -0
  31. {spikesafe_python-1.12.12 → spikesafe_python-1.13.5}/spikesafe_python/Threading.py +0 -0
  32. {spikesafe_python-1.12.12 → spikesafe_python-1.13.5}/spikesafe_python/__init__.py +0 -0
  33. {spikesafe_python-1.12.12 → spikesafe_python-1.13.5}/spikesafe_python.egg-info/SOURCES.txt +0 -0
  34. {spikesafe_python-1.12.12 → spikesafe_python-1.13.5}/spikesafe_python.egg-info/dependency_links.txt +0 -0
  35. {spikesafe_python-1.12.12 → spikesafe_python-1.13.5}/spikesafe_python.egg-info/requires.txt +0 -0
  36. {spikesafe_python-1.12.12 → spikesafe_python-1.13.5}/spikesafe_python.egg-info/top_level.txt +0 -0
  37. {spikesafe_python-1.12.12 → spikesafe_python-1.13.5}/tests/test_custom_compensation.py +0 -0
  38. {spikesafe_python-1.12.12 → spikesafe_python-1.13.5}/tests/test_custom_compensation_old.py +0 -0
  39. {spikesafe_python-1.12.12 → spikesafe_python-1.13.5}/tests/test_digitizer_fetch_time_of_sampling.py +0 -0
  40. {spikesafe_python-1.12.12 → spikesafe_python-1.13.5}/tests/test_digitizer_fetch_time_of_sampling_old.py +0 -0
  41. {spikesafe_python-1.12.12 → spikesafe_python-1.13.5}/tests/test_event_data.py +0 -0
  42. {spikesafe_python-1.12.12 → spikesafe_python-1.13.5}/tests/test_event_data_old.py +0 -0
  43. {spikesafe_python-1.12.12 → spikesafe_python-1.13.5}/tests/test_get_new_voltage_data_estimated_complete_time.py +0 -0
  44. {spikesafe_python-1.12.12 → spikesafe_python-1.13.5}/tests/test_optimum_compensation.py +0 -0
  45. {spikesafe_python-1.12.12 → spikesafe_python-1.13.5}/tests/test_optimum_compensation_old.py +0 -0
  46. {spikesafe_python-1.12.12 → spikesafe_python-1.13.5}/tests/test_optimum_pulse_width_correction.py +0 -0
  47. {spikesafe_python-1.12.12 → spikesafe_python-1.13.5}/tests/test_optimum_pulse_width_correction_old.py +0 -0
  48. {spikesafe_python-1.12.12 → spikesafe_python-1.13.5}/tests/test_spikesafe_info_compare_rev_version.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: spikesafe-python
3
- Version: 1.12.12
3
+ Version: 1.13.5
4
4
  Summary: SpikeSafe Python Library
5
5
  Author-email: Vektrex <support@vektrex.com>
6
6
  Classifier: Programming Language :: Python :: 3
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "spikesafe-python"
7
- version = "1.12.12"
7
+ version = "1.13.5"
8
8
  authors = [
9
9
  { name="Vektrex", email="support@vektrex.com" },
10
10
  ]
@@ -77,18 +77,22 @@ class Discharge:
77
77
  """
78
78
  if spikesafe_info.supports_discharge_query:
79
79
  # when Discharge Complete query is supported, query for completion
80
- start_time = time.time()
81
- expected_max_discharge_time = Discharge.get_spikesafe_channel_discharge_time(spikesafe_info.maximum_compliance_voltage + 35) # 35V gives extra time, some windows pcs return early from wait function
80
+ expected_compliance_voltage_discharge_time = Discharge.get_spikesafe_channel_discharge_time(compliance_voltage)
81
+ expected_max_model_discharge_time = Discharge.get_spikesafe_channel_discharge_time(spikesafe_info.maximum_compliance_voltage + 35) # 35V gives extra time, some windows pcs return early from wait function
82
82
 
83
+ start_time = time.time()
83
84
  # wait until the channel is fully discharged before disconnecting the load
84
85
  is_discharge_complete = ""
85
- while is_discharge_complete != "TRUE":
86
+ while True:
86
87
  spikesafe_socket.send_scpi_command(f"OUTP{channel_number}:DISC:COMP?", enable_logging)
87
88
  is_discharge_complete = spikesafe_socket.read_data(enable_logging)
88
89
 
90
+ if is_discharge_complete == "TRUE":
91
+ break
92
+
89
93
  elapsed_seconds = time.time() - start_time
90
- if elapsed_seconds > expected_max_discharge_time:
91
- raise TimeoutError(f"SpikeSafe channel discharge exceeded expected maximum time of {expected_max_discharge_time} seconds")
94
+ if elapsed_seconds > expected_max_model_discharge_time:
95
+ raise TimeoutError(f"SpikeSafe channel discharge expected discharge time is {expected_compliance_voltage_discharge_time} seconds, but this exceeded the model {spikesafe_info.maximum_compliance_voltage}V maximum time of {expected_max_model_discharge_time} seconds.")
92
96
  else:
93
97
  # when Discharge Complete query is not supported, use a calculated wait time
94
98
  wait_time = Discharge.get_spikesafe_channel_discharge_time(compliance_voltage + 35) # 35V gives extra time, some windows pcs return early from wait function
@@ -63,9 +63,10 @@ class TcpSocket:
63
63
  try:
64
64
  self.socket_ip_address = ip_address
65
65
 
66
- # create socket with 2 second timeout and connect to SpikeSafe
66
+ # create socket with 2 second timeout, 512 byte send max buffer to match SpikeSafe's command buffer, and connect to SpikeSafe
67
67
  self.tcp_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
68
68
  self.tcp_socket.settimeout(2)
69
+ self.tcp_socket.setsockopt(socket.SOL_SOCKET, socket.SO_SNDBUF, 512)
69
70
 
70
71
  if (self.enable_logging):
71
72
  log.log(self.default_log_level, self.__get_formatted_log_message__('Connecting...'))
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: spikesafe-python
3
- Version: 1.12.12
3
+ Version: 1.13.5
4
4
  Summary: SpikeSafe Python Library
5
5
  Author-email: Vektrex <support@vektrex.com>
6
6
  Classifier: Programming Language :: Python :: 3