nxs-analysis-tools 0.1.2__py3-none-any.whl → 0.1.3__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.
Potentially problematic release.
This version of nxs-analysis-tools might be problematic. Click here for more details.
- _meta/__init__.py +1 -1
- nxs_analysis_tools/datareduction.py +16 -17
- nxs_analysis_tools/pairdistribution.py +2 -0
- {nxs_analysis_tools-0.1.2.dist-info → nxs_analysis_tools-0.1.3.dist-info}/METADATA +6 -4
- nxs_analysis_tools-0.1.3.dist-info/RECORD +11 -0
- nxs_analysis_tools-0.1.2.dist-info/RECORD +0 -11
- {nxs_analysis_tools-0.1.2.dist-info → nxs_analysis_tools-0.1.3.dist-info}/WHEEL +0 -0
- {nxs_analysis_tools-0.1.2.dist-info → nxs_analysis_tools-0.1.3.dist-info}/licenses/LICENSE +0 -0
- {nxs_analysis_tools-0.1.2.dist-info → nxs_analysis_tools-0.1.3.dist-info}/top_level.txt +0 -0
_meta/__init__.py
CHANGED
|
@@ -104,8 +104,7 @@ def array_to_nxdata(array, data_template, signal_name=None):
|
|
|
104
104
|
d = data_template
|
|
105
105
|
if signal_name is None:
|
|
106
106
|
signal_name = d.signal
|
|
107
|
-
return NXdata(NXfield(array, name=signal_name),
|
|
108
|
-
tuple(d[d.axes[i]] for i in range(len(d.axes))))
|
|
107
|
+
return NXdata(NXfield(array, name=signal_name), d.nxaxes)
|
|
109
108
|
|
|
110
109
|
|
|
111
110
|
def rebin_3d(array):
|
|
@@ -341,12 +340,12 @@ def plot_slice(data, X=None, Y=None, sum_axis=None, transpose=False, vmin=None,
|
|
|
341
340
|
|
|
342
341
|
# If three-dimensional, demand sum_axis to reduce to two dimensions.
|
|
343
342
|
if is_array and len(data.shape) == 3:
|
|
344
|
-
assert sum_axis is not None, "sum_axis must be specified when data is
|
|
343
|
+
assert sum_axis is not None, "sum_axis must be specified when data is 3D."
|
|
345
344
|
|
|
346
345
|
data = data.sum(axis=sum_axis)
|
|
347
346
|
|
|
348
347
|
if is_nxdata and len(data.shape) == 3:
|
|
349
|
-
assert sum_axis is not None, "sum_axis must be specified when data is
|
|
348
|
+
assert sum_axis is not None, "sum_axis must be specified when data is 3D."
|
|
350
349
|
|
|
351
350
|
arr = data.nxsignal.nxdata
|
|
352
351
|
arr = arr.sum(axis=sum_axis)
|
|
@@ -452,22 +451,22 @@ def plot_slice(data, X=None, Y=None, sum_axis=None, transpose=False, vmin=None,
|
|
|
452
451
|
# Add tick marks all around
|
|
453
452
|
ax.tick_params(direction='in', top=True, right=True, which='both')
|
|
454
453
|
|
|
455
|
-
#
|
|
456
|
-
if
|
|
457
|
-
# Add default minor ticks
|
|
454
|
+
# Automatically set tick locations, only if NXdata or if X,Y axes are provided for an array
|
|
455
|
+
if is_nxdata or (is_array and (X is not None and Y is not None)):
|
|
456
|
+
# Add default minor ticks on x
|
|
458
457
|
ax.xaxis.set_minor_locator(MultipleLocator(1))
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
# Add default minor ticks
|
|
465
|
-
ax.yaxis.set_minor_locator(MultipleLocator(1))
|
|
466
|
-
else:
|
|
467
|
-
# Otherwise use user provided values
|
|
468
|
-
ax.yaxis.set_major_locator(MultipleLocator(yticks))
|
|
458
|
+
|
|
459
|
+
if xticks is not None:
|
|
460
|
+
# Use user provided values
|
|
461
|
+
ax.xaxis.set_major_locator(MultipleLocator(xticks))
|
|
462
|
+
|
|
463
|
+
# Add default minor ticks on y
|
|
469
464
|
ax.yaxis.set_minor_locator(MultipleLocator(1))
|
|
470
465
|
|
|
466
|
+
if yticks is not None:
|
|
467
|
+
# Use user provided values
|
|
468
|
+
ax.yaxis.set_major_locator(MultipleLocator(yticks))
|
|
469
|
+
|
|
471
470
|
# Apply transform to tick marks
|
|
472
471
|
for i in range(0, len(ax.xaxis.get_ticklines())):
|
|
473
472
|
# Tick marker
|
|
@@ -400,6 +400,8 @@ class Symmetrizer3D:
|
|
|
400
400
|
The input 3D dataset to be symmetrized.
|
|
401
401
|
"""
|
|
402
402
|
|
|
403
|
+
assert data is not None, "Symmetrizer3D requires a 3D NXdata object for initialization."
|
|
404
|
+
|
|
403
405
|
self.a, self.b, self.c, self.al, self.be, self.ga = [None] * 6
|
|
404
406
|
self.a_star, self.b_star, self.c_star, self.al_star, self.be_star, self.ga_star = [None] * 6
|
|
405
407
|
self.lattice_params = None
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: nxs-analysis-tools
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.3
|
|
4
4
|
Summary: Reduce and transform nexus format (.nxs) scattering data.
|
|
5
5
|
Author-email: "Steven J. Gomez Alvarado" <stevenjgomez@ucsb.edu>
|
|
6
6
|
License: MIT License
|
|
@@ -29,8 +29,9 @@ Project-URL: Download, https://pypi.org/project/nxs-analysis-tools/
|
|
|
29
29
|
Project-URL: Bug Tracker, https://github.com/stevenjgomez/nxs_analysis_tools/issues
|
|
30
30
|
Project-URL: Documentation, https://nxs-analysis-tools.readthedocs.io/en/stable/
|
|
31
31
|
Project-URL: Source Code, https://github.com/stevenjgomez/nxs_analysis_tools
|
|
32
|
+
Project-URL: DOI, https://doi.org/10.5281/zenodo.15186359
|
|
32
33
|
Keywords: diffraction,xrd,nexusformat,nexus,nxs,scattering
|
|
33
|
-
Classifier: Development Status ::
|
|
34
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
34
35
|
Classifier: Intended Audience :: Science/Research
|
|
35
36
|
Classifier: License :: OSI Approved :: MIT License
|
|
36
37
|
Classifier: Programming Language :: Python
|
|
@@ -43,14 +44,15 @@ Requires-Python: >=3.7
|
|
|
43
44
|
Description-Content-Type: text/markdown
|
|
44
45
|
License-File: LICENSE
|
|
45
46
|
Requires-Dist: matplotlib>=3.10.0
|
|
46
|
-
Requires-Dist: numpy>=2.
|
|
47
|
+
Requires-Dist: numpy>=2.2.4
|
|
47
48
|
Requires-Dist: ipython>=1.0.0
|
|
48
|
-
Requires-Dist: pandas>=2.
|
|
49
|
+
Requires-Dist: pandas>=2.2.3
|
|
49
50
|
Requires-Dist: nexusformat>=1.0.8
|
|
50
51
|
Requires-Dist: lmfit>=1.2.1
|
|
51
52
|
Requires-Dist: astropy>=6.1.7
|
|
52
53
|
Requires-Dist: pyfftw>=0.13.1
|
|
53
54
|
Requires-Dist: scipy>=1.14.1
|
|
55
|
+
Requires-Dist: h5py>=3.13.0
|
|
54
56
|
Provides-Extra: dev
|
|
55
57
|
Requires-Dist: build>=0.8.0; extra == "dev"
|
|
56
58
|
Requires-Dist: furo>=2022.6.21; extra == "dev"
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
_meta/__init__.py,sha256=9sAP3a5qQJ8SmGW6vPEuAuPqptruqhzo_1ZN5S-1s6I,346
|
|
2
|
+
nxs_analysis_tools/__init__.py,sha256=3UFf4nxseTCfsPDSluxupmpd0Es55F9_du5T8-z4CsE,570
|
|
3
|
+
nxs_analysis_tools/chess.py,sha256=ZtzxRRLRgy5boyo8W-9YBW257dfBvLDKrfGvNonbUmE,26925
|
|
4
|
+
nxs_analysis_tools/datareduction.py,sha256=EVluTVGedr4R6PxZHTreyweN8IUuKPOIcx0ZDPL9SDE,49229
|
|
5
|
+
nxs_analysis_tools/fitting.py,sha256=xkx66AJiJJO_kC1OBa3bcSDwVV20MEowRa59K-yFlqg,8551
|
|
6
|
+
nxs_analysis_tools/pairdistribution.py,sha256=wDH5qGN3jpo4gSKnUBxNkGbX-qUOEQaSOyvOQ_V4IbE,60720
|
|
7
|
+
nxs_analysis_tools-0.1.3.dist-info/licenses/LICENSE,sha256=bE6FnYixueAGAnEfUuumbkSeMgdBguAAkheVgjv47Jo,1086
|
|
8
|
+
nxs_analysis_tools-0.1.3.dist-info/METADATA,sha256=QPwOEeXc1RwpgicYd51tQgFDS0bVm91fUn4e3JnSEZQ,4471
|
|
9
|
+
nxs_analysis_tools-0.1.3.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
|
|
10
|
+
nxs_analysis_tools-0.1.3.dist-info/top_level.txt,sha256=8U000GNPzo6T6pOMjRdgOSO5heMzLMGjkxa1CDtyMHM,25
|
|
11
|
+
nxs_analysis_tools-0.1.3.dist-info/RECORD,,
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
_meta/__init__.py,sha256=KZAZ3taZzENOH0bYFMl4m-YethhYt9uXCCjml8-IRKc,346
|
|
2
|
-
nxs_analysis_tools/__init__.py,sha256=3UFf4nxseTCfsPDSluxupmpd0Es55F9_du5T8-z4CsE,570
|
|
3
|
-
nxs_analysis_tools/chess.py,sha256=ZtzxRRLRgy5boyo8W-9YBW257dfBvLDKrfGvNonbUmE,26925
|
|
4
|
-
nxs_analysis_tools/datareduction.py,sha256=YJ32AuOyT80PXHJ14toibDu5BgWVdmjtdGaPJv75Z2M,49264
|
|
5
|
-
nxs_analysis_tools/fitting.py,sha256=xkx66AJiJJO_kC1OBa3bcSDwVV20MEowRa59K-yFlqg,8551
|
|
6
|
-
nxs_analysis_tools/pairdistribution.py,sha256=fV8ZTFBlcAvVHkt5fEPSKz2zR60kfXEqBuETnCtVdOQ,60622
|
|
7
|
-
nxs_analysis_tools-0.1.2.dist-info/licenses/LICENSE,sha256=bE6FnYixueAGAnEfUuumbkSeMgdBguAAkheVgjv47Jo,1086
|
|
8
|
-
nxs_analysis_tools-0.1.2.dist-info/METADATA,sha256=Ji8id41jvNChSZ4bSN6yKxk2MvPOloIFd1U4zg-XixA,4376
|
|
9
|
-
nxs_analysis_tools-0.1.2.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
|
|
10
|
-
nxs_analysis_tools-0.1.2.dist-info/top_level.txt,sha256=8U000GNPzo6T6pOMjRdgOSO5heMzLMGjkxa1CDtyMHM,25
|
|
11
|
-
nxs_analysis_tools-0.1.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|