nxs-analysis-tools 0.1.9__tar.gz → 0.1.11__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 (33) hide show
  1. {nxs_analysis_tools-0.1.9 → nxs_analysis_tools-0.1.11}/PKG-INFO +15 -5
  2. {nxs_analysis_tools-0.1.9 → nxs_analysis_tools-0.1.11}/README.md +12 -2
  3. {nxs_analysis_tools-0.1.9 → nxs_analysis_tools-0.1.11}/pyproject.toml +4 -4
  4. {nxs_analysis_tools-0.1.9 → nxs_analysis_tools-0.1.11}/src/_meta/__init__.py +1 -1
  5. {nxs_analysis_tools-0.1.9 → nxs_analysis_tools-0.1.11}/src/nxs_analysis_tools/__init__.py +1 -1
  6. {nxs_analysis_tools-0.1.9 → nxs_analysis_tools-0.1.11}/src/nxs_analysis_tools/chess.py +77 -48
  7. {nxs_analysis_tools-0.1.9 → nxs_analysis_tools-0.1.11}/src/nxs_analysis_tools/datareduction.py +85 -195
  8. nxs_analysis_tools-0.1.11/src/nxs_analysis_tools/datasets.py +108 -0
  9. nxs_analysis_tools-0.1.11/src/nxs_analysis_tools/lineartransformations.py +51 -0
  10. {nxs_analysis_tools-0.1.9 → nxs_analysis_tools-0.1.11}/src/nxs_analysis_tools/pairdistribution.py +35 -110
  11. nxs_analysis_tools-0.1.11/src/nxs_analysis_tools.egg-info/SOURCES.txt +15 -0
  12. nxs_analysis_tools-0.1.11/tests/test_loading.py +46 -0
  13. nxs_analysis_tools-0.1.11/tests/test_plot_slice.py +112 -0
  14. nxs_analysis_tools-0.1.9/src/nxs_analysis_tools.egg-info/SOURCES.txt +0 -25
  15. nxs_analysis_tools-0.1.9/tests/test_accurate_highlight.py +0 -388
  16. nxs_analysis_tools-0.1.9/tests/test_chess.py +0 -16
  17. nxs_analysis_tools-0.1.9/tests/test_chess_fitting.py +0 -21
  18. nxs_analysis_tools-0.1.9/tests/test_datareduction.py +0 -19
  19. nxs_analysis_tools-0.1.9/tests/test_ellipsoidal_window.py +0 -15
  20. nxs_analysis_tools-0.1.9/tests/test_fitting.py +0 -28
  21. nxs_analysis_tools-0.1.9/tests/test_lmfit.py +0 -95
  22. nxs_analysis_tools-0.1.9/tests/test_mask_plotting.py +0 -388
  23. nxs_analysis_tools-0.1.9/tests/test_pairdistribution.py +0 -40
  24. nxs_analysis_tools-0.1.9/tests/test_plot_slice_axes_types.py +0 -40
  25. nxs_analysis_tools-0.1.9/tests/test_plot_slice_with_ndarray.py +0 -277
  26. nxs_analysis_tools-0.1.9/tests/test_rotate_data.py +0 -23
  27. nxs_analysis_tools-0.1.9/tests/test_sum_axis.py +0 -299
  28. nxs_analysis_tools-0.1.9/tests/test_symmetrizer_rectangular_plane.py +0 -382
  29. {nxs_analysis_tools-0.1.9 → nxs_analysis_tools-0.1.11}/LICENSE +0 -0
  30. {nxs_analysis_tools-0.1.9 → nxs_analysis_tools-0.1.11}/MANIFEST.in +0 -0
  31. {nxs_analysis_tools-0.1.9 → nxs_analysis_tools-0.1.11}/setup.cfg +0 -0
  32. {nxs_analysis_tools-0.1.9 → nxs_analysis_tools-0.1.11}/setup.py +0 -0
  33. {nxs_analysis_tools-0.1.9 → nxs_analysis_tools-0.1.11}/src/nxs_analysis_tools/fitting.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: nxs-analysis-tools
