pyibis-ami 7.2.1__tar.gz → 7.2.2__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 (52) hide show
  1. {pyibis_ami-7.2.1/src/pyibis_ami.egg-info → pyibis_ami-7.2.2}/PKG-INFO +1 -1
  2. {pyibis_ami-7.2.1 → pyibis_ami-7.2.2}/pyproject.toml +2 -2
  3. {pyibis_ami-7.2.1 → pyibis_ami-7.2.2/src/pyibis_ami.egg-info}/PKG-INFO +1 -1
  4. {pyibis_ami-7.2.1 → pyibis_ami-7.2.2}/src/pyibisami/ami/model.py +43 -9
  5. {pyibis_ami-7.2.1 → pyibis_ami-7.2.2}/src/pyibisami/common.py +2 -2
  6. {pyibis_ami-7.2.1 → pyibis_ami-7.2.2}/LICENSE +0 -0
  7. {pyibis_ami-7.2.1 → pyibis_ami-7.2.2}/MANIFEST.in +0 -0
  8. {pyibis_ami-7.2.1 → pyibis_ami-7.2.2}/README.md +0 -0
  9. {pyibis_ami-7.2.1 → pyibis_ami-7.2.2}/docs/source/ami.rst +0 -0
  10. {pyibis_ami-7.2.1 → pyibis_ami-7.2.2}/docs/source/conf.py +0 -0
  11. {pyibis_ami-7.2.1 → pyibis_ami-7.2.2}/docs/source/ibis.rst +0 -0
  12. {pyibis_ami-7.2.1 → pyibis_ami-7.2.2}/docs/source/index.rst +0 -0
  13. {pyibis_ami-7.2.1 → pyibis_ami-7.2.2}/docs/source/install.rst +0 -0
  14. {pyibis_ami-7.2.1 → pyibis_ami-7.2.2}/docs/source/modules.rst +0 -0
  15. {pyibis_ami-7.2.1 → pyibis_ami-7.2.2}/docs/source/tools.rst +0 -0
  16. {pyibis_ami-7.2.1 → pyibis_ami-7.2.2}/examples/all_taps.run +0 -0
  17. {pyibis_ami-7.2.1 → pyibis_ami-7.2.2}/examples/bandwidth.run +0 -0
  18. {pyibis_ami-7.2.1 → pyibis_ami-7.2.2}/examples/dummy.em +0 -0
  19. {pyibis_ami-7.2.1 → pyibis_ami-7.2.2}/examples/examples.md +0 -0
  20. {pyibis_ami-7.2.1 → pyibis_ami-7.2.2}/examples/freq_resp.em +0 -0
  21. {pyibis_ami-7.2.1 → pyibis_ami-7.2.2}/examples/impulse.em +0 -0
  22. {pyibis_ami-7.2.1 → pyibis_ami-7.2.2}/examples/impulse_response_8ma.txt +0 -0
  23. {pyibis_ami-7.2.1 → pyibis_ami-7.2.2}/examples/mode.run +0 -0
  24. {pyibis_ami-7.2.1 → pyibis_ami-7.2.2}/examples/stratix4_ami_tx_runs/all_taps.run +0 -0
  25. {pyibis_ami-7.2.1 → pyibis_ami-7.2.2}/examples/stratix4_ami_tx_runs/test_results.xml +0 -0
  26. {pyibis_ami-7.2.1 → pyibis_ami-7.2.2}/examples/test_results/test_results.xsl +0 -0
  27. {pyibis_ami-7.2.1 → pyibis_ami-7.2.2}/setup.cfg +0 -0
  28. {pyibis_ami-7.2.1 → pyibis_ami-7.2.2}/src/pyibis_ami.egg-info/SOURCES.txt +0 -0
  29. {pyibis_ami-7.2.1 → pyibis_ami-7.2.2}/src/pyibis_ami.egg-info/dependency_links.txt +0 -0
  30. {pyibis_ami-7.2.1 → pyibis_ami-7.2.2}/src/pyibis_ami.egg-info/entry_points.txt +0 -0
  31. {pyibis_ami-7.2.1 → pyibis_ami-7.2.2}/src/pyibis_ami.egg-info/requires.txt +0 -0
  32. {pyibis_ami-7.2.1 → pyibis_ami-7.2.2}/src/pyibis_ami.egg-info/top_level.txt +0 -0
  33. {pyibis_ami-7.2.1 → pyibis_ami-7.2.2}/src/pyibisami/IBIS_AMI_Checker.ipynb +0 -0
  34. {pyibis_ami-7.2.1 → pyibis_ami-7.2.2}/src/pyibisami/IBIS_AMI_Tester.ipynb +0 -0
  35. {pyibis_ami-7.2.1 → pyibis_ami-7.2.2}/src/pyibisami/__init__.py +0 -0
  36. {pyibis_ami-7.2.1 → pyibis_ami-7.2.2}/src/pyibisami/__main__.py +0 -0
  37. {pyibis_ami-7.2.1 → pyibis_ami-7.2.2}/src/pyibisami/ami/__init__.py +0 -0
  38. {pyibis_ami-7.2.1 → pyibis_ami-7.2.2}/src/pyibisami/ami/config.py +0 -0
  39. {pyibis_ami-7.2.1 → pyibis_ami-7.2.2}/src/pyibisami/ami/generic.ami.em +0 -0
  40. {pyibis_ami-7.2.1 → pyibis_ami-7.2.2}/src/pyibisami/ami/generic.ibs.em +0 -0
  41. {pyibis_ami-7.2.1 → pyibis_ami-7.2.2}/src/pyibisami/ami/parameter.py +0 -0
  42. {pyibis_ami-7.2.1 → pyibis_ami-7.2.2}/src/pyibisami/ami/parser.py +0 -0
  43. {pyibis_ami-7.2.1 → pyibis_ami-7.2.2}/src/pyibisami/ami/reserved_parameter_names.py +0 -0
  44. {pyibis_ami-7.2.1 → pyibis_ami-7.2.2}/src/pyibisami/ibis/__init__.py +0 -0
  45. {pyibis_ami-7.2.1 → pyibis_ami-7.2.2}/src/pyibisami/ibis/file.py +0 -0
  46. {pyibis_ami-7.2.1 → pyibis_ami-7.2.2}/src/pyibisami/ibis/model.py +0 -0
  47. {pyibis_ami-7.2.1 → pyibis_ami-7.2.2}/src/pyibisami/ibis/parser.py +0 -0
  48. {pyibis_ami-7.2.1 → pyibis_ami-7.2.2}/src/pyibisami/tools/__init__.py +0 -0
  49. {pyibis_ami-7.2.1 → pyibis_ami-7.2.2}/src/pyibisami/tools/run_notebook.py +0 -0
  50. {pyibis_ami-7.2.1 → pyibis_ami-7.2.2}/src/pyibisami/tools/run_tests.py +0 -0
  51. {pyibis_ami-7.2.1 → pyibis_ami-7.2.2}/src/pyibisami/tools/test_results.xsl +0 -0
  52. {pyibis_ami-7.2.1 → pyibis_ami-7.2.2}/tests/test_run_tests.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyibis-ami
