tecio-python 0.4.2__tar.gz → 0.4.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 (53) hide show
  1. {tecio_python-0.4.2/tecio_python.egg-info → tecio_python-0.4.3}/PKG-INFO +1 -1
  2. {tecio_python-0.4.2 → tecio_python-0.4.3}/pyproject.toml +2 -1
  3. {tecio_python-0.4.2 → tecio_python-0.4.3}/tecio/__init__.py +1 -1
  4. {tecio_python-0.4.2 → tecio_python-0.4.3}/tecio/_plt_read.py +26 -14
  5. tecio_python-0.4.3/tecio/cli/tectable.py +1134 -0
  6. {tecio_python-0.4.2 → tecio_python-0.4.3/tecio_python.egg-info}/PKG-INFO +1 -1
  7. {tecio_python-0.4.2 → tecio_python-0.4.3}/tecio_python.egg-info/SOURCES.txt +1 -0
  8. {tecio_python-0.4.2 → tecio_python-0.4.3}/tecio_python.egg-info/entry_points.txt +1 -0
  9. {tecio_python-0.4.2 → tecio_python-0.4.3}/tests/test_cli.py +780 -0
  10. {tecio_python-0.4.2 → tecio_python-0.4.3}/tests/test_elements.py +0 -0
  11. {tecio_python-0.4.2 → tecio_python-0.4.3}/tests/test_write.py +38 -0
  12. {tecio_python-0.4.2 → tecio_python-0.4.3}/LICENSE +0 -0
  13. {tecio_python-0.4.2 → tecio_python-0.4.3}/NOTICE +0 -0
  14. {tecio_python-0.4.2 → tecio_python-0.4.3}/README.md +0 -0
  15. {tecio_python-0.4.2 → tecio_python-0.4.3}/plugins/matlab/contourfe.m +0 -0
  16. {tecio_python-0.4.2 → tecio_python-0.4.3}/plugins/matlab/tecmat2struct.m +0 -0
  17. {tecio_python-0.4.2 → tecio_python-0.4.3}/plugins/paraview/TecplotTecioReader.py +0 -0
  18. {tecio_python-0.4.2 → tecio_python-0.4.3}/plugins/paraview/TecplotTecioWriter.py +0 -0
  19. {tecio_python-0.4.2 → tecio_python-0.4.3}/setup.cfg +0 -0
  20. {tecio_python-0.4.2 → tecio_python-0.4.3}/tecio/_constants.py +0 -0
  21. {tecio_python-0.4.2 → tecio_python-0.4.3}/tecio/_containers.py +0 -0
  22. {tecio_python-0.4.2 → tecio_python-0.4.3}/tecio/_dat_read.py +0 -0
  23. {tecio_python-0.4.2 → tecio_python-0.4.3}/tecio/_dat_write.py +0 -0
  24. {tecio_python-0.4.2 → tecio_python-0.4.3}/tecio/_elements.py +0 -0
  25. {tecio_python-0.4.2 → tecio_python-0.4.3}/tecio/_io.py +0 -0
  26. {tecio_python-0.4.2 → tecio_python-0.4.3}/tecio/_meta.py +0 -0
  27. {tecio_python-0.4.2 → tecio_python-0.4.3}/tecio/_plt_legacy.py +0 -0
  28. {tecio_python-0.4.2 → tecio_python-0.4.3}/tecio/_plt_write.py +0 -0
  29. {tecio_python-0.4.2 → tecio_python-0.4.3}/tecio/_reader.py +0 -0
  30. {tecio_python-0.4.2 → tecio_python-0.4.3}/tecio/_szl_read.py +0 -0
  31. {tecio_python-0.4.2 → tecio_python-0.4.3}/tecio/_szl_write.py +0 -0
  32. {tecio_python-0.4.2 → tecio_python-0.4.3}/tecio/_utils.py +0 -0
  33. {tecio_python-0.4.2 → tecio_python-0.4.3}/tecio/_writer.py +0 -0
  34. {tecio_python-0.4.2 → tecio_python-0.4.3}/tecio/cli/__init__.py +0 -0
  35. {tecio_python-0.4.2 → tecio_python-0.4.3}/tecio/cli/tec2mat.py +0 -0
  36. {tecio_python-0.4.2 → tecio_python-0.4.3}/tecio/cli/tecaux.py +0 -0
  37. {tecio_python-0.4.2 → tecio_python-0.4.3}/tecio/cli/tecdump.py +0 -0
  38. {tecio_python-0.4.2 → tecio_python-0.4.3}/tecio/cli/tecelretyp.py +0 -0
  39. {tecio_python-0.4.2 → tecio_python-0.4.3}/tecio/cli/tecextract.py +0 -0
  40. {tecio_python-0.4.2 → tecio_python-0.4.3}/tecio/cli/tecfix.py +0 -0
  41. {tecio_python-0.4.2 → tecio_python-0.4.3}/tecio/cli/tecmerge.py +0 -0
  42. {tecio_python-0.4.2 → tecio_python-0.4.3}/tecio/cli/teconvert.py +0 -0
  43. {tecio_python-0.4.2 → tecio_python-0.4.3}/tecio/cli/tecscale.py +0 -0
  44. {tecio_python-0.4.2 → tecio_python-0.4.3}/tecio/cli/tecslice.py +0 -0
  45. {tecio_python-0.4.2 → tecio_python-0.4.3}/tecio/cli/tecstats.py +0 -0
  46. {tecio_python-0.4.2 → tecio_python-0.4.3}/tecio/libtecio.py +0 -0
  47. {tecio_python-0.4.2 → tecio_python-0.4.3}/tecio_python.egg-info/dependency_links.txt +0 -0
  48. {tecio_python-0.4.2 → tecio_python-0.4.3}/tecio_python.egg-info/requires.txt +0 -0
  49. {tecio_python-0.4.2 → tecio_python-0.4.3}/tecio_python.egg-info/top_level.txt +0 -0
  50. {tecio_python-0.4.2 → tecio_python-0.4.3}/tests/test_io.py +0 -0
  51. {tecio_python-0.4.2 → tecio_python-0.4.3}/tests/test_libtecio.py +0 -0
  52. {tecio_python-0.4.2 → tecio_python-0.4.3}/tests/test_read.py +0 -0
  53. {tecio_python-0.4.2 → tecio_python-0.4.3}/tests/test_read_legacy.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tecio-python
3
- Version: 0.4.2
3
+ Version: 0.4.3
4
4
  Summary: Python interface for reading and writing Tecplot data files
5
5
  License-Expression: Apache-2.0
6
6
  Project-URL: Homepage, https://github.com/meersman/tecio-python
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "tecio-python"
7
- version = "0.4.2"
7
+ version = "0.4.3"
8
8
  license = "Apache-2.0"
9
9
  description = "Python interface for reading and writing Tecplot data files"
10
10
 
@@ -48,6 +48,7 @@ tecmerge = "tecio.cli.tecmerge:main"
48
48
  tecscale = "tecio.cli.tecscale:main"
49
49
  tecslice = "tecio.cli.tecslice:main"
50
50
  tecstats = "tecio.cli.tecstats:main"
51
+ tectable = "tecio.cli.tectable:main"
51
52
 
52
53
  [project.optional-dependencies]
53
54
  dev = [
@@ -11,7 +11,7 @@ from importlib import metadata
11
11
  try:
12
12
  __version__ = metadata.version("tecio")
13
13
  except metadata.PackageNotFoundError:
14
- __version__ = "0.4.2"
14
+ __version__ = "0.4.3"
15
15
 
16
16
  from . import cli, libtecio
17
17
  from ._constants import (
@@ -819,11 +819,13 @@ class _PltParser:
819
819
  def _var_value_count(self, meta: _ZoneMeta, var_idx: int) -> int:
820
820
  """Return the number of values on disk for variable *var_idx*.
821
821
 
822
- For cell-centered variables in ORDERED zones the PLT format writes ``IMax * JMax
823
- * (KMax - 1)`` values on disk (see Note 5 of the format spec). The significant
824
- cell count is ``(I-1) * (J-1) * (K-1)``; the remainder are ghost (zero-padded)
825
- values that are trimmed in :meth:`TecplotPltVariableReader.get_values` after
826
- reshaping.
822
+ For cell-centered variables in ORDERED zones the PLT format pads every
823
+ dimension but the last one with more than one node (see Note 5 of the format
824
+ spec): ``IMax * JMax * (KMax - 1)`` values on disk for an IJK-ordered zone,
825
+ ``IMax * (JMax - 1)`` for an IJ-ordered zone and ``IMax - 1`` for an I-ordered
826
+ zone. The significant cell count is ``(I-1) * (J-1) * (K-1)``; the remainder
827
+ are ghost (zero-padded) values that are trimmed in
828
+ :meth:`TecplotPltVariableReader.get_values` after reshaping.
827
829
 
828
830
  For FE zones, cell-centered variables store exactly one value per element with
829
831
  no padding.
@@ -835,10 +837,14 @@ class _PltParser:
835
837
  j = max(meta.j_max, 1)
836
838
  k = max(meta.k_max, 1)
837
839
  if loc == ValueLocation.CELL_CENTERED:
838
- # PLT Note 5: IMax * JMax * (KMax - 1) values on disk. Only K is
839
- # reduced; I and J retain their full extent as ghost padding in the
840
- # Fortran-order layout.
841
- return i * j * max(k - 1, 1)
840
+ # PLT Note 5: only the last dimension with more than one node is
841
+ # reduced; the dimensions before it retain their full extent as ghost
842
+ # padding in the Fortran-order layout.
843
+ if k > 1:
844
+ return i * j * (k - 1)
845
+ if j > 1:
846
+ return i * (j - 1)
847
+ return max(i - 1, 1)
842
848
  return i * j * k
843
849
  else:
844
850
  # FE zones — no ghost padding.
@@ -1260,11 +1266,17 @@ class TecplotPltVariableReader(TecplotVariableReader):
1260
1266
  if full_read and meta.zone_type == ZoneType.ORDERED:
1261
1267
  ni, nj, nk = meta.i_max, meta.j_max, meta.k_max
1262
1268
  if meta.value_locations[self.var_index] == ValueLocation.CELL_CENTERED:
1263
- # On disk: i * j * (k-1) values in Fortran order. Ghost padding occupies
1264
- # the last row in I and J after reshape, so reshape to (ni, nj, nk-1)
1265
- # then slice to (ni-1, nj-1, nk-1) to discard the ghost values and
1266
- # return only significant cells.
1267
- data = data.reshape((ni, nj, max(nk - 1, 1)), order="F")
1269
+ # On disk: the padded layout of _var_value_count in Fortran order. Ghost
1270
+ # padding occupies the last row of each padded dimension after reshape,
1271
+ # so reshape to the padded shape then slice to (ni-1, nj-1, nk-1) to
1272
+ # discard the ghost values and return only significant cells.
1273
+ if nk > 1:
1274
+ padded = (ni, nj, nk - 1)
1275
+ elif nj > 1:
1276
+ padded = (ni, nj - 1, 1)
1277
+ else:
1278
+ padded = (max(ni - 1, 1), 1, 1)
1279
+ data = data.reshape(padded, order="F")
1268
1280
  data = data[: max(ni - 1, 1), : max(nj - 1, 1), :]
1269
1281
  else:
1270
1282
  shape = (ni, nj, nk)