3
- Version: 0.1.9
3
+ Version: 0.1.11
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
@@ -14,11 +14,10 @@ Classifier: Development Status :: 5 - Production/Stable
14
14
  Classifier: Intended Audience :: Science/Research
15
15
  Classifier: Programming Language :: Python
16
16
  Classifier: Programming Language :: Python :: 3
17
- Classifier: Programming Language :: Python :: 3.9
18
17
  Classifier: Programming Language :: Python :: 3.10
19
18
  Classifier: Topic :: Scientific/Engineering :: Image Processing
20
19
  Classifier: Topic :: Scientific/Engineering
21
- Requires-Python: >=3.7
20
+ Requires-Python: >=3.10
22
21
  Description-Content-Type: text/markdown
23
22
  License-File: LICENSE
24
23
  Requires-Dist: matplotlib>=3.10.0
@@ -46,6 +45,7 @@ Requires-Dist: sphinx-autobuild>=2021.3.14; extra == "dev"
46
45
  Requires-Dist: sphinx-copybutton>=0.5.0; extra == "dev"
47
46
  Requires-Dist: sphinxext-opengraph>=0.6.3; extra == "dev"
48
47
  Requires-Dist: twine>=4.0.1; extra == "dev"
48
+ Requires-Dist: pooch>=1.8.2; extra == "dev"
49
49
  Dynamic: license-file
50
50
 
51
51
  # nxs-analysis-tools
@@ -56,7 +56,7 @@ Dynamic: license-file
56
56
 
57
57
  ## Overview
58
58
 
59
- nxs-analysis-tools provides a suite of tools for slicing (2D), cutting (1D), and transforming (_e.g._, symmetrization, interpolation, delta-PDF) nexus format (.nxs) scattering data.
59
+ nxs-analysis-tools provides a suite of tools for performing slices (2D), cuts (1D), and transformations (_e.g._, symmetrization, interpolation, delta-PDF) on nexus format (.nxs) scattering data.
60
60
 
