NeXpy 2.0.3__tar.gz → 2.2.0__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.
Files changed (128) hide show
  1. {nexpy-2.0.3 → nexpy-2.2.0}/PKG-INFO +3 -3
  2. {nexpy-2.0.3 → nexpy-2.2.0}/README.md +1 -1
  3. {nexpy-2.0.3 → nexpy-2.2.0}/README.rst +49 -39
  4. {nexpy-2.0.3 → nexpy-2.2.0}/conda-recipe/meta.yaml +5 -5
  5. {nexpy-2.0.3 → nexpy-2.2.0}/docs/source/conf.py +1 -1
  6. nexpy-2.2.0/docs/source/images/validation-panel.png +0 -0
  7. {nexpy-2.0.3 → nexpy-2.2.0}/docs/source/pythongui.rst +81 -8
  8. {nexpy-2.0.3 → nexpy-2.2.0}/docs/source/pythonshell.rst +358 -18
  9. {nexpy-2.0.3 → nexpy-2.2.0}/pyproject.toml +1 -1
  10. {nexpy-2.0.3 → nexpy-2.2.0}/src/NeXpy.egg-info/PKG-INFO +3 -3
  11. {nexpy-2.0.3 → nexpy-2.2.0}/src/NeXpy.egg-info/SOURCES.txt +4 -1
  12. {nexpy-2.0.3 → nexpy-2.2.0}/src/NeXpy.egg-info/requires.txt +1 -1
  13. {nexpy-2.0.3 → nexpy-2.2.0}/src/NeXpy.egg-info/scm_file_list.json +4 -1
  14. nexpy-2.2.0/src/NeXpy.egg-info/scm_version.json +8 -0
  15. {nexpy-2.0.3 → nexpy-2.2.0}/src/nexpy/_version.py +3 -3
  16. {nexpy-2.0.3 → nexpy-2.2.0}/src/nexpy/gui/consoleapp.py +66 -21
  17. {nexpy-2.0.3 → nexpy-2.2.0}/src/nexpy/gui/dialogs.py +186 -38
  18. {nexpy-2.0.3 → nexpy-2.2.0}/src/nexpy/gui/fitdialogs.py +255 -9
  19. {nexpy-2.0.3 → nexpy-2.2.0}/src/nexpy/gui/mainwindow.py +46 -22
  20. {nexpy-2.0.3 → nexpy-2.2.0}/src/nexpy/gui/scripteditor.py +38 -5
  21. {nexpy-2.0.3 → nexpy-2.2.0}/src/nexpy/gui/treeview.py +5 -1
  22. {nexpy-2.0.3 → nexpy-2.2.0}/src/nexpy/gui/utils.py +114 -37
  23. {nexpy-2.0.3 → nexpy-2.2.0}/src/nexpy/gui/widgets.py +7 -2
  24. nexpy-2.2.0/tests/test_expand_node.py +37 -0
  25. nexpy-2.2.0/tests/test_permissions.py +258 -0
  26. nexpy-2.2.0/tests/test_report_error.py +67 -0
  27. nexpy-2.0.3/docs/source/images/validation-panel.png +0 -0
  28. nexpy-2.0.3/src/NeXpy.egg-info/scm_version.json +0 -8
  29. {nexpy-2.0.3 → nexpy-2.2.0}/.gitattributes +0 -0
  30. {nexpy-2.0.3 → nexpy-2.2.0}/.github/dependabot.yaml +0 -0
  31. {nexpy-2.0.3 → nexpy-2.2.0}/.github/workflows/ci.yml +0 -0
  32. {nexpy-2.0.3 → nexpy-2.2.0}/.github/workflows/sphinx.yml +0 -0
  33. {nexpy-2.0.3 → nexpy-2.2.0}/.gitignore +0 -0
  34. {nexpy-2.0.3 → nexpy-2.2.0}/.pre-commit-config.yaml +0 -0
  35. {nexpy-2.0.3 → nexpy-2.2.0}/COPYING +0 -0
  36. {nexpy-2.0.3 → nexpy-2.2.0}/conda-recipe/bld.bat +0 -0
  37. {nexpy-2.0.3 → nexpy-2.2.0}/conda-recipe/build.sh +0 -0
  38. {nexpy-2.0.3 → nexpy-2.2.0}/docs/.nojekyll +0 -0
  39. {nexpy-2.0.3 → nexpy-2.2.0}/docs/Makefile +0 -0
  40. {nexpy-2.0.3 → nexpy-2.2.0}/docs/make.bat +0 -0
  41. {nexpy-2.0.3 → nexpy-2.2.0}/docs/requirements.txt +0 -0
  42. {nexpy-2.0.3 → nexpy-2.2.0}/docs/source/_static/__ignore__.txt +0 -0
  43. {nexpy-2.0.3 → nexpy-2.2.0}/docs/source/examples.rst +0 -0
  44. {nexpy-2.0.3 → nexpy-2.2.0}/docs/source/favicon.ico +0 -0
  45. {nexpy-2.0.3 → nexpy-2.2.0}/docs/source/images/axis-limits-bar.png +0 -0
  46. {nexpy-2.0.3 → nexpy-2.2.0}/docs/source/images/customize-panel.png +0 -0
  47. {nexpy-2.0.3 → nexpy-2.2.0}/docs/source/images/limits-panel.png +0 -0
  48. {nexpy-2.0.3 → nexpy-2.2.0}/docs/source/images/manage-plugins.png +0 -0
  49. {nexpy-2.0.3 → nexpy-2.2.0}/docs/source/images/nexpy-fits.png +0 -0
  50. {nexpy-2.0.3 → nexpy-2.2.0}/docs/source/images/nexpy-gui.png +0 -0
  51. {nexpy-2.0.3 → nexpy-2.2.0}/docs/source/images/nexpy-logo.png +0 -0
  52. {nexpy-2.0.3 → nexpy-2.2.0}/docs/source/images/options-tab.png +0 -0
  53. {nexpy-2.0.3 → nexpy-2.2.0}/docs/source/images/projection-panel.png +0 -0
  54. {nexpy-2.0.3 → nexpy-2.2.0}/docs/source/images/projection-tab.png +0 -0
  55. {nexpy-2.0.3 → nexpy-2.2.0}/docs/source/images/rotation-plot.png +0 -0
  56. {nexpy-2.0.3 → nexpy-2.2.0}/docs/source/images/scan-panel.png +0 -0
  57. {nexpy-2.0.3 → nexpy-2.2.0}/docs/source/images/signal-tab.png +0 -0
  58. {nexpy-2.0.3 → nexpy-2.2.0}/docs/source/images/simple-plot.png +0 -0
  59. {nexpy-2.0.3 → nexpy-2.2.0}/docs/source/images/skewed-axis.png +0 -0
  60. {nexpy-2.0.3 → nexpy-2.2.0}/docs/source/images/x-tab.png +0 -0
  61. {nexpy-2.0.3 → nexpy-2.2.0}/docs/source/images/y-tab.png +0 -0
  62. {nexpy-2.0.3 → nexpy-2.2.0}/docs/source/images/z-tab.png +0 -0
  63. {nexpy-2.0.3 → nexpy-2.2.0}/docs/source/images/z-toolbar.png +0 -0
  64. {nexpy-2.0.3 → nexpy-2.2.0}/docs/source/includeme.rst +0 -0
  65. {nexpy-2.0.3 → nexpy-2.2.0}/docs/source/index.rst +0 -0
  66. {nexpy-2.0.3 → nexpy-2.2.0}/docs/source/readers.rst +0 -0
  67. {nexpy-2.0.3 → nexpy-2.2.0}/docs/source/treeapi.rst +0 -0
  68. {nexpy-2.0.3 → nexpy-2.2.0}/scripts/sync_copyright.py +0 -0
  69. {nexpy-2.0.3 → nexpy-2.2.0}/scripts/update_copyright.py +0 -0
  70. {nexpy-2.0.3 → nexpy-2.2.0}/setup.cfg +0 -0
  71. {nexpy-2.0.3 → nexpy-2.2.0}/src/NeXpy.egg-info/dependency_links.txt +0 -0
  72. {nexpy-2.0.3 → nexpy-2.2.0}/src/NeXpy.egg-info/entry_points.txt +0 -0
  73. {nexpy-2.0.3 → nexpy-2.2.0}/src/NeXpy.egg-info/pbr.json +0 -0
  74. {nexpy-2.0.3 → nexpy-2.2.0}/src/NeXpy.egg-info/top_level.txt +0 -0
  75. {nexpy-2.0.3 → nexpy-2.2.0}/src/nexpy/__init__.py +0 -0
  76. {nexpy-2.0.3 → nexpy-2.2.0}/src/nexpy/examples/README.rst +0 -0
  77. {nexpy-2.0.3 → nexpy-2.2.0}/src/nexpy/examples/chopper.nxs +0 -0
  78. {nexpy-2.0.3 → nexpy-2.2.0}/src/nexpy/examples/example.nxs +0 -0
  79. {nexpy-2.0.3 → nexpy-2.2.0}/src/nexpy/examples/plugins/README.rst +0 -0
  80. {nexpy-2.0.3 → nexpy-2.2.0}/src/nexpy/examples/plugins/chopper_plugin/chopper/__init__.py +0 -0
  81. {nexpy-2.0.3 → nexpy-2.2.0}/src/nexpy/examples/plugins/chopper_plugin/chopper/__init__.pyc +0 -0
  82. {nexpy-2.0.3 → nexpy-2.2.0}/src/nexpy/examples/plugins/chopper_plugin/chopper/convert_qe.py +0 -0
  83. {nexpy-2.0.3 → nexpy-2.2.0}/src/nexpy/examples/plugins/chopper_plugin/chopper/convert_qe.pyc +0 -0
  84. {nexpy-2.0.3 → nexpy-2.2.0}/src/nexpy/examples/plugins/chopper_plugin/chopper/get_ei.py +0 -0
  85. {nexpy-2.0.3 → nexpy-2.2.0}/src/nexpy/examples/plugins/chopper_plugin/chopper/get_ei.pyc +0 -0
  86. {nexpy-2.0.3 → nexpy-2.2.0}/src/nexpy/examples/plugins/chopper_plugin/pyproject.toml +0 -0
  87. {nexpy-2.0.3 → nexpy-2.2.0}/src/nexpy/examples/scripts/README.rst +0 -0
  88. {nexpy-2.0.3 → nexpy-2.2.0}/src/nexpy/examples/scripts/chopper_plot.py +0 -0
  89. {nexpy-2.0.3 → nexpy-2.2.0}/src/nexpy/examples/scripts/example.py +0 -0
  90. {nexpy-2.0.3 → nexpy-2.2.0}/src/nexpy/gui/__init__.py +0 -0
  91. {nexpy-2.0.3 → nexpy-2.2.0}/src/nexpy/gui/datadialogs.py +0 -0
  92. {nexpy-2.0.3 → nexpy-2.2.0}/src/nexpy/gui/importdialog.py +0 -0
  93. {nexpy-2.0.3 → nexpy-2.2.0}/src/nexpy/gui/plotview.py +0 -0
  94. {nexpy-2.0.3 → nexpy-2.2.0}/src/nexpy/gui/pyqt.py +0 -0
  95. {nexpy-2.0.3 → nexpy-2.2.0}/src/nexpy/gui/resources/NeXpy.png +0 -0
  96. {nexpy-2.0.3 → nexpy-2.2.0}/src/nexpy/gui/resources/NeXpy.svg +0 -0
  97. {nexpy-2.0.3 → nexpy-2.2.0}/src/nexpy/gui/resources/back.png +0 -0
  98. {nexpy-2.0.3 → nexpy-2.2.0}/src/nexpy/gui/resources/backward-icon.png +0 -0
  99. {nexpy-2.0.3 → nexpy-2.2.0}/src/nexpy/gui/resources/customize.png +0 -0
  100. {nexpy-2.0.3 → nexpy-2.2.0}/src/nexpy/gui/resources/equal.png +0 -0
  101. {nexpy-2.0.3 → nexpy-2.2.0}/src/nexpy/gui/resources/export-data.png +0 -0
  102. {nexpy-2.0.3 → nexpy-2.2.0}/src/nexpy/gui/resources/export-figure.png +0 -0
  103. {nexpy-2.0.3 → nexpy-2.2.0}/src/nexpy/gui/resources/filesave.png +0 -0
  104. {nexpy-2.0.3 → nexpy-2.2.0}/src/nexpy/gui/resources/forward-icon.png +0 -0
  105. {nexpy-2.0.3 → nexpy-2.2.0}/src/nexpy/gui/resources/forward.png +0 -0
  106. {nexpy-2.0.3 → nexpy-2.2.0}/src/nexpy/gui/resources/hand.png +0 -0
  107. {nexpy-2.0.3 → nexpy-2.2.0}/src/nexpy/gui/resources/home.png +0 -0
  108. {nexpy-2.0.3 → nexpy-2.2.0}/src/nexpy/gui/resources/modify-style.png +0 -0
  109. {nexpy-2.0.3 → nexpy-2.2.0}/src/nexpy/gui/resources/move.png +0 -0
  110. {nexpy-2.0.3 → nexpy-2.2.0}/src/nexpy/gui/resources/pause-icon.png +0 -0
  111. {nexpy-2.0.3 → nexpy-2.2.0}/src/nexpy/gui/resources/refresh-icon.png +0 -0
  112. {nexpy-2.0.3 → nexpy-2.2.0}/src/nexpy/gui/resources/tree-link.svg +0 -0
  113. {nexpy-2.0.3 → nexpy-2.2.0}/src/nexpy/gui/resources/tree-lock.svg +0 -0
  114. {nexpy-2.0.3 → nexpy-2.2.0}/src/nexpy/gui/resources/tree-modified.svg +0 -0
  115. {nexpy-2.0.3 → nexpy-2.2.0}/src/nexpy/gui/resources/unlock-icon.png +0 -0
  116. {nexpy-2.0.3 → nexpy-2.2.0}/src/nexpy/gui/resources/unlock-red-icon.png +0 -0
  117. {nexpy-2.0.3 → nexpy-2.2.0}/src/nexpy/gui/resources/zoom_to_rect.png +0 -0
  118. {nexpy-2.0.3 → nexpy-2.2.0}/src/nexpy/models/bose.py +0 -0
  119. {nexpy-2.0.3 → nexpy-2.2.0}/src/nexpy/models/critexp.py +0 -0
  120. {nexpy-2.0.3 → nexpy-2.2.0}/src/nexpy/models/op.py +0 -0
  121. {nexpy-2.0.3 → nexpy-2.2.0}/src/nexpy/models/pdfdecay.py +0 -0
  122. {nexpy-2.0.3 → nexpy-2.2.0}/src/nexpy/nexpygui.py +0 -0
  123. {nexpy-2.0.3 → nexpy-2.2.0}/src/nexpy/readers/readnpy.py +0 -0
  124. {nexpy-2.0.3 → nexpy-2.2.0}/src/nexpy/readers/readspec.py +0 -0
  125. {nexpy-2.0.3 → nexpy-2.2.0}/src/nexpy/readers/readstack.py +0 -0
  126. {nexpy-2.0.3 → nexpy-2.2.0}/src/nexpy/readers/readtiff.py +0 -0
  127. {nexpy-2.0.3 → nexpy-2.2.0}/src/nexpy/readers/readtxt.py +0 -0
  128. {nexpy-2.0.3 → nexpy-2.2.0}/tests/test_imports.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: NeXpy
