nxs-analysis-tools 0.0.41__tar.gz → 0.0.42__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.

Potentially problematic release.


This version of nxs-analysis-tools might be problematic. Click here for more details.

Files changed (24) hide show
  1. {nxs_analysis_tools-0.0.41/src/nxs_analysis_tools.egg-info → nxs_analysis_tools-0.0.42}/PKG-INFO +2 -2
  2. {nxs_analysis_tools-0.0.41 → nxs_analysis_tools-0.0.42}/pyproject.toml +1 -1
  3. {nxs_analysis_tools-0.0.41 → nxs_analysis_tools-0.0.42}/src/_meta/__init__.py +1 -1
  4. {nxs_analysis_tools-0.0.41 → nxs_analysis_tools-0.0.42}/src/nxs_analysis_tools/chess.py +6 -1
  5. {nxs_analysis_tools-0.0.41 → nxs_analysis_tools-0.0.42}/src/nxs_analysis_tools/datareduction.py +6 -4
  6. {nxs_analysis_tools-0.0.41 → nxs_analysis_tools-0.0.42/src/nxs_analysis_tools.egg-info}/PKG-INFO +2 -2
  7. {nxs_analysis_tools-0.0.41 → nxs_analysis_tools-0.0.42}/LICENSE +0 -0
  8. {nxs_analysis_tools-0.0.41 → nxs_analysis_tools-0.0.42}/MANIFEST.in +0 -0
  9. {nxs_analysis_tools-0.0.41 → nxs_analysis_tools-0.0.42}/README.md +0 -0
  10. {nxs_analysis_tools-0.0.41 → nxs_analysis_tools-0.0.42}/setup.cfg +0 -0
  11. {nxs_analysis_tools-0.0.41 → nxs_analysis_tools-0.0.42}/setup.py +0 -0
  12. {nxs_analysis_tools-0.0.41 → nxs_analysis_tools-0.0.42}/src/nxs_analysis_tools/__init__.py +0 -0
  13. {nxs_analysis_tools-0.0.41 → nxs_analysis_tools-0.0.42}/src/nxs_analysis_tools/fitting.py +0 -0
  14. {nxs_analysis_tools-0.0.41 → nxs_analysis_tools-0.0.42}/src/nxs_analysis_tools/pairdistribution.py +0 -0
  15. {nxs_analysis_tools-0.0.41 → nxs_analysis_tools-0.0.42}/src/nxs_analysis_tools.egg-info/SOURCES.txt +0 -0
  16. {nxs_analysis_tools-0.0.41 → nxs_analysis_tools-0.0.42}/src/nxs_analysis_tools.egg-info/dependency_links.txt +0 -0
  17. {nxs_analysis_tools-0.0.41 → nxs_analysis_tools-0.0.42}/src/nxs_analysis_tools.egg-info/requires.txt +0 -0
  18. {nxs_analysis_tools-0.0.41 → nxs_analysis_tools-0.0.42}/src/nxs_analysis_tools.egg-info/top_level.txt +0 -0
  19. {nxs_analysis_tools-0.0.41 → nxs_analysis_tools-0.0.42}/tests/test_chess.py +0 -0
  20. {nxs_analysis_tools-0.0.41 → nxs_analysis_tools-0.0.42}/tests/test_chess_fitting.py +0 -0
  21. {nxs_analysis_tools-0.0.41 → nxs_analysis_tools-0.0.42}/tests/test_datareduction.py +0 -0
  22. {nxs_analysis_tools-0.0.41 → nxs_analysis_tools-0.0.42}/tests/test_fitting.py +0 -0
  23. {nxs_analysis_tools-0.0.41 → nxs_analysis_tools-0.0.42}/tests/test_lmfit.py +0 -0
  24. {nxs_analysis_tools-0.0.41 → nxs_analysis_tools-0.0.42}/tests/test_pairdistribution.py +0 -0
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.2
2
2
  Name: nxs-analysis-tools
3
- Version: 0.0.41
3
+ Version: 0.0.42
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
@@ -6,7 +6,7 @@ build-backend = 'setuptools.build_meta'
6
6
 
7
7
  [project]
8
8
  name = 'nxs-analysis-tools'
9
- version = '0.0.41'
9
+ version = '0.0.42'
10
10
  description = 'Reduce and transform nexus format (.nxs) scattering data.'
11
11
  readme = 'README.md'
12
12
  requires-python = '>=3.7'
@@ -6,5 +6,5 @@ __author__ = 'Steven J. Gomez Alvarado'
6
6
  __email__ = 'stevenjgomez@ucsb.edu'
7
7
  __copyright__ = f"2023, {__author__}"
8
8
  __license__ = 'MIT'
9
- __version__ = '0.0.41'
9
+ __version__ = '0.0.42'
10
10
  __repo_url__ = 'https://github.com/stevenjgomez/nxs_analysis_tools'
@@ -8,6 +8,7 @@ import re
8
8
 
9
9
  import matplotlib.pyplot as plt
10
10
  import matplotlib as mpl
11
+ import pandas as pd
11
12
  import numpy as np
12
13
  from IPython.display import display, Markdown
13
14
  from nxs_analysis_tools import load_data, Scissors
@@ -190,8 +191,12 @@ class TempDependence:
190
191
 
191
192
  # Convert all temperatures to int temporarily to sort temperatures list before loading
192
193
  self.temperatures = [int(t) for t in self.temperatures]
193
- self.temperatures.sort()
194
+
195
+ loading_template = pd.DataFrame({'temperature': self.temperatures, 'filename': items_to_load})
196
+ loading_template = loading_template.sort_values(by='temperature')
197
+ self.temperatures = loading_template['temperature']
194
198
  self.temperatures = [str(t) for t in self.temperatures]
199
+ items_to_load = loading_template['filename'].to_list()
195
200
 
196
201
  for i, item in enumerate(items_to_load):
197
202
  path = os.path.join(self.sample_directory, item)
@@ -787,7 +787,8 @@ def rotate_data(data, lattice_angle, rotation_angle, rotation_axis, printout=Fal
787
787
 
788
788
  p = Padder(sliced_data)
789
789
  padding = tuple(len(sliced_data[axis]) for axis in sliced_data.axes)
790
- counts = p.pad(padding).counts
790
+ counts = p.pad(padding)
791
+ counts = p.padded[p.padded.signal]
791
792
 
792
793
  counts_skewed = ndimage.affine_transform(counts,
793
794
  t.inverted().get_matrix()[:2, :2],
@@ -848,7 +849,7 @@ def rotate_data(data, lattice_angle, rotation_angle, rotation_axis, printout=Fal
848
849
  elif rotation_axis == 2:
849
850
  output_array[:, :, i] = counts_unpadded
850
851
  print('\nDone.')
851
- return NXdata(NXfield(output_array, name='counts'),
852
+ return NXdata(NXfield(output_array, name=p.padded.signal),
852
853
  (data[data.axes[0]], data[data.axes[1]], data[data.axes[2]]))
853
854
 
854
855
 
@@ -884,7 +885,8 @@ def rotate_data2D(data, lattice_angle, rotation_angle):
884
885
 
885
886
  p = Padder(data)
886
887
  padding = tuple(len(data[axis]) for axis in data.axes)
887
- counts = p.pad(padding).counts
888
+ counts = p.pad(padding)
889
+ counts = p.padded[p.padded.signal]
888
890
 
889
891
  counts_skewed = ndimage.affine_transform(counts,
890
892
  t.inverted().get_matrix()[:2, :2],
@@ -937,7 +939,7 @@ def rotate_data2D(data, lattice_angle, rotation_angle):
937
939
  counts_unpadded = p.unpad(counts_unskewed)
938
940
 
939
941
  print('\nDone.')
940
- return NXdata(NXfield(counts_unpadded, name='counts'),
942
+ return NXdata(NXfield(counts_unpadded, name=p.padded.signal),
941
943
  (data[data.axes[0]], data[data.axes[1]]))
942
944
 
943
945
 
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.2
2
2
  Name: nxs-analysis-tools
3
- Version: 0.0.41
3
+ Version: 0.0.42
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