nxs-analysis-tools 0.1.7__tar.gz → 0.1.9__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 (28) hide show
  1. {nxs_analysis_tools-0.1.7 → nxs_analysis_tools-0.1.9}/PKG-INFO +1 -1
  2. {nxs_analysis_tools-0.1.7 → nxs_analysis_tools-0.1.9}/pyproject.toml +2 -2
  3. {nxs_analysis_tools-0.1.7 → nxs_analysis_tools-0.1.9}/src/_meta/__init__.py +1 -1
  4. {nxs_analysis_tools-0.1.7 → nxs_analysis_tools-0.1.9}/src/nxs_analysis_tools/chess.py +1 -1
  5. {nxs_analysis_tools-0.1.7 → nxs_analysis_tools-0.1.9}/src/nxs_analysis_tools/datareduction.py +15 -3
  6. {nxs_analysis_tools-0.1.7 → nxs_analysis_tools-0.1.9}/LICENSE +0 -0
  7. {nxs_analysis_tools-0.1.7 → nxs_analysis_tools-0.1.9}/MANIFEST.in +0 -0
  8. {nxs_analysis_tools-0.1.7 → nxs_analysis_tools-0.1.9}/README.md +0 -0
  9. {nxs_analysis_tools-0.1.7 → nxs_analysis_tools-0.1.9}/setup.cfg +0 -0
  10. {nxs_analysis_tools-0.1.7 → nxs_analysis_tools-0.1.9}/setup.py +0 -0
  11. {nxs_analysis_tools-0.1.7 → nxs_analysis_tools-0.1.9}/src/nxs_analysis_tools/__init__.py +0 -0
  12. {nxs_analysis_tools-0.1.7 → nxs_analysis_tools-0.1.9}/src/nxs_analysis_tools/fitting.py +0 -0
  13. {nxs_analysis_tools-0.1.7 → nxs_analysis_tools-0.1.9}/src/nxs_analysis_tools/pairdistribution.py +0 -0
  14. {nxs_analysis_tools-0.1.7 → nxs_analysis_tools-0.1.9}/src/nxs_analysis_tools.egg-info/SOURCES.txt +0 -0
  15. {nxs_analysis_tools-0.1.7 → nxs_analysis_tools-0.1.9}/tests/test_accurate_highlight.py +0 -0
  16. {nxs_analysis_tools-0.1.7 → nxs_analysis_tools-0.1.9}/tests/test_chess.py +0 -0
  17. {nxs_analysis_tools-0.1.7 → nxs_analysis_tools-0.1.9}/tests/test_chess_fitting.py +0 -0
  18. {nxs_analysis_tools-0.1.7 → nxs_analysis_tools-0.1.9}/tests/test_datareduction.py +0 -0
  19. {nxs_analysis_tools-0.1.7 → nxs_analysis_tools-0.1.9}/tests/test_ellipsoidal_window.py +0 -0
  20. {nxs_analysis_tools-0.1.7 → nxs_analysis_tools-0.1.9}/tests/test_fitting.py +0 -0
  21. {nxs_analysis_tools-0.1.7 → nxs_analysis_tools-0.1.9}/tests/test_lmfit.py +0 -0
  22. {nxs_analysis_tools-0.1.7 → nxs_analysis_tools-0.1.9}/tests/test_mask_plotting.py +0 -0
  23. {nxs_analysis_tools-0.1.7 → nxs_analysis_tools-0.1.9}/tests/test_pairdistribution.py +0 -0
  24. {nxs_analysis_tools-0.1.7 → nxs_analysis_tools-0.1.9}/tests/test_plot_slice_axes_types.py +0 -0
  25. {nxs_analysis_tools-0.1.7 → nxs_analysis_tools-0.1.9}/tests/test_plot_slice_with_ndarray.py +0 -0
  26. {nxs_analysis_tools-0.1.7 → nxs_analysis_tools-0.1.9}/tests/test_rotate_data.py +0 -0
  27. {nxs_analysis_tools-0.1.7 → nxs_analysis_tools-0.1.9}/tests/test_sum_axis.py +0 -0
  28. {nxs_analysis_tools-0.1.7 → nxs_analysis_tools-0.1.9}/tests/test_symmetrizer_rectangular_plane.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: nxs-analysis-tools
3
- Version: 0.1.7
3
+ Version: 0.1.9
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-Expression: MIT
@@ -6,7 +6,7 @@ build-backend = 'setuptools.build_meta'
6
6
 
7
7
  [project]
8
8
  name = 'nxs-analysis-tools'
9
- version = '0.1.7'
9
+ version = '0.1.9'
10
10
  description = 'Reduce and transform nexus format (.nxs) scattering data.'
11
11
  readme = 'README.md'
12
12
  requires-python = '>=3.7'
@@ -71,7 +71,7 @@ dev = [
71
71
  'DOI' = 'https://doi.org/10.5281/zenodo.15186359'
72
72
 
73
73
  [tool.bumpver]
74
- current_version = "0.1.7"
74
+ current_version = "0.1.9"
75
75
  version_pattern = "MAJOR.MINOR.PATCH[-TAG]"
76
76
  tag_pattern = "vMAJOR.MINOR.PATCH[-TAG]"
77
77
  commit_message = "Bump version {old_version} -> {new_version}"
@@ -6,5 +6,5 @@ __author__ = 'Steven J. Gomez Alvarado'
6
6
  __email__ = 'stevenjgomez@ucsb.edu'
7
7
  __copyright__ = f"2023-2025, {__author__}"
8
8
  __license__ = 'MIT'
9
- __version__ = '0.1.7'
9
+ __version__ = '0.1.9'
10
10
  __repo_url__ = 'https://github.com/stevenjgomez/nxs_analysis_tools'
@@ -764,7 +764,7 @@ class TempDependence:
764
764
  LinearModel(prefix='background')])
765
765
  linecutmodel.make_params()
766
766
  linecutmodel.guess()
767
- linecutmodel.params.set('peakamplitude', min=0)
767
+ linecutmodel.params['peakamplitude'].set(min=0)
768
768
  linecutmodel.fit()
769
769
 
770
770
  def plot_order_parameter(self, ax=None, **kwargs):
@@ -608,8 +608,9 @@ def plot_slice(data, X=None, Y=None, sum_axis=None, transpose=False, vmin=None,
608
608
  # Return the quadmesh object
609
609
  return p
610
610
 
611
- def animate_slice_temp(temp_dependence, slice_obj, ax=None, interval=500, save_gif=False, filename='animation',
612
- title=True, title_fmt='d', plot_slice_kwargs=None, ax_kwargs=None):
611
+ def animate_slice_temp(temp_dependence, slice_obj, ax=None, reverse_temps=False, interval=500,
612
+ save_gif=False, filename='animation', title=True, title_fmt='d',
613
+ plot_slice_kwargs=None, ax_kwargs=None):
613
614
  """
614
615
  Animate 2D slices from a temperature-dependent dataset.
615
616
 
@@ -625,6 +626,8 @@ def animate_slice_temp(temp_dependence, slice_obj, ax=None, interval=500, save_g
625
626
  Slice object to apply to each dataset; None entries are treated as ':'.
626
627
  ax : matplotlib.axes.Axes, optional
627
628
  The axes object to plot on. If None, a new figure and axes will be created.
629
+ reverse_temps : bool, optional
630
+ If True, animates datasets with increasing temperature. Default is False.
628
631
  interval : int, optional
629
632
  Delay between frames in milliseconds. Default is 500.
630
633
  save_gif : bool, optional
@@ -679,8 +682,17 @@ def animate_slice_temp(temp_dependence, slice_obj, ax=None, interval=500, save_g
679
682
  raise ValueError(f"Invalid title_fmt '{title_fmt}' for temperature value '{temp}'")
680
683
  ax.set(title=f'$T$={formatted_temp}')
681
684
 
685
+ # Animate frames upon warming
686
+ if reverse_temps:
687
+ frames = temp_dependence.temperatures.copy()
688
+ # Animate frames upon cooling (default)
689
+ else:
690
+ frames = temp_dependence.temperatures.copy()
691
+ frames.reverse()
692
+
693
+
682
694
  ani = animation.FuncAnimation(fig, update,
683
- frames=temp_dependence.temperatures,
695
+ frames=frames,
684
696
  interval=interval, repeat=False)
685
697
 
686
698
  display(HTML(ani.to_jshtml()))