3
- Version: 2.0.3
3
+ Version: 2.2.0
4
4
  Summary: Python GUI to analyze NeXus data
5
5
  Author-email: Raymond Osborn <rayosborn@mac.com>
6
6
  License: Licensing Terms for NeXpy
@@ -90,7 +90,7 @@ Requires-Dist: ipython
90
90
  Requires-Dist: lmfit
91
91
  Requires-Dist: matplotlib
92
92
  Requires-Dist: mplcursors
93
- Requires-Dist: nexusformat>=2.0.3
93
+ Requires-Dist: nexusformat>=2.2.0
94
94
  Requires-Dist: numpy
95
95
  Requires-Dist: packaging
96
96
  Requires-Dist: pillow
@@ -267,7 +267,7 @@ Consult the [NeXpy documentation](http://nexpy.github.io/nexpy) for details
267
267
  of both the Python command-line API and how to use the NeXpy GUI. If you have
268
268
  any general questions concerning the use of NeXpy, please address
269
269
  them to the
270
- [NeXus Mailing List](http://download.nexusformat.org/doc/html/mailinglist.html).
270
+ [NeXus Mailing List](https://manual.nexusformat.org/mailinglist.html).
271
271
  If you discover any bugs, please submit a
272
272
  [Github issue](https://github.com/nexpy/nexpy/issues), preferably with relevant
273
273
  tracebacks.
@@ -150,7 +150,7 @@ Consult the [NeXpy documentation](http://nexpy.github.io/nexpy) for details
150
150
  of both the Python command-line API and how to use the NeXpy GUI. If you have
151
151
  any general questions concerning the use of NeXpy, please address
152
152
  them to the
153
- [NeXus Mailing List](http://download.nexusformat.org/doc/html/mailinglist.html).
153
+ [NeXus Mailing List](https://manual.nexusformat.org/mailinglist.html).
154
154
  If you discover any bugs, please submit a
155
155
  [Github issue](https://github.com/nexpy/nexpy/issues), preferably with relevant
156
156
  tracebacks.
@@ -1,7 +1,7 @@
1
1
  Installation
2
2
  ============
3
3
  Released versions of NeXpy are available on `PyPI
4
- <https://pypi.python.org/pypi/NeXpy/>`__ and `conda-forge
4
+ <https://pypi.org/project/NeXpy/>`__ and `conda-forge
5
5
  <https://anaconda.org/conda-forge/nexpy>`__.
6
6
 
7
7
  NeXpy can be installed into an existing environment using 'pip'::
@@ -22,8 +22,9 @@ installed as an optional extra package::
22
22
 
23
23
  $ pip install nexpy[qt]
24
24
 
25
- The ``[qt]`` extra installs PyQt5 as the Qt binding. If you prefer a different
26
- binding, you can use ``[pyqt6]``, ``[pyside2]``, or ``[pyside6]`` instead.
25
+ The ``[qt]`` extra installs PyQt5 as the Qt binding. If you prefer a
26
+ different binding, you can use ``[pyqt6]``, ``[pyside2]``, or
27
+ ``[pyside6]`` instead.
27
28
 
28
29
  NeXpy can be installed in an isolated environment using `uv
29
30
  <https://docs.astral.sh/uv/>`__::
@@ -34,24 +35,26 @@ or `pipx <https://pipx.pypa.io/>`__::
34
35
 
35
36
  $ pipx install nexpy[qt]
36
37
 
37
- If you have the `Python Setup Tools
38
- <https://pypi.python.org/pypi/setuptools>`__, you can install the
39
- package from the source code either by downloading one of the `Github
40
- releases <https://github.com/nexpy/nexpy/releases>`__ or by cloning the
41
- latest development version in the `NeXpy Git repository
38
+ You can also install the package from the source code, either by
39
+ downloading one of the `Github releases
40
+ <https://github.com/nexpy/nexpy/releases>`__ or by cloning the latest
41
+ development version in the `NeXpy Git repository
42
42
  <https://github.com/nexpy/nexpy>`__::
43
43
 
44
44
  $ git clone https://github.com/nexpy/nexpy.git
45
45
 
46
- Then use standard Python tools to build and/or install a distribution
47
- from within the source directory::
46
+ Then install it from within the source directory::
47
+
48
+ $ pip install .
48
49
 
49
- $ python -m build # build a distribution
50
- $ python -m pip install . # install the package
50
+ If you intend to modify the code, install it in editable mode, so that
51
+ your changes take effect without reinstalling::
52
+
53
+ $ pip install -e .
51
54
 
52
55
  The Python API for reading and writing NeXus files is in a separate
53
56
  package, `nexusformat <https://github.com/nexpy/nexusformat>`__, which
54
- is also available on `PyPI <https://pypi.python.org/pypi/nexusformat>`__
57
+ is also available on `PyPI <https://pypi.org/project/nexusformat/>`__
55
58
  and `conda-forge <https://anaconda.org/conda-forge/nexusformat>`__.
56
59
 
57
60
  If the NeXpy GUI is not required, the package may be used in any Python
@@ -71,13 +74,17 @@ latest development version in the `NeXpy Git repository
71
74
 
72
75
  $ git clone https://github.com/nexpy/nexusformat.git
73
76
 
77
+ It is then installed from within the source directory in the same way,
78
+ using ``pip install .``, or ``pip install -e .`` for an editable
79
+ installation.
80
+
74
81
  Required Libraries
75
82
  ==================
76
83
  Python Command-Line API
77
84
  -----------------------
78
85
  NeXpy provides a GUI interface to the `nexusformat API
79
86
  <https://github.com/nexpy/nexusformat>`__, which uses `h5py
80
- <http://h5py.org>`__ to read and write HDF5 files that implement the
87
+ <https://www.h5py.org>`__ to read and write HDF5 files that implement the
81
88
  `NeXus data format standard <https://www.nexusformat.org>`__. It does
82
89
  not use the NeXus C API, which means that the current version cannot
83
90
  read and write legacy HDF4 or XML NeXus files. One of the `NeXus
@@ -85,33 +92,35 @@ conversion utilities <https://manual.nexusformat.org/utilities.html>`__
85
92
  should be used to convert such files to HDF5.
86
93
 
87
94
  If you only intend to utilize the Python API from the command-line, the
88
- only other required libraries are `NumPy <https://numpy.org>`__ and
89
- `SciPy <http://scipy.org>`__. Autocompletion of group and field paths
90
- within an open file is available if `IPython <https://ipython.org/>`__
91
- is installed.
95
+ required libraries are limited to those listed below, principally `NumPy
96
+ <https://numpy.org>`__ and `SciPy <https://scipy.org>`__. Autocompletion
97
+ of group and field paths within an open file is available if `IPython
98
+ <https://ipython.org/>`__ is installed.
92
99
 
93
100
  ================= =================================================
94
101
  Library URL
95
102
  ================= =================================================
96
103
  nexusformat https://github.com/nexpy/nexusformat/
97
104
  h5py https://www.h5py.org
105
+ hdf5plugin https://hdf5plugin.readthedocs.io/
98
106
  numpy https://numpy.org/
99
107
  scipy https://scipy.org/
100
108
  packaging https://packaging.pypa.io/
101
109
  dateutil https://dateutil.readthedocs.io/
110
+ chardet https://chardet.readthedocs.io/
102
111
  colored https://dslackw.gitlab.io/colored/
103
112
  pygments https://pygments.org/
104
113
  ================= =================================================
105
114
 
106
115
  NeXpy GUI
107
116
  ---------
108
- The GUI is built using the PyQt. The `qtpy package
117
+ The GUI is built using PyQt. The `qtpy package
109
118
  <https://github.com/spyder-ide/qtpy>`__ is used to import whatever PyQt
110
119
  library is installed, whether PyQt5, PyQt6, PySide2, or PySide6.
111
120
 
112
- NeXpy embeds an `IPython shell <http://ipython.org/>`__ and `Matplotlib
113
- plotting pane <http://matplotlib.sourceforge.net>`__, within a Qt GUI
114
- based on the Jupyter QtConsole with an in-process kernel.
121
+ NeXpy embeds an `IPython shell <https://ipython.org/>`__ and `Matplotlib
122
+ plotting pane <https://matplotlib.org>`__, within a Qt GUI based on the
123
+ Jupyter QtConsole with an in-process kernel.
115
124
 
116
125
  Least-squares fitting of 1D data uses the `LMFIT package
117
126
  <https://lmfit.github.io/lmfit-py/>`__.
@@ -122,12 +131,14 @@ Library URL
122
131
  IPython https://ipython.org/
123
132
  qtconsole https://qtconsole.readthedocs.io/
124
133
  qtpy https://github.com/spyder-ide/qtpy
134
+ darkdetect https://github.com/albertosottile/darkdetect
125
135
  matplotlib https://matplotlib.org/
126
136
  lmfit https://lmfit.github.io/lmfit-py/
127
137
  fabio https://github.com/silx-kit/fabio
128
138
  pillow https://pillow.readthedocs.io/
129
139
  pylatexenc https://pylatexenc.readthedocs.io/
130
- ansi2html https://pypi.python.org/pypi/ansi2html/
140
+ ansi2html https://pypi.org/project/ansi2html/
141
+ dateparser https://dateparser.readthedocs.io/
131
142
  mplcursors https://mplcursors.readthedocs.io/
132
143
  ================= =================================================
133
144
 
@@ -135,19 +146,19 @@ Additional Packages
135
146
  -------------------
136
147
  Importers may require additional libraries to read the imported files in
137
148
  their native format, *e.g.*, `spec2nexus
138
- <http://spec2nexus.readthedocs.org/>`__ for reading SPEC files.
149
+ <https://spec2nexus.readthedocs.io/>`__ for reading SPEC files.
139
150
 
140
- From v0.9.1, a new 2D smoothing option is available in the list of
141
- interpolations in the signal tab if `astropy <http://www.astropy.org>`__
142
- is installed. It is labelled 'convolve' and provides, by default, a
143
- 2-pixel Gaussian smoothing of the data. The number of pixels can be
144
- changed in the shell by setting ``plotview.smooth``.
151
+ A 2D smoothing option is available in the list of interpolations in the
152
+ signal tab if `astropy <https://www.astropy.org>`__ is installed. It is
153
+ labelled 'convolve' and provides, by default, a 2-pixel Gaussian
154
+ smoothing of the data. The number of pixels can be changed in the shell
155
+ by setting ``plotview.smooth``.
145
156
 
146
157
  ================= =================================================
147
158
  Library URL
148
159
  ================= =================================================
149
- spec2nexus http://spec2nexus.readthedocs.org/
150
- astropy http://www.astropy.org/
160
+ spec2nexus https://spec2nexus.readthedocs.io/
161
+ astropy https://www.astropy.org/
151
162
  ================= =================================================
152
163
 
153
164
  .. note:: NeXpy should still run without these additional packages, but
@@ -155,9 +166,8 @@ astropy http://www.astropy.org/
155
166
 
156
167
  Running the GUI
157
168
  ---------------
158
- To run from the installed location, add the $prefix/bin directory to
159
- your path if you installed outside the python installation, and then
160
- run::
169
+ Once the package is installed, the GUI is launched from the command
170
+ line::
161
171
 
162
172
  $ nexpy [-r]
163
173
 
@@ -165,22 +175,22 @@ The -r option restores all files loaded in the previous session.
165
175
 
166
176
  Semantic Versioning
167
177
  -------------------
168
- NeXpy uses `Semantic Versioning <http://semver.org/spec/v2.0.0.html>`__.
178
+ NeXpy uses `Semantic Versioning <https://semver.org/spec/v2.0.0.html>`__.
169
179
 
170
180
  User Support
171
181
  ------------
172
- Consult the `NeXpy documentation <http://nexpy.github.io/nexpy/>`__ for
182
+ Consult the `NeXpy documentation <https://nexpy.github.io/nexpy/>`__ for
173
183
  details of both the Python command-line API and how to use the NeXpy
174
184
  GUI. If you have any general questions concerning the use of NeXpy,
175
185
  please address them to the `NeXus Mailing List
176
- <http://download.nexusformat.org/doc/html/mailinglist.html>`__. If you
177
- discover any bugs, please submit a `Github issue
186
+ <https://manual.nexusformat.org/mailinglist.html>`__. If you discover
187
+ any bugs, please submit a `Github issue
178
188
  <https://github.com/nexpy/nexpy/issues>`__, preferably with relevant
179
189
  tracebacks.
180
190
 
181
191
  Acknowledgements
182
192
  ----------------
183
- The `NeXus format <http://www.nexusformat.org>`__ for neutron, x-ray and
193
+ The `NeXus format <https://www.nexusformat.org>`__ for neutron, x-ray and
184
194
  muon data is developed by an international collaboration under the
185
195
  supervision of the `NeXus International Advisory Committee
186
196
  <https://www.nexusformat.org/NIAC.html>`__. The Python tree API used in
@@ -1,10 +1,10 @@
1
1
  package:
2
2
  name: nexpy
3
- version: "2.0.3"
3
+ version: "2.2.0"
4
4
 
5
5
  source:
6
6
  git_url: https://github.com/nexpy/nexpy.git
7
- git_tag: v2.0.3
7
+ git_tag: v2.2.0
8
8
 
9
9
  build:
10
10
  entry_points:
@@ -14,12 +14,12 @@ build:
14
14
 
15
15
  requirements:
16
16
  build:
17
- - python >=3.9
17
+ - python >=3.10
18
18
  - setuptools
19
19
  - setuptools_scm
20
20
 
21
21
  run:
22
- - python >= 3.9
22
+ - python >= 3.10
23
23
  - ansi2html
24
24
  - darkdetect
25
25
  - dateparser
@@ -29,7 +29,7 @@ requirements:
29
29
  - lmfit
30
30
  - matplotlib
31
31
  - mplcursors
32
- - nexusformat >= 2.0.3
32
+ - nexusformat >= 2.2.0
33
33
  - numpy
34
34
  - packaging
35
35
  - pillow
@@ -53,7 +53,7 @@ summary = 'A Python GUI to analyze NeXus data'
53
53
  # places throughout the built documents.
54
54
  #
55
55
  # The short X.Y version.
56
- version = "2.0.0"
56
+ version = "2.2.0"
57
57
  release = version
58
58
 
59
59
  # The language for content autogenerated by Sphinx. Refer to
@@ -280,19 +280,82 @@ Data Menu
280
280
 
281
281
  **Validate Data**
282
282
  Displays a text window, in which the contents of the selected group
283
- are checked against the NeXus standard. There are options to check
284
- that the group contents conform to the base class or, in the case of
285
- NXentry, NXsubentry, and NXroot groups, to validate the group
286
- contents against an application definition. The definitions are, by
283
+ are checked against the NeXus standard. The definitions are, by
287
284
  default, stored in the installed package, but it is possible to
288
285
  select a different definitions directory, as well as a different
289
- application definition file. The XML definition of the group's base
290
- class can also be displayed.
286
+ application definition file. The results are displayed in the text
287
+ window, and the radio buttons below it select the minimum severity
288
+ of the messages that are shown (Info, Warning, or Error). Changing
289
+ the level, the definitions directory, or the application definition
290
+ automatically re-runs the most recently selected action.
291
291
 
292
292
  .. image:: /images/validation-panel.png
293
293
  :align: center
294
294
  :width: 90%
295
295
 
296
+ The following action buttons are available. Only one is active at a
297
+ time; the button for the action whose results are currently
298
+ displayed is shown as checked.
299
+
300
+ **Check Base Class**
301
+ Checks that the contents of the selected group conform to its
302
+ NeXus base class, reporting any fields, attributes, or child
303
+ groups that are not defined by the base class or that violate
304
+ its requirements.
305
+
306
+ **Inspect Base Class**
307
+ Displays the base class definition itself, so that the fields,
308
+ attributes, and groups that are defined for the selected group
309
+ can be compared with its actual contents.
310
+
311
+ **Lint Base Class**
312
+ Checks the NXDL file that defines the base class of the selected
313
+ group, rather than the group itself, for structural errors. The
314
+ file is taken from the ``base_classes`` subdirectory of the
315
+ current definitions directory or, for the contributed base
316
+ classes, from the
317
+ ``contributed_definitions`` subdirectory, in which case a
318
+ warning is added that the base class is a contributed one. This
319
+ is mainly of use to those who are developing or modifying base
320
+ class definitions.
321
+
322
+ **Validate Entry**
323
+ Only displayed if the selected group is an NXentry, NXsubentry,
324
+ or NXroot group (in which case the first NXentry is used).
325
+ Validates the entry against an application definition. If the
326
+ entry contains a ``definition`` field, the corresponding file in
327
+ the ``applications`` subdirectory of the definitions directory
328
+ is selected automatically.
329
+
330
+ For NXentry, NXsubentry, and NXroot groups, an **Application
331
+ Definition** file selector is also displayed, allowing a different
332
+ application definition to be chosen. Next to it, the **Inspect** and
333
+ **Lint** buttons act on the selected application definition's NXDL
334
+ file. They are only enabled if the application definition file can
335
+ be found in the definitions directory (in either the
336
+ ``applications`` or ``contributed_definitions`` subdirectory) or has
337
+ been selected explicitly.
338
+
339
+ **Inspect**
340
+ Displays the NXDL file of the application definition in the text
341
+ window.
342
+
343
+ **Lint**
344
+ Checks the NXDL file for structural errors. If none are found,
345
+ each group in the definition, including those inherited through
346
+ ``extends``, is also checked against the base class of the group
347
+ that contains it. Groups that the parent base class does not
348
+ allow, fixed-name groups with the wrong class, and classes with
349
+ no NXDL file are reported. These are given as warnings for a
350
+ definition in the ``applications`` subdirectory and as errors
351
+ for any other definition. If no problems are found, a message to
352
+ that effect is displayed.
353
+
354
+ .. note:: Inspecting and linting require NeXpy to be installed with
355
+ nexusformat v2.2.0 or later. For help in interpreting the linting
356
+ messages, consult the `NXDL reference
357
+ <https://manual.nexusformat.org/nxdl.html>`_.
358
+
296
359
  **Add Group**
297
360
  Adds a group to the selected group in the tree with the specified
298
361
  name and base class. A dropdown menu display lists valid base
@@ -418,7 +481,9 @@ Window Menu
418
481
  ``~/.nexpy/nexpy.log.1``, *etc*., records operations on the tree
419
482
  items, as well as comprehensive tracebacks of exceptions in both the
420
483
  GUI and the IPython shell. Only one-line summaries are displayed in
421
- the shell to improve readability.
484
+ the shell to improve readability. Errors reported to the user in a
485
+ message box are also logged, with only the message of an expected
486
+ NeXus error but the full traceback of any other exception.
422
487
 
423
488
  .. note:: The log files contain ANSI markup to colorize the text,
424
489
  which can be rendered in the terminal using ``less -r``.
@@ -1159,6 +1224,14 @@ appropriate for modeling quasielastic neutron scattering.
1159
1224
  A 'Compose Model' button allows the algebraic expression combining the
1160
1225
  currently added models to be edited.
1161
1226
 
1227
+ The expression can also contain the function ``convolve(model,
1228
+ kernel)``, which convolves a model with another model, such as a
1229
+ Gaussian or Lorentzian representing the instrumental resolution. For
1230
+ example, ``convolve(Lorentzian_1 + Linear_2, Gaussian_3)`` convolves the
1231
+ sum of the first two models with the third. The 'amplitude' and 'center'
1232
+ parameters are fixed automatically at 1 and 0 whenever a model is used
1233
+ as a kernel, and only the parameters defining its shape are meaningful.
1234
+
1162
1235
  It is also possible to combine a subset of models when plotting the
1163
1236
  fitted models, by selecting 'Composite Model' before clicking 'Plot
1164
1237
  Model'. This allows, for example, several functions representing a
@@ -1473,7 +1546,7 @@ argument), a couple of buttons to activate different parts of the
1473
1546
  analysis, and finally the functions themselves::
1474
1547
 
1475
1548
  import numpy as np
1476
- from nexpy.gui.dialogs import GridParameters, NXDialog
1549
+ from nexpy.gui.datadialogs import GridParameters, NXDialog
1477
1550
  from nexpy.gui.mainwindow import report_error
1478
1551
  from nexusformat.nexus import NeXusError
1479
1552