3
- Version: 7.2.1
3
+ Version: 7.2.2
4
4
  Summary: Facilitates working directly with IBIS-AMI DLLs from the Python command prompt.
5
5
  Author-email: David Banas <capn.freako@gmail.com>
6
6
  License-Expression: BSD-3-Clause
@@ -1,11 +1,11 @@
1
1
  [build-system]
2
- requires = ["setuptools>=61.0"]
2
+ requires = ["setuptools>=77.0"]
3
3
  build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "pyibis-ami"
7
7
  description = "Facilitates working directly with IBIS-AMI DLLs from the Python command prompt."
8
- version = "7.2.1"
8
+ version = "7.2.2"
9
9
  authors = [ {name = "David Banas", email = "capn.freako@gmail.com"}
10
10
  ]
11
11
  readme = "README.md"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyibis-ami
3
- Version: 7.2.1
3
+ Version: 7.2.2
4
4
  Summary: Facilitates working directly with IBIS-AMI DLLs from the Python command prompt.
5
5
  Author-email: David Banas <capn.freako@gmail.com>
6
6
  License-Expression: BSD-3-Clause
@@ -159,6 +159,13 @@ class AMIModelInitializer:
159
159
  if key in self._init_data:
160
160
  self._init_data[key] = optional_args[key]
161
161
 
162
+ def __str__(self):
163
+ return "\n\t".join([
164
+ f"AMIModelInitializer instance:",
165
+ f"`ami_params`: {self.ami_params}",
166
+ f"`info_params`: {self.ami_params}",
167
+ ])
168
+
162
169
  def _getChannelResponse(self):
163
170
  return list(map(float, self._init_data["channel_response"]))
164
171
 
@@ -234,6 +241,7 @@ class AMIModel: # pylint: disable=too-many-instance-attributes
234
241
  OSError: If given file cannot be opened.
235
242
  """
236
243
 
244
+ self._filename = filename
237
245
  self._ami_mem_handle = None
238
246
  my_dll = CDLL(filename)
239
247
  self._amiInit = my_dll.AMI_Init
@@ -255,6 +263,24 @@ class AMIModel: # pylint: disable=too-many-instance-attributes
255
263
  if self._ami_mem_handle:
256
264
  self._amiClose(self._ami_mem_handle)
257
265
 
266
+ def __str__(self):
267
+ return "\n\t".join([
268
+ f"AMIModel instance: `{self._filename}`",
269
+ f"Length of initOut = {len(self._initOut)}",
270
+ f"row_size = {self._row_size}",
271
+ f"num_aggressors = {self._num_aggressors}",
272
+ f"sample_interval = {self._sample_interval}",
273
+ f"bit_time = {self._bit_time}",
274
+ f"samps_per_bit = {self._samps_per_bit}",
275
+ f"bits_per_call = {self._bits_per_call}",
276
+ f"ami_params_in = {self._ami_params_in}",
277
+ f"ami_params_out = {self._ami_params_out}",
278
+ f"&ami_mem_handle = {byref(self._ami_mem_handle)}",
279
+ f"Message = {self._msg}",
280
+ f"AMI_Init(): {self._amiInit}",
281
+ f"AMI_GetWave(): {self._amiGetWave}",
282
+ f"AMI_Close(): {self._amiClose}",])
283
+
258
284
  def initialize(self, init_object: AMIModelInitializer):
259
285
  """
260
286
  Wraps the ``AMI_Init()`` function.
@@ -298,15 +324,13 @@ class AMIModel: # pylint: disable=too-many-instance-attributes
298
324
  "bit_time"
299
325
  ]
300
326
  self._info_params = init_object.info_params # pylint: disable=attribute-defined-outside-init
301
- assert self._info_params, RuntimeError(
302
- f"`info_params` is None!\n`init_object: {init_object}"
303
- ) # pylint: disable=attribute-defined-outside-init
304
327
 
305
328
  # Check GetWave() consistency if possible.
306
329
  if init_object.info_params and init_object.info_params["GetWave_Exists"]:
307
- assert self._amiGetWave, RuntimeError(
308
- "Reserved parameter `GetWave_Exists` is True, but I can't bind to `AMI_GetWave()`!"
309
- )
330
+ if not self._amiGetWave:
331
+ raise RuntimeError(
332
+ "Reserved parameter `GetWave_Exists` is True, but I can't bind to `AMI_GetWave()`!"
333
+ )
310
334
 
311
335
  # Construct the AMI parameters string.
312
336
  def sexpr(pname, pval):
@@ -420,9 +444,19 @@ class AMIModel: # pylint: disable=too-many-instance-attributes
420
444
  else:
421
445
  tmp_wave = wave[idx: idx + samps_per_call]
422
446
  _wave = Signal(*tmp_wave)
423
- self._amiGetWave(
424
- byref(_wave), len(_wave), byref(_clock_times), byref(self._ami_params_out), self._ami_mem_handle
425
- ) # type: ignore
447
+ try:
448
+ self._amiGetWave(
449
+ byref(_wave), len(_wave), byref(_clock_times),
450
+ byref(self._ami_params_out), self._ami_mem_handle
451
+ ) # type: ignore
452
+ except OSError:
453
+ print(self)
454
+ print(f"byref(_wave): {byref(_wave)}")
455
+ print(f"len(_wave): {len(_wave)}")
456
+ print(f"byref(_clock_times): {byref(_clock_times)}")
457
+ print(f"byref(self._ami_params_out): {byref(self._ami_params_out)}")
458
+ print(f"self._ami_mem_handle: {self._ami_mem_handle}")
459
+ raise
426
460
  wave_out.extend(_wave)
427
461
  clock_times.extend(_clock_times)
428
462
  params_out.append(self.ami_params_out)
@@ -14,8 +14,8 @@ from scipy.linalg import convolution_matrix, lstsq
14
14
 
15
15
  Real = TypeVar("Real", float, float)
16
16
  Comp = TypeVar("Comp", complex, complex)
17
- Rvec: TypeAlias = npt.NDArray[Real]
18
- Cvec: TypeAlias = npt.NDArray[Comp]
17
+ Rvec: TypeAlias = npt.NDArray["Real"]
18
+ Cvec: TypeAlias = npt.NDArray["Comp"]
19
19
 
20
20
  PI: float = 3.141592653589793238462643383279502884
21
21
  TWOPI: float = 2.0 * PI
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes