micress-micpy 0.3.1b0__py3-none-any.whl → 0.3.1b1__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.
micpy/bin.py CHANGED
@@ -394,7 +394,7 @@ class Series(np.ndarray):
394
394
  obj.times = [field.time for field in fields]
395
395
  obj.spacings = [field.spacing for field in fields]
396
396
  return obj
397
-
397
+
398
398
  def __array_finalize__(self, obj):
399
399
  if obj is None:
400
400
  return
@@ -431,7 +431,6 @@ class Series(np.ndarray):
431
431
  return series
432
432
  raise TypeError("Invalid argument type")
433
433
 
434
-
435
434
  def write(self, filename: str, compressed: bool = True, geometry: bool = True):
436
435
  """Write the series to a binary file.
437
436
 
@@ -588,8 +587,8 @@ class File:
588
587
  """Set the geometry.
589
588
 
590
589
  Args:
591
- shape (Tuple[int, int, int]): Shape of the geometry.
592
- spacing (Tuple[float, float, float]): Spacing of the geometry in μm.
590
+ shape (Tuple[int, int, int]): Shape of the geometry (z, y, x).
591
+ spacing (Tuple[float, float, float]): Spacing of the geometry (dz, dy, dx) in μm.
593
592
  """
594
593
 
595
594
  self.shape = np.array(shape)
@@ -610,8 +609,8 @@ class File:
610
609
 
611
610
  geometry = geo.read(filename, type=geo.Type.BASIC, compressed=compressed)
612
611
 
613
- shape = geometry["shape"]
614
- spacing = geometry["spacing"]
612
+ shape = geometry["shape"][::-1]
613
+ spacing = geometry["spacing"][::-1]
615
614
 
616
615
  self.set_geometry(shape, spacing)
617
616
 
@@ -755,7 +754,7 @@ def plot(
755
754
 
756
755
  if axis not in ["x", "y", "z"]:
757
756
  raise ValueError("Invalid axis")
758
-
757
+
759
758
  if field.ndim != 3:
760
759
  raise ValueError("Invalid field shape")
761
760
 
@@ -768,8 +767,6 @@ def plot(
768
767
  elif axis == "y":
769
768
  x, y = "x", "z"
770
769
  slice_2d = field[:, index, :]
771
- if Field.dimensions(field.shape) == 2:
772
- slice_2d = slice_2d.reshape(slice_2d.shape[1], slice_2d.shape[0])
773
770
  elif axis == "x":
774
771
  x, y = "y", "z"
775
772
  slice_2d = field[:, :, index]
micpy/geo.py CHANGED
@@ -165,8 +165,8 @@ def build(
165
165
 
166
166
  Args:
167
167
  filename (str): Filename of a binary file.
168
- shape (tuple): Shape of the geometry.
169
- spacing (tuple): Spacing of the geometry.
168
+ shape (tuple): Shape of the geometry (z, y, x).
169
+ spacing (tuple): Spacing of the geometry (dz, dy, dx) in μm.
170
170
  """
171
171
  geo_filename = _get_basename(Path(filename)).with_suffix(".geoF")
172
172
  geo_data = {
micpy/version.py CHANGED
@@ -1 +1 @@
1
- __version__ = "0.3.1b0"
1
+ __version__ = "0.3.1b1"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: micress-micpy
3
- Version: 0.3.1b0
3
+ Version: 0.3.1b1
4
4
  Summary: MicPy is a Python package to facilitate MICRESS workflows.
5
5
  Author: Lukas Koschmieder
6
6
  Author-email: l.koschmieder@access-technology.de
@@ -0,0 +1,12 @@
1
+ micpy/__init__.py,sha256=7wQUaseppjQYZW1iAVNm2WSDjvBLlqtY8tiHsfDaW5Q,148
2
+ micpy/bin.py,sha256=LQiaAxLCyBw_7kfimFbZtqqMoP3iAYFVKDc4Ohvyxm8,25729
3
+ micpy/geo.py,sha256=z7dP3hC2Fhed4N5eRrlWlC4jtIXiYPIx2BYNhn10dfw,7447
4
+ micpy/matplotlib.py,sha256=GF2ghyBORC5RRjW00DdsHu5aSkpMFdI9wqg6d_psPsI,1198
5
+ micpy/tab.py,sha256=QCnfggxRWkKgS9-zGj8kyCjhfUw7QeTgGZWedHh4MTw,3548
6
+ micpy/utils.py,sha256=Kt1AvhMvWer9uftbb88X7N27aXtQdJl26grHmmm2vOQ,859
7
+ micpy/version.py,sha256=zKEPT4cdwsCB_uCEMo5TXBcz3hseWXYp71mYqedQBds,25
8
+ micress_micpy-0.3.1b1.dist-info/LICENSE,sha256=seHdCiArizUoWZ6bEFg6N3K2ZtfPK35wvOwg0kH-f6o,1488
9
+ micress_micpy-0.3.1b1.dist-info/METADATA,sha256=5oK-n39nupCZmnR1PNSesTpWkYhTFREiJFGAuY_mZ7g,1229
10
+ micress_micpy-0.3.1b1.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
11
+ micress_micpy-0.3.1b1.dist-info/top_level.txt,sha256=RiopkpW0AGNYdtOW2eQUWgm3yHGC13q9pWlHb2alhiE,6
12
+ micress_micpy-0.3.1b1.dist-info/RECORD,,
@@ -1,12 +0,0 @@
1
- micpy/__init__.py,sha256=7wQUaseppjQYZW1iAVNm2WSDjvBLlqtY8tiHsfDaW5Q,148
2
- micpy/bin.py,sha256=3xclBJLbbBW9N8w9izFEgFh3S2yKgYzrdQKjJsXftSU,25831
3
- micpy/geo.py,sha256=lVRTtPnTEykkSXNyLm3wnxXOwz72PFu0Spv8ZGHyUHo,7417
4
- micpy/matplotlib.py,sha256=GF2ghyBORC5RRjW00DdsHu5aSkpMFdI9wqg6d_psPsI,1198
5
- micpy/tab.py,sha256=QCnfggxRWkKgS9-zGj8kyCjhfUw7QeTgGZWedHh4MTw,3548
6
- micpy/utils.py,sha256=Kt1AvhMvWer9uftbb88X7N27aXtQdJl26grHmmm2vOQ,859
7
- micpy/version.py,sha256=o80l_DIF5j_g0KFIiC8SP5DtyipTIK4_NRfkjHjz1Mk,25
8
- micress_micpy-0.3.1b0.dist-info/LICENSE,sha256=seHdCiArizUoWZ6bEFg6N3K2ZtfPK35wvOwg0kH-f6o,1488
9
- micress_micpy-0.3.1b0.dist-info/METADATA,sha256=UFUfB1rNxBQxj1OlMO9Qo3YX92weqibYc59tujF8lBo,1229
10
- micress_micpy-0.3.1b0.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
11
- micress_micpy-0.3.1b0.dist-info/top_level.txt,sha256=RiopkpW0AGNYdtOW2eQUWgm3yHGC13q9pWlHb2alhiE,6
12
- micress_micpy-0.3.1b0.dist-info/RECORD,,