empix 0.0.2__py3-none-any.whl → 0.0.4__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.
empix/__init__.py CHANGED
@@ -26,6 +26,10 @@ microscopy data that are not available in `hyperspy
26
26
  # For performing deep copies.
27
27
  import copy
28
28
 
29
+ # For checking whether certain submodules exists and for importing said
30
+ # submodules should they exist.
31
+ import importlib
32
+
29
33
 
30
34
 
31
35
  # For general array handling.
@@ -47,8 +51,10 @@ import hyperspy.signals
47
51
  import hyperspy.axes
48
52
 
49
53
  # For azimuthally integrating 2D hyperspy signals.
50
- import pyFAI.detectors
51
- import pyFAI.azimuthalIntegrator
54
+ detectors = importlib.import_module("pyFAI.detectors")
55
+ integrators = (importlib.import_module("pyFAI.integrator.azimuthal")
56
+ if importlib.util.find_spec("pyFAI.integrator")
57
+ else importlib.import_module("pyFAI.azimuthalIntegrator"))
52
58
 
53
59
  # For downsampling hyperspy signals.
54
60
  import skimage.measure
@@ -764,7 +770,11 @@ def _construct_azimuthal_integrator(signal, center):
764
770
  v_pixel_size = abs(v_scale)
765
771
  L = 10000 * max(v_pixel_size, h_pixel_size)
766
772
 
767
- AzimuthalIntegrator = pyFAI.azimuthalIntegrator.AzimuthalIntegrator
773
+ # ``integrators`` is an alias to a pyFAI submodule that was imported near
774
+ # the top of the current file using the ``importlib.import_module``
775
+ # function.
776
+ AzimuthalIntegrator = integrators.AzimuthalIntegrator
777
+
768
778
  kwargs = {"dist": L,
769
779
  "poni1": poni_1,
770
780
  "poni2": poni_2,
@@ -779,8 +789,12 @@ def _construct_pyfai_detector(signal):
779
789
  h_pixel_size = abs(signal.axes_manager[-2].scale)
780
790
  v_pixel_size = abs(signal.axes_manager[-1].scale)
781
791
 
792
+ # ``detectors`` is an alias to a pyFAI submodule that was imported near the
793
+ # top of the current file using the ``importlib.import_module`` function.
794
+ Detector = detectors.Detector
795
+
782
796
  kwargs = {"pixel1": v_pixel_size, "pixel2": h_pixel_size}
783
- detector = pyFAI.detectors.Detector(**kwargs)
797
+ detector = Detector(**kwargs)
784
798
 
785
799
  return detector
786
800
 
empix/version.py CHANGED
@@ -1,8 +1,13 @@
1
- # file generated by setuptools_scm
1
+ # file generated by setuptools-scm
2
2
  # don't change, don't track in version control
3
+
4
+ __all__ = ["__version__", "__version_tuple__", "version", "version_tuple"]
5
+
3
6
  TYPE_CHECKING = False
4
7
  if TYPE_CHECKING:
5
- from typing import Tuple, Union
8
+ from typing import Tuple
9
+ from typing import Union
10
+
6
11
  VERSION_TUPLE = Tuple[Union[int, str], ...]
7
12
  else:
8
13
  VERSION_TUPLE = object
@@ -12,5 +17,5 @@ __version__: str
12
17
  __version_tuple__: VERSION_TUPLE
13
18
  version_tuple: VERSION_TUPLE
14
19
 
15
- __version__ = version = '0.0.2'
16
- __version_tuple__ = version_tuple = (0, 0, 2)
20
+ __version__ = version = '0.0.4'
21
+ __version_tuple__ = version_tuple = (0, 0, 4)
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.2
1
+ Metadata-Version: 2.4
2
2
  Name: empix
3
- Version: 0.0.2
3
+ Version: 0.0.4
4
4
  Summary: Contains tools for analyzing electron microscopy data that are not available in ``hyperspy``.
5
5
  Author-email: Matthew Fitzpatrick <matthew.rc.fitzpatrick@gmail.com>
6
6
  Project-URL: Homepage, https://mrfitzpa.github.io/empix
@@ -23,7 +23,7 @@ Description-Content-Type: text/markdown
23
23
  License-File: LICENSE
24
24
  Requires-Dist: czekitout
25
25
  Requires-Dist: fancytypes>=1.0.0
26
- Requires-Dist: hyperspy[all]
26
+ Requires-Dist: hyperspy
27
27
  Requires-Dist: pyFAI
28
28
  Provides-Extra: tests
29
29
  Requires-Dist: pytest-cov; extra == "tests"
@@ -38,6 +38,7 @@ Requires-Dist: numpydoc; extra == "docs"
38
38
  Requires-Dist: docutils; extra == "docs"
39
39
  Provides-Extra: all
40
40
  Requires-Dist: empix[docs,examples,tests]; extra == "all"
41
+ Dynamic: license-file
41
42
 
42
43
  # empix
43
44
 
@@ -0,0 +1,7 @@
1
+ empix/__init__.py,sha256=7Lo1f3w6dIc5ZSzjcrSNr8p9hSriZpYoaeeWdje-NPw,146382
2
+ empix/version.py,sha256=EY1c6JeG6uVHQoQcoxYAagjmJgQQxJk7iQ23gAoevU4,511
3
+ empix-0.0.4.dist-info/licenses/LICENSE,sha256=N0P3pKtRMvfb64jmgJdlerg3TnS0a2QC776AzPsbZIg,35128
4
+ empix-0.0.4.dist-info/METADATA,sha256=gJlmw2qU8hNKNjjjm_rhmzsfvUejn1x1bOQ4jgEDKaQ,3079
5
+ empix-0.0.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
6
+ empix-0.0.4.dist-info/top_level.txt,sha256=6tteq_gpCW5Q3p1mBQfWv4h9jSqHMOyUrpe7PEXYdso,6
7
+ empix-0.0.4.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (75.8.0)
2
+ Generator: setuptools (80.9.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -1,7 +0,0 @@
1
- empix/__init__.py,sha256=Yj_pxDlZOjk_4IPyo1ZB3qEP1paaDkSzkJ7z2p6DBt8,145721
2
- empix/version.py,sha256=NDHlyIcJZjLz8wKlmD1-pr6me5FHBAYwO_ynLG-37N8,411
3
- empix-0.0.2.dist-info/LICENSE,sha256=N0P3pKtRMvfb64jmgJdlerg3TnS0a2QC776AzPsbZIg,35128
4
- empix-0.0.2.dist-info/METADATA,sha256=bnI1Ha9AwrCcB1Xe3pn6g_PJqlKEL1L7sNVAvi2m3PQ,3062
5
- empix-0.0.2.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
6
- empix-0.0.2.dist-info/top_level.txt,sha256=6tteq_gpCW5Q3p1mBQfWv4h9jSqHMOyUrpe7PEXYdso,6
7
- empix-0.0.2.dist-info/RECORD,,