61
61
  View the documentation [here](https://nxs-analysis-tools.readthedocs.io/en/stable/).
62
62
 
@@ -76,4 +76,14 @@ git clone https://github.com/stevenjgomez/nxs-analysis-tools.git
76
76
 
77
77
  ## License
78
78
 
79
- This project is licensed under the MIT License.
79
+ This project is licensed under the MIT License. If you find the nxs-analysis-tools package useful in your scientific publications, please cite the relevant DOI.
80
+
81
+ To cite the most recent version, use:
82
+
83
+ [![DOI](https://zenodo.org/badge/644189683.svg)](https://doi.org/10.5281/zenodo.15186359)
84
+
85
+ To cite all versions, use:
86
+
87
+ ```
88
+ 10.5281/zenodo.15186359
89
+ ```
@@ -6,7 +6,7 @@
6
6
 
7
7
  ## Overview
8
8
 
9
- nxs-analysis-tools provides a suite of tools for slicing (2D), cutting (1D), and transforming (_e.g._, symmetrization, interpolation, delta-PDF) nexus format (.nxs) scattering data.
9
+ nxs-analysis-tools provides a suite of tools for performing slices (2D), cuts (1D), and transformations (_e.g._, symmetrization, interpolation, delta-PDF) on nexus format (.nxs) scattering data.
10
10
 
11
11
  View the documentation [here](https://nxs-analysis-tools.readthedocs.io/en/stable/).
12
12
 
@@ -26,4 +26,14 @@ git clone https://github.com/stevenjgomez/nxs-analysis-tools.git
26
26
 
27
27
  ## License
28
28
 
29
- This project is licensed under the MIT License.
29
+ This project is licensed under the MIT License. If you find the nxs-analysis-tools package useful in your scientific publications, please cite the relevant DOI.
30
+
31
+ To cite the most recent version, use:
32
+
33
+ [![DOI](https://zenodo.org/badge/644189683.svg)](https://doi.org/10.5281/zenodo.15186359)
34
+
35
+ To cite all versions, use:
36
+
37
+ ```
38
+ 10.5281/zenodo.15186359
39
+ ```
@@ -6,10 +6,10 @@ build-backend = 'setuptools.build_meta'
6
6
 
7
7
  [project]
8
8
  name = 'nxs-analysis-tools'
9
- version = '0.1.9'
9
+ version = '0.1.11'
10
10
  description = 'Reduce and transform nexus format (.nxs) scattering data.'
11
11
  readme = 'README.md'
12
- requires-python = '>=3.7'
12
+ requires-python = '>=3.10'
13
13
  license = "MIT"
14
14
  license-files = ['LICENSE']
15
15
  authors = [{ name = 'Steven J. Gomez Alvarado', email = 'stevenjgomez@ucsb.edu' }]
@@ -27,7 +27,6 @@ classifiers = [
27
27
  'Intended Audience :: Science/Research',
28
28
  'Programming Language :: Python',
29
29
  'Programming Language :: Python :: 3',
30
- 'Programming Language :: Python :: 3.9',
31
30
  'Programming Language :: Python :: 3.10',
32
31
  'Topic :: Scientific/Engineering :: Image Processing',
33
32
  'Topic :: Scientific/Engineering',
@@ -61,6 +60,7 @@ dev = [
61
60
  'sphinx-copybutton >= 0.5.0',
62
61
  'sphinxext-opengraph >= 0.6.3',
63
62
  'twine >= 4.0.1',
63
+ 'pooch >= 1.8.2',
64
64
  ]
65
65
 
66
66
  [project.urls]
@@ -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.9"
74
+ current_version = "0.1.11"
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.9'
9
+ __version__ = '0.1.11'
10
10
  __repo_url__ = 'https://github.com/stevenjgomez/nxs_analysis_tools'
@@ -9,7 +9,7 @@ from .chess import TempDependence
9
9
 
10
10
  # What to import when running "from nxs_analysis_tools import *"
11
11
  __all__ = ['load_data', 'load_transform', 'plot_slice', 'Scissors',
12
- 'reciprocal_lattice_params', 'rotate_data', 'rotate_data_2D',
12
+ 'reciprocal_lattice_params', 'rotate_data',
13
13
  'convert_to_inverse_angstroms', 'array_to_nxdata', 'Padder',
14
14
  'rebin_nxdata', 'rebin_3d', 'rebin_1d', 'TempDependence',
15
15
  'animate_slice_temp', 'animate_slice_axis']
@@ -1,7 +1,7 @@
1
1
  """
2
2
  This module provides classes and functions for analyzing scattering datasets collected at CHESS
3
- (ID4B) with temperature dependence. It includes functions for loading data, cutting data, and
4
- plotting linecuts.
3
+ (ID4B) with temperature dependence. It includes functions for loading temperature series and
4
+ performing operations on all datasets in the series at once (e.g., cutting, fitting).
5
5
  """
6
6
  import os
7
7
  import re
@@ -59,10 +59,11 @@ class TempDependence:
59
59
  Initialize Scissors and LinecutModel objects for each temperature.
60
60
  set_data(temperature, data):
61
61
  Set the dataset for a specific temperature.
62
- load_transforms(temperatures_list=None, print_tree=True):
62
+ load_transforms(temperatures_list=None, exclude_temperatures=None, print_tree=True):
63
63
  Load transform datasets (from nxrefine) based on temperature.
64
- load_datasets(file_ending='hkli.nxs', temperatures_list=None, print_tree=True):
65
- Load datasets (CHESS format) from the specified folder.
64
+ load_datasets(file_ending='hkli.nxs', temperatures_list=None, exclude_temperatures=None,
65
+ print_tree=True):
66
+ Load datasets (legacy CHESS format) from the specified folder.
66
67
  get_sample_directory():
67
68
  Get the folder path where the datasets are located.
68
69
  clear_datasets():
@@ -99,11 +100,12 @@ class TempDependence:
99
100
  Fit the line cut models for each temperature.
100
101
  plot_fit(mdheadings=False, **kwargs):
101
102
  Plot the fit results for each temperature.
102
- overlay_fits(numpoints=None, vertical_offset=0, cmap='viridis', ax=ax):
103
+ overlay_fits(numpoints=None, vertical_offset=0, cmap='viridis', ax=ax,
104
+ data_kwargs=None, fit_kwargs=None):
103
105
  Plot raw data and fitted models for each temperature.
104
106
  fit_peak_simple():
105
107
  Perform a basic fit using a pseudo-Voigt peak shape, linear background, and no constraints.
106
- plot_order_parameter(ax, **kwargs):
108
+ plot_order_parameter(ax, param_name='peakheight', **kwargs):
107
109
  Plot the temperature dependence of the peakheight parameter.
108
110
  print_fit_report():
109
111
  Print the fit report for each temperature.
@@ -188,6 +190,8 @@ class TempDependence:
188
190
  """
189
191
  for temperature in self.temperatures:
190
192
  self.scissors[temperature] = Scissors()
193
+ if temperature in self.datasets.keys():
194
+ self.scissors[temperature].set_data(self.datasets[temperature])
191
195
  self.linecutmodels[temperature] = LinecutModel()
192
196
 
193
197
  def set_data(self, temperature, data):
@@ -203,7 +207,7 @@ class TempDependence:
203
207
  """
204
208
  self.datasets[temperature] = data
205
209
 
206
- def load_transforms(self, temperatures_list=None, print_tree=True, use_nxlink=False):
210
+ def load_transforms(self, temperatures_list=None, exclude_temperatures=None, print_tree=True, use_nxlink=False):
207
211
  """
208
212
  Load transform datasets (from nxrefine) based on temperature.
209
213
 
@@ -211,6 +215,9 @@ class TempDependence:
211
215
  ----------
212
216
  temperatures_list : list of int or None, optional
213
217
  List of temperatures to load. If None, all available temperatures are loaded.
218
+
219
+ exclude_temperatures : int, str, optional
220
+ Temperatures to skip. Applied after filtering with `temperatures_list`, if provided.
214
221
 
215
222
  print_tree : bool, optional
216
223
  Whether to print the data tree upon loading. Default True.
@@ -223,6 +230,10 @@ class TempDependence:
223
230
  # Convert all temperatures to strings
224
231
  if temperatures_list:
225
232
  temperatures_list = [str(t) for t in temperatures_list]
233
+ if exclude_temperatures:
234
+ if isinstance(exclude_temperatures, str):
235
+ exclude_temperatures = [exclude_temperatures]
236
+ exclude_temperatures = [str(t) for t in list(exclude_temperatures)]
226
237
 
227
238
  # Clear existing temperatures before loading files
228
239
  self.temperatures = []
@@ -237,7 +248,15 @@ class TempDependence:
237
248
  # Identify temperature
238
249
  temperature = match.group(1)
239
250
  # print(f'Temperature = {temperature}')
240
- if (temperatures_list is None) or (temperature in temperatures_list):
251
+ if temperatures_list is not None:
252
+ incl_temp = temperature in temperatures_list
253
+ else:
254
+ incl_temp = True
255
+ if exclude_temperatures is not None:
256
+ not_excl_temp = temperature not in exclude_temperatures
257
+ else:
258
+ not_excl_temp = True
259
+ if incl_temp and not_excl_temp:
241
260
  # Prepare file to be loaded
242
261
  self.temperatures.append(temperature)
243
262
  items_to_load.append(item)
@@ -269,40 +288,38 @@ class TempDependence:
269
288
  f" Error: {e}")
270
289
  raise # Re-raise the exception
271
290
 
272
- # Initialize scissors object
273
- self.scissors[self.temperatures[i]] = Scissors()
274
- self.scissors[self.temperatures[i]].set_data(self.datasets[self.temperatures[i]])
291
+ self.initialize()
275
292
 
276
- # Initialize linecutmodel object
277
- self.linecutmodels[self.temperatures[i]] = LinecutModel()
278
-
279
- def load_datasets(self, file_ending='hkli.nxs', temperatures_list=None, print_tree=True):
293
+ def load_datasets(self, file_ending='hkli.nxs', temperatures_list=None, exclude_temperatures=None, print_tree=True):
280
294
  """
281
295
  Load datasets (CHESS format) from the specified folder.
282
296
 
283
297
  Parameters
284
298
  ----------
285
299
  file_ending : str, optional
286
- The file extension of the datasets to be loaded. The default is 'hkli.nxs'.
287
- temperatures_list : list of int or None, optional
288
- The list of specific temperatures to load. If None, all available temperatures are
289
- loaded. The default is None.
300
+ File extension of datasets to load. Default is 'hkli.nxs'.
301
+ temperatures_list : list of int or str, optional
302
+ Specific temperatures to load. If None, all temperatures are loaded.
303
+ exclude_temperatures : list of int or str, optional
304
+ Temperatures to skip. Applied after filtering with `temperatures_list`, if provided.
290
305
  print_tree : bool, optional
291
- Whether to print the data tree upon loading. Default True.
306
+ If True, prints the NeXus tree structure for each file. Default is True.
292
307
  """
293
- temperature_folders = [] # Empty list to store temperature folder names
294
- for item in os.listdir(self.sample_directory):
295
- try:
296
- temperature_folders.append(int(item)) # If folder name can be int, add it
297
- except ValueError:
298
- pass # Otherwise don't add it
299
- temperature_folders.sort() # Sort from low to high T
300
- temperature_folders = [str(i) for i in temperature_folders] # Convert to strings
301
-
302
- self.temperatures = temperature_folders
303
308
 
304
309
  if temperatures_list is not None:
305
310
  self.temperatures = [str(t) for t in temperatures_list]
311
+ else:
312
+ self.temperatures = [] # Empty list to store temperature folder names
313
+ for item in os.listdir(self.sample_directory):
314
+ try:
315
+ self.temperatures.append(int(item)) # If folder name can be int, add it
316
+ except ValueError:
317
+ pass # Otherwise don't add it
318
+ self.temperatures.sort() # Sort from low to high T
319
+ self.temperatures = [str(i) for i in self.temperatures] # Convert to strings
320
+
321
+ if exclude_temperatures is not None:
322
+ [self.temperatures.remove(str(t)) for t in exclude_temperatures]
306
323
 
307
324
  # Load .nxs files
308
325
  for T in self.temperatures:
@@ -313,12 +330,7 @@ class TempDependence:
313
330
  # Load dataset at each temperature
314
331
  self.datasets[T] = load_data(filepath, print_tree)
315
332
 
316
- # Initialize scissors object at each temperature
317
- self.scissors[T] = Scissors()
318
- self.scissors[T].set_data(self.datasets[T])
319
-
320
- # Initialize linecutmodel object at each temperature
321
- self.linecutmodels[T] = LinecutModel()
333
+ self.initialize()
322
334
 
323
335
  def get_sample_directory(self):
324
336
  """
@@ -437,11 +449,16 @@ class TempDependence:
437
449
  # Get the Viridis colormap
438
450
  cmap = mpl.colormaps.get_cmap('viridis')
439
451
 
452
+ # Reverse zorder
453
+ zorder = 0
454
+
440
455
  for i, linecut in enumerate(self.linecuts.values()):
456
+
441
457
  x_data = linecut[linecut.axes].nxdata
442
458
  y_data = linecut[linecut.signal].nxdata + i * vertical_offset
443
- ax.plot(x_data, y_data, color=cmap(i / len(self.linecuts)), label=self.temperatures[i],
444
- **kwargs)
459
+ ax.plot(x_data, y_data, color=cmap(i / len(self.linecuts)), label=self.temperatures[i],
460
+ zorder=zorder, **kwargs)
461
+ zorder -= 1
445
462
 
446
463
  ax.set(xlabel=self.xlabel,
447
464
  ylabel=self.linecuts[self.temperatures[0]].signal)
@@ -704,7 +721,8 @@ class TempDependence:
704
721
  title=f"{T} K",
705
722
  **kwargs)
706
723
 
707
- def overlay_fits(self, numpoints=None, vertical_offset=0, cmap='viridis', ax=None):
724
+ def overlay_fits(self, numpoints=None, vertical_offset=0, cmap='viridis', ax=None,
725
+ data_kwargs=None, fit_kwargs=None):
708
726
  """
709
727
  Plot raw data and fitted models for each temperature with optional vertical offsets.
710
728
 
@@ -719,6 +737,11 @@ class TempDependence:
719
737
  Name of the matplotlib colormap used to distinguish different temperatures.
720
738
  ax : :class:`matplotlib.axes.Axes` or None, default=None
721
739
  Axis object to plot on. If None, a new figure and axis are created.
740
+ data_kwargs : dict
741
+ Keyword arguments to be passed to the data plot function.
742
+ fit_kwargs : dict
743
+ Keyword arguments to be passed to the fit plot function.
744
+
722
745
 
723
746
  The function:
724
747
  - Uses a colormap to assign unique colors to each temperature.
@@ -731,19 +754,24 @@ class TempDependence:
731
754
  # Create a figure and axes if an axis is not already provided
732
755
  _, ax = plt.subplots() if ax is None else (None, ax)
733
756
 
757
+ if data_kwargs is None:
758
+ data_kwargs = {}
759
+ if fit_kwargs is None:
760
+ fit_kwargs = {}
761
+
734
762
  # Generate a color palette for the various temperatures
735
763
  cmap = plt.get_cmap(cmap)
736
764
  colors = [cmap(i / len(self.temperatures)) for i, _ in enumerate(self.temperatures)]
737
765
 
738
766
  for i, lm in enumerate(self.linecutmodels.values()):
739
767
  # Plot the raw data
740
- ax.plot(lm.x, lm.y + vertical_offset * i, '.', c=colors[i])
768
+ ax.plot(lm.x, lm.y + vertical_offset * i, '.', c=colors[i], **data_kwargs)
741
769
 
742
770
  # Evaluate the fit
743
771
  numpoints = len(lm.x) if numpoints is None else numpoints
744
772
  x_eval = np.linspace(lm.x.min(), lm.x.max(), numpoints)
745
773
  y_eval = lm.modelresult.eval(x=x_eval)
746
- ax.plot(x_eval, y_eval + vertical_offset * i, '-', c=colors[i], label=self.temperatures[i])
774
+ ax.plot(x_eval, y_eval + vertical_offset * i, '-', c=colors[i], label=self.temperatures[i], **fit_kwargs)
747
775
 
748
776
  # Reverse legend entries to match top-to-bottom stacking
749
777
  handles, labels = ax.get_legend_handles_labels()
@@ -767,18 +795,19 @@ class TempDependence:
767
795
  linecutmodel.params['peakamplitude'].set(min=0)
768
796
  linecutmodel.fit()
769
797
 
770
- def plot_order_parameter(self, ax=None, **kwargs):
798
+ def plot_order_parameter(self, param_name='peakheight', ax=None, **kwargs):
771
799
  """
772
800
  Plot the temperature dependence of the peak height (order parameter).
773
801
 
774
- This method extracts the peak height from each temperature-dependent
775
- line cut fit stored in `linecutmodels` and plots it as a function
776
- of temperature using matplotlib.
802
+ This method extracts the values of a chosen parameter from each temperature-dependent
803
+ line cut fit stored in `linecutmodels` and plots it as a function of temperature.
777
804
 
778
805
  Parameters
779
806
  ----------
780
807
  ax : :class:`matplotlib.axes.Axes`, optional
781
808
  Axis object to plot on. If None, a new figure and axis are created.
809
+ param_name : str, optional
810
+ The name of the lmfit parameter to extract. Default is 'peakheight'.
782
811
  **kwargs
783
812
  Keyword arguments to be passed to the plot function.
784
813
 
@@ -810,7 +839,7 @@ class TempDependence:
810
839
  if self.linecutmodels[T].modelresult is None:
811
840
  raise AttributeError("Model result is empty. Have you fit the data to a model?")
812
841
 
813
- peakheights.append(self.linecutmodels[T].modelresult.params['peakheight'].value)
842
+ peakheights.append(self.linecutmodels[T].modelresult.params[param_name].value)
814
843
 
815
844
  # Plot the peakheights vs. temperature
816
845
  if ax is None:
@@ -818,7 +847,7 @@ class TempDependence:
818
847
  else:
819
848
  fig = ax.figure
820
849
  ax.plot(temperatures, peakheights, **kwargs)
821
- ax.set(xlabel='$T$ (K)', ylabel='peakheight')
850
+ ax.set(xlabel='$T$ (K)', ylabel=param_name)
822
851
  return fig, ax
823
852
 
824
853
  def print_fit_report(self):