stemdiff 5.2.4__py3-none-any.whl → 5.2.6__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.
- stemdiff/__init__.py +3 -3
- stemdiff/dbase.py +2 -2
- stemdiff/detectors.py +14 -16
- stemdiff/gvars.py +10 -14
- stemdiff/io.py +6 -4
- stemdiff/sum.py +2 -2
- stemdiff/summ.py +2 -2
- {stemdiff-5.2.4.dist-info → stemdiff-5.2.6.dist-info}/METADATA +2 -2
- stemdiff-5.2.6.dist-info/RECORD +12 -0
- {stemdiff-5.2.4.dist-info → stemdiff-5.2.6.dist-info}/WHEEL +1 -1
- stemdiff-5.2.4.dist-info/RECORD +0 -12
- {stemdiff-5.2.4.dist-info → stemdiff-5.2.6.dist-info}/LICENCE +0 -0
- {stemdiff-5.2.4.dist-info → stemdiff-5.2.6.dist-info}/top_level.txt +0 -0
stemdiff/__init__.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'''
|
|
2
|
-
STEMDIFF
|
|
3
|
-
|
|
2
|
+
Package: STEMDIFF
|
|
3
|
+
-----------------
|
|
4
4
|
Conversion of a 4D-STEM dataset to a 2D-powder diffration pattern.
|
|
5
5
|
|
|
6
6
|
* Input = 4D-STEM dataset = 2D-array of 2D-NBD patterns.
|
|
@@ -30,7 +30,7 @@ STEMDIFF auxiliary package IDIFF and its modules:
|
|
|
30
30
|
- idiff.ncore = noise correction/reduction
|
|
31
31
|
- idiff.psf = estimate of PSF function
|
|
32
32
|
'''
|
|
33
|
-
__version__ = "5.2.
|
|
33
|
+
__version__ = "5.2.6"
|
|
34
34
|
|
|
35
35
|
# Import modules of stemdiff package
|
|
36
36
|
# this enables us to use modules as follows:
|
stemdiff/dbase.py
CHANGED
stemdiff/detectors.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'''
|
|
2
|
-
stemdiff.detectors
|
|
3
|
-
|
|
2
|
+
Module: stemdiff.detectors
|
|
3
|
+
--------------------------
|
|
4
4
|
Description of detectors that can be used in stemdiff package.
|
|
5
5
|
|
|
6
6
|
This module is basically a container of classes.
|
|
@@ -63,7 +63,7 @@ def print_known_detectors():
|
|
|
63
63
|
|
|
64
64
|
def describe_detector(detector_object):
|
|
65
65
|
'''
|
|
66
|
-
|
|
66
|
+
Global method: the description of the detector on the screen.
|
|
67
67
|
|
|
68
68
|
Parameters
|
|
69
69
|
----------
|
|
@@ -83,7 +83,8 @@ def describe_detector(detector_object):
|
|
|
83
83
|
>>> # (minimalistic example
|
|
84
84
|
>>> import stemdiff as sd
|
|
85
85
|
>>> my_detector = sd.detectors.TimePix()
|
|
86
|
-
>>> my_detector.self_describe()
|
|
86
|
+
>>> my_detector.self_describe() # OO-interface, indirect call
|
|
87
|
+
>>> describe_detector(my_detector) # procedural interface, direct call
|
|
87
88
|
>>>
|
|
88
89
|
>>> # Real usage
|
|
89
90
|
>>> # (in STEMDIFF scripts,
|
|
@@ -145,12 +146,10 @@ class TimePix:
|
|
|
145
146
|
|
|
146
147
|
def __init__(self, detector_name='TimePix',
|
|
147
148
|
detector_size=256, max_intensity=11810,
|
|
148
|
-
data_type=np.uint16, upscale=4):
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
* Auto-documentation list (some of) the initialization parameters.
|
|
153
|
-
'''
|
|
149
|
+
data_type=np.uint16, upscale=4):
|
|
150
|
+
# The initialization of TimePix detector objects.
|
|
151
|
+
# The parameters are described above in class definition.
|
|
152
|
+
# -----
|
|
154
153
|
self.detector_name = detector_name
|
|
155
154
|
self.detector_size = detector_size
|
|
156
155
|
self.max_intensity = max_intensity
|
|
@@ -259,8 +258,8 @@ class Secom:
|
|
|
259
258
|
-------
|
|
260
259
|
Secom detector object.
|
|
261
260
|
|
|
262
|
-
Format of
|
|
263
|
-
|
|
261
|
+
Format of SECOM datafiles
|
|
262
|
+
-------------------------
|
|
264
263
|
* image files, TIFF format
|
|
265
264
|
* 16-bit images = images containing np.uint16 values
|
|
266
265
|
'''
|
|
@@ -269,10 +268,9 @@ class Secom:
|
|
|
269
268
|
def __init__(self, detector_name='Secom',
|
|
270
269
|
detector_size=2048, max_intensity=65536,
|
|
271
270
|
data_type=np.uint16, upscale=1):
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
'''
|
|
271
|
+
# The initialization of Secom detector objects.
|
|
272
|
+
# The parameters are described above in class definition.
|
|
273
|
+
# -----
|
|
276
274
|
self.detector_name = detector_name
|
|
277
275
|
self.detector_size = detector_size
|
|
278
276
|
self.max_intensity = max_intensity
|
stemdiff/gvars.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'''
|
|
2
|
-
stemdiff.gvars
|
|
3
|
-
|
|
2
|
+
Module: stemdiff.gvars
|
|
3
|
+
----------------------
|
|
4
4
|
Global variables/objects for package stemdiff.
|
|
5
5
|
|
|
6
6
|
The global variables are used throughout the whole program.
|
|
@@ -53,15 +53,13 @@ class SourceData:
|
|
|
53
53
|
|
|
54
54
|
Returns
|
|
55
55
|
-------
|
|
56
|
-
DataFiles object
|
|
56
|
+
DataFiles object
|
|
57
57
|
'''
|
|
58
58
|
|
|
59
59
|
def __init__(self, detector, data_dir, filenames):
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
* Auto-documentation list (some of) the initialization parameters.
|
|
64
|
-
'''
|
|
60
|
+
# The initialization of SourceData objects.
|
|
61
|
+
# The parameters are described above in class definition.
|
|
62
|
+
# -----
|
|
65
63
|
self.detector = detector
|
|
66
64
|
self.data_dir = Path(data_dir)
|
|
67
65
|
self.filenames = self.data_dir.glob(filenames)
|
|
@@ -97,18 +95,16 @@ class DiffImages:
|
|
|
97
95
|
|
|
98
96
|
Returns
|
|
99
97
|
-------
|
|
100
|
-
DiffImages object
|
|
98
|
+
DiffImages object
|
|
101
99
|
'''
|
|
102
100
|
|
|
103
101
|
def __init__(self,
|
|
104
102
|
imgsize=100, psfsize=30,
|
|
105
103
|
ctype=2, csquare=20, cintensity=0.8,
|
|
106
104
|
peak_height=100, peak_dist=3):
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
* Auto-documentation list (some of) the initialization parameters.
|
|
111
|
-
'''
|
|
105
|
+
# The initialization of DiffImages objects.
|
|
106
|
+
# The parameters are described above in class definition.
|
|
107
|
+
# -----
|
|
112
108
|
self.imgsize = imgsize
|
|
113
109
|
self.psfsize = psfsize
|
|
114
110
|
self.ctype = ctype
|
stemdiff/io.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'''
|
|
2
|
-
stemdiff.io
|
|
3
|
-
|
|
2
|
+
Module: stemdiff.io
|
|
3
|
+
-------------------
|
|
4
4
|
Input/output functions for package stemdiff.
|
|
5
5
|
|
|
6
6
|
Three types of stemdiff.io objects
|
|
@@ -69,7 +69,8 @@ def set_plot_parameters(size=(12,9), dpi=75, fontsize=10, my_rcParams=None):
|
|
|
69
69
|
|
|
70
70
|
Returns
|
|
71
71
|
-------
|
|
72
|
-
None
|
|
72
|
+
None
|
|
73
|
+
The result is a modification of the global plt.rcParams variable.
|
|
73
74
|
'''
|
|
74
75
|
# This function just calls the final function in Plotting module.
|
|
75
76
|
# (left in the main namespace of the package as it is frequently used
|
|
@@ -79,7 +80,8 @@ def set_plot_parameters(size=(12,9), dpi=75, fontsize=10, my_rcParams=None):
|
|
|
79
80
|
class Datafiles:
|
|
80
81
|
'''
|
|
81
82
|
Datafiles class = a collection of functions
|
|
82
|
-
that work with datafiles from 2D-STEM detector
|
|
83
|
+
that work with datafiles from 2D-STEM detector
|
|
84
|
+
(assumption: the datafiles were saved as standard files on a disk).
|
|
83
85
|
'''
|
|
84
86
|
|
|
85
87
|
def read(SDATA, filename):
|
stemdiff/sum.py
CHANGED
stemdiff/summ.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: stemdiff
|
|
3
|
-
Version: 5.2.
|
|
3
|
+
Version: 5.2.6
|
|
4
4
|
Summary: Convert 4D-STEM data to 2D-powder diffraction pattern.
|
|
5
5
|
Home-page: https://github.com/mirekslouf/stemdiff/
|
|
6
6
|
Author: Mirek Slouf
|
|
@@ -50,7 +50,7 @@ Quick start
|
|
|
50
50
|
-----------
|
|
51
51
|
|
|
52
52
|
* See how it works:
|
|
53
|
-
- Look at [worked example](https://www.dropbox.com/scl/fi/
|
|
53
|
+
- Look at [worked example](https://www.dropbox.com/scl/fi/l5eskdgxo7976ea9x35fp/01_sdiff_au.nb.pdf?rlkey=7yd5tqtcm3zxr1uc0m0aisenl&dl=0)
|
|
54
54
|
in Jupyter.
|
|
55
55
|
* Try it yourself:
|
|
56
56
|
- Download [complete examples with data](https://www.dropbox.com/scl/fo/ccb6hs28er9dc1xufshh4/h?rlkey=omk5bqoe17jmedhj407ng9xr0&dl=0).
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
stemdiff/__init__.py,sha256=K7AYDcJfkHbamsYMlOxrSClUDdTIu6ZGuQ8_RdHt2bI,1998
|
|
2
|
+
stemdiff/dbase.py,sha256=Z-41mzzX2XqWJwPCPNMIboq7m57NtJhP4ViTfPssvpk,5985
|
|
3
|
+
stemdiff/detectors.py,sha256=YHiOZjEaeOtYstlX0ATFPWqfVMVIiJCfFthXtVuVZaw,11850
|
|
4
|
+
stemdiff/gvars.py,sha256=BBMM70kv-l3_mSQb_GX1abNR-EYewvUgZYkB66RQG0M,4453
|
|
5
|
+
stemdiff/io.py,sha256=xHmjy5KYWz1P0cnYK8nVesf6AoDHQIWc7aeXFUUJIHM,48011
|
|
6
|
+
stemdiff/sum.py,sha256=ZEHgLbdaQkooB7ZWgTxxmLJZpM5yCxCaOlK70A1rNSU,14607
|
|
7
|
+
stemdiff/summ.py,sha256=LBhgfmPEvWMmCruZE2K7-XYSjA7Mh33WrziP4bTGcU4,8030
|
|
8
|
+
stemdiff-5.2.6.dist-info/LICENCE,sha256=A0HugtkWkgCwRhYrsSqENRlIFre2Vu14xQajDnsYlqU,1340
|
|
9
|
+
stemdiff-5.2.6.dist-info/METADATA,sha256=V8X-PpDZnkPoXO6FkUgPybTrFu3Id3v4UZsrjr2EXhM,4197
|
|
10
|
+
stemdiff-5.2.6.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
|
11
|
+
stemdiff-5.2.6.dist-info/top_level.txt,sha256=EQn-XSqpLeMnvowHwcgup7Qwlk6c0zeBT3abWmDapRQ,9
|
|
12
|
+
stemdiff-5.2.6.dist-info/RECORD,,
|
stemdiff-5.2.4.dist-info/RECORD
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
stemdiff/__init__.py,sha256=1xcqbYn-MYgCgIc9jLcjuEgtjXUL8hizM8JddRtm2SA,1996
|
|
2
|
-
stemdiff/dbase.py,sha256=ZrhCxZjG5HKzau89xQA7WiwR5ZMyTAmFzCbh9IFkziQ,5969
|
|
3
|
-
stemdiff/detectors.py,sha256=sFivE68oDdEff06Vf9CJFejo4-EY3E1B3aGggzn8kZY,11798
|
|
4
|
-
stemdiff/gvars.py,sha256=njyT8cYULdmnOAhCi6MeqDTaW4GrUrFaxiVePCvab9s,4610
|
|
5
|
-
stemdiff/io.py,sha256=me7FPuxooMRnTgwRV78V16ERQiw78-23diuAdCXp8yM,47940
|
|
6
|
-
stemdiff/sum.py,sha256=2BIHk8kIzuSREfQCt3Tgp24b8YdnfDZFMQDz5US9ayU,14591
|
|
7
|
-
stemdiff/summ.py,sha256=E1-I9mErLUwK8zJjr492D2Pz0P8GVaZ_5QUVHnbASgo,8014
|
|
8
|
-
stemdiff-5.2.4.dist-info/LICENCE,sha256=A0HugtkWkgCwRhYrsSqENRlIFre2Vu14xQajDnsYlqU,1340
|
|
9
|
-
stemdiff-5.2.4.dist-info/METADATA,sha256=0RV0DZiZ8n6o-DrWA_6149U-Oo9t5flhybcJXWMww_M,4197
|
|
10
|
-
stemdiff-5.2.4.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
|
|
11
|
-
stemdiff-5.2.4.dist-info/top_level.txt,sha256=EQn-XSqpLeMnvowHwcgup7Qwlk6c0zeBT3abWmDapRQ,9
|
|
12
|
-
stemdiff-5.2.4.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|