NeXpy 2.0.0b8__tar.gz → 2.0.1__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.
- nexpy-2.0.1/.github/workflows/ci.yml +41 -0
- nexpy-2.0.1/.github/workflows/sphinx.yml +31 -0
- {nexpy-2.0.0b8 → nexpy-2.0.1}/.gitignore +3 -1
- {nexpy-2.0.0b8 → nexpy-2.0.1}/PKG-INFO +62 -12
- {nexpy-2.0.0b8 → nexpy-2.0.1}/README.md +47 -5
- nexpy-2.0.1/README.rst +193 -0
- {nexpy-2.0.0b8 → nexpy-2.0.1}/conda-recipe/meta.yaml +4 -8
- nexpy-2.0.1/docs/Makefile +20 -0
- nexpy-2.0.1/docs/requirements.txt +3 -0
- {nexpy-2.0.0b8/doc → nexpy-2.0.1/docs}/source/conf.py +69 -65
- nexpy-2.0.1/docs/source/images/manage-plugins.png +0 -0
- nexpy-2.0.1/docs/source/images/options-tab.png +0 -0
- nexpy-2.0.1/docs/source/images/projection-tab.png +0 -0
- nexpy-2.0.1/docs/source/images/rotation-plot.png +0 -0
- nexpy-2.0.1/docs/source/images/validation-panel.png +0 -0
- nexpy-2.0.1/docs/source/index.rst +65 -0
- nexpy-2.0.1/docs/source/pythongui.rst +1545 -0
- nexpy-2.0.1/docs/source/pythonshell.rst +1361 -0
- {nexpy-2.0.0b8 → nexpy-2.0.1}/pyproject.toml +12 -5
- {nexpy-2.0.0b8 → nexpy-2.0.1}/src/NeXpy.egg-info/PKG-INFO +62 -12
- {nexpy-2.0.0b8 → nexpy-2.0.1}/src/NeXpy.egg-info/SOURCES.txt +35 -29
- nexpy-2.0.1/src/NeXpy.egg-info/dependency_links.txt +1 -0
- {nexpy-2.0.0b8 → nexpy-2.0.1}/src/NeXpy.egg-info/requires.txt +16 -4
- {nexpy-2.0.0b8 → nexpy-2.0.1}/src/nexpy/_version.py +16 -3
- nexpy-2.0.1/src/nexpy/examples/plugins/README.rst +46 -0
- {nexpy-2.0.0b8 → nexpy-2.0.1}/src/nexpy/gui/consoleapp.py +14 -8
- {nexpy-2.0.0b8 → nexpy-2.0.1}/src/nexpy/gui/dialogs.py +108 -144
- {nexpy-2.0.0b8 → nexpy-2.0.1}/src/nexpy/gui/fitdialogs.py +71 -172
- {nexpy-2.0.0b8 → nexpy-2.0.1}/src/nexpy/gui/mainwindow.py +42 -71
- {nexpy-2.0.0b8 → nexpy-2.0.1}/src/nexpy/gui/plotview.py +4 -2
- {nexpy-2.0.0b8 → nexpy-2.0.1}/src/nexpy/gui/pyqt.py +4 -4
- {nexpy-2.0.0b8 → nexpy-2.0.1}/src/nexpy/gui/treeview.py +1 -4
- {nexpy-2.0.0b8 → nexpy-2.0.1}/src/nexpy/gui/utils.py +7 -37
- {nexpy-2.0.0b8 → nexpy-2.0.1}/src/nexpy/gui/widgets.py +61 -49
- {nexpy-2.0.0b8 → nexpy-2.0.1}/src/nexpy/nexpygui.py +9 -4
- nexpy-2.0.1/tests/test_imports.py +25 -0
- nexpy-2.0.0b8/.github/workflows/ci.yml +0 -25
- nexpy-2.0.0b8/README.rst +0 -167
- nexpy-2.0.0b8/doc/Makefile +0 -156
- nexpy-2.0.0b8/doc/source/images/options-tab.png +0 -0
- nexpy-2.0.0b8/doc/source/images/projection-tab.png +0 -0
- nexpy-2.0.0b8/doc/source/index.rst +0 -36
- nexpy-2.0.0b8/doc/source/pythongui.rst +0 -1423
- nexpy-2.0.0b8/doc/source/pythonshell.rst +0 -1202
- nexpy-2.0.0b8/src/nexpy/examples/plugins/README.rst +0 -42
- nexpy-2.0.0b8/tests/test_imports.py +0 -33
- {nexpy-2.0.0b8 → nexpy-2.0.1}/.gitattributes +0 -0
- {nexpy-2.0.0b8 → nexpy-2.0.1}/.github/dependabot.yaml +0 -0
- {nexpy-2.0.0b8 → nexpy-2.0.1}/COPYING +0 -0
- {nexpy-2.0.0b8 → nexpy-2.0.1}/conda-recipe/bld.bat +0 -0
- {nexpy-2.0.0b8 → nexpy-2.0.1}/conda-recipe/build.sh +0 -0
- /nexpy-2.0.0b8/src/NeXpy.egg-info/dependency_links.txt → /nexpy-2.0.1/docs/.nojekyll +0 -0
- {nexpy-2.0.0b8/doc → nexpy-2.0.1/docs}/make.bat +0 -0
- {nexpy-2.0.0b8/doc → nexpy-2.0.1/docs}/source/_static/__ignore__.txt +0 -0
- {nexpy-2.0.0b8/doc → nexpy-2.0.1/docs}/source/examples.rst +0 -0
- {nexpy-2.0.0b8/doc → nexpy-2.0.1/docs}/source/favicon.ico +0 -0
- {nexpy-2.0.0b8/doc → nexpy-2.0.1/docs}/source/images/axis-limits-bar.png +0 -0
- {nexpy-2.0.0b8/doc → nexpy-2.0.1/docs}/source/images/customize-panel.png +0 -0
- {nexpy-2.0.0b8/doc → nexpy-2.0.1/docs}/source/images/limits-panel.png +0 -0
- {nexpy-2.0.0b8/doc → nexpy-2.0.1/docs}/source/images/nexpy-fits.png +0 -0
- {nexpy-2.0.0b8/doc → nexpy-2.0.1/docs}/source/images/nexpy-gui.png +0 -0
- {nexpy-2.0.0b8/doc → nexpy-2.0.1/docs}/source/images/nexpy-logo.png +0 -0
- {nexpy-2.0.0b8/doc → nexpy-2.0.1/docs}/source/images/projection-panel.png +0 -0
- {nexpy-2.0.0b8/doc → nexpy-2.0.1/docs}/source/images/scan-panel.png +0 -0
- {nexpy-2.0.0b8/doc → nexpy-2.0.1/docs}/source/images/signal-tab.png +0 -0
- {nexpy-2.0.0b8/doc → nexpy-2.0.1/docs}/source/images/simple-plot.png +0 -0
- {nexpy-2.0.0b8/doc → nexpy-2.0.1/docs}/source/images/skewed-axis.png +0 -0
- {nexpy-2.0.0b8/doc → nexpy-2.0.1/docs}/source/images/x-tab.png +0 -0
- {nexpy-2.0.0b8/doc → nexpy-2.0.1/docs}/source/images/y-tab.png +0 -0
- {nexpy-2.0.0b8/doc → nexpy-2.0.1/docs}/source/images/z-tab.png +0 -0
- {nexpy-2.0.0b8/doc → nexpy-2.0.1/docs}/source/images/z-toolbar.png +0 -0
- {nexpy-2.0.0b8/doc → nexpy-2.0.1/docs}/source/includeme.rst +0 -0
- {nexpy-2.0.0b8/doc → nexpy-2.0.1/docs}/source/readers.rst +0 -0
- {nexpy-2.0.0b8/doc → nexpy-2.0.1/docs}/source/treeapi.rst +0 -0
- {nexpy-2.0.0b8 → nexpy-2.0.1}/setup.cfg +0 -0
- {nexpy-2.0.0b8 → nexpy-2.0.1}/src/NeXpy.egg-info/entry_points.txt +0 -0
- {nexpy-2.0.0b8 → nexpy-2.0.1}/src/NeXpy.egg-info/pbr.json +0 -0
- {nexpy-2.0.0b8 → nexpy-2.0.1}/src/NeXpy.egg-info/top_level.txt +0 -0
- {nexpy-2.0.0b8 → nexpy-2.0.1}/src/nexpy/__init__.py +0 -0
- {nexpy-2.0.0b8 → nexpy-2.0.1}/src/nexpy/examples/README.rst +0 -0
- {nexpy-2.0.0b8 → nexpy-2.0.1}/src/nexpy/examples/chopper.nxs +0 -0
- {nexpy-2.0.0b8 → nexpy-2.0.1}/src/nexpy/examples/example.nxs +0 -0
- {nexpy-2.0.0b8 → nexpy-2.0.1}/src/nexpy/examples/plugins/chopper_plugin/chopper/__init__.py +0 -0
- {nexpy-2.0.0b8 → nexpy-2.0.1}/src/nexpy/examples/plugins/chopper_plugin/chopper/__init__.pyc +0 -0
- {nexpy-2.0.0b8 → nexpy-2.0.1}/src/nexpy/examples/plugins/chopper_plugin/chopper/convert_qe.py +0 -0
- {nexpy-2.0.0b8 → nexpy-2.0.1}/src/nexpy/examples/plugins/chopper_plugin/chopper/convert_qe.pyc +0 -0
- {nexpy-2.0.0b8 → nexpy-2.0.1}/src/nexpy/examples/plugins/chopper_plugin/chopper/get_ei.py +0 -0
- {nexpy-2.0.0b8 → nexpy-2.0.1}/src/nexpy/examples/plugins/chopper_plugin/chopper/get_ei.pyc +0 -0
- {nexpy-2.0.0b8 → nexpy-2.0.1}/src/nexpy/examples/plugins/chopper_plugin/pyproject.toml +0 -0
- {nexpy-2.0.0b8 → nexpy-2.0.1}/src/nexpy/examples/scripts/README.rst +0 -0
- {nexpy-2.0.0b8 → nexpy-2.0.1}/src/nexpy/examples/scripts/chopper_plot.py +0 -0
- {nexpy-2.0.0b8 → nexpy-2.0.1}/src/nexpy/examples/scripts/example.py +0 -0
- {nexpy-2.0.0b8 → nexpy-2.0.1}/src/nexpy/gui/__init__.py +0 -0
- {nexpy-2.0.0b8 → nexpy-2.0.1}/src/nexpy/gui/datadialogs.py +0 -0
- {nexpy-2.0.0b8 → nexpy-2.0.1}/src/nexpy/gui/importdialog.py +0 -0
- {nexpy-2.0.0b8 → nexpy-2.0.1}/src/nexpy/gui/resources/NeXpy.png +0 -0
- {nexpy-2.0.0b8 → nexpy-2.0.1}/src/nexpy/gui/resources/NeXpy.svg +0 -0
- {nexpy-2.0.0b8 → nexpy-2.0.1}/src/nexpy/gui/resources/back.png +0 -0
- {nexpy-2.0.0b8 → nexpy-2.0.1}/src/nexpy/gui/resources/backward-icon.png +0 -0
- {nexpy-2.0.0b8 → nexpy-2.0.1}/src/nexpy/gui/resources/customize.png +0 -0
- {nexpy-2.0.0b8 → nexpy-2.0.1}/src/nexpy/gui/resources/equal.png +0 -0
- {nexpy-2.0.0b8 → nexpy-2.0.1}/src/nexpy/gui/resources/export-data.png +0 -0
- {nexpy-2.0.0b8 → nexpy-2.0.1}/src/nexpy/gui/resources/export-figure.png +0 -0
- {nexpy-2.0.0b8 → nexpy-2.0.1}/src/nexpy/gui/resources/filesave.png +0 -0
- {nexpy-2.0.0b8 → nexpy-2.0.1}/src/nexpy/gui/resources/forward-icon.png +0 -0
- {nexpy-2.0.0b8 → nexpy-2.0.1}/src/nexpy/gui/resources/forward.png +0 -0
- {nexpy-2.0.0b8 → nexpy-2.0.1}/src/nexpy/gui/resources/hand.png +0 -0
- {nexpy-2.0.0b8 → nexpy-2.0.1}/src/nexpy/gui/resources/home.png +0 -0
- {nexpy-2.0.0b8 → nexpy-2.0.1}/src/nexpy/gui/resources/link-icon.png +0 -0
- {nexpy-2.0.0b8 → nexpy-2.0.1}/src/nexpy/gui/resources/lock-icon.png +0 -0
- {nexpy-2.0.0b8 → nexpy-2.0.1}/src/nexpy/gui/resources/lock-red-icon.png +0 -0
- {nexpy-2.0.0b8 → nexpy-2.0.1}/src/nexpy/gui/resources/modify-style.png +0 -0
- {nexpy-2.0.0b8 → nexpy-2.0.1}/src/nexpy/gui/resources/move.png +0 -0
- {nexpy-2.0.0b8 → nexpy-2.0.1}/src/nexpy/gui/resources/pause-icon.png +0 -0
- {nexpy-2.0.0b8 → nexpy-2.0.1}/src/nexpy/gui/resources/refresh-icon.png +0 -0
- {nexpy-2.0.0b8 → nexpy-2.0.1}/src/nexpy/gui/resources/unlock-icon.png +0 -0
- {nexpy-2.0.0b8 → nexpy-2.0.1}/src/nexpy/gui/resources/unlock-red-icon.png +0 -0
- {nexpy-2.0.0b8 → nexpy-2.0.1}/src/nexpy/gui/resources/zoom_to_rect.png +0 -0
- {nexpy-2.0.0b8 → nexpy-2.0.1}/src/nexpy/gui/scripteditor.py +0 -0
- {nexpy-2.0.0b8 → nexpy-2.0.1}/src/nexpy/models/bose.py +0 -0
- {nexpy-2.0.0b8 → nexpy-2.0.1}/src/nexpy/models/critexp.py +0 -0
- {nexpy-2.0.0b8 → nexpy-2.0.1}/src/nexpy/models/op.py +0 -0
- {nexpy-2.0.0b8 → nexpy-2.0.1}/src/nexpy/models/pdfdecay.py +0 -0
- {nexpy-2.0.0b8 → nexpy-2.0.1}/src/nexpy/readers/readnpy.py +0 -0
- {nexpy-2.0.0b8 → nexpy-2.0.1}/src/nexpy/readers/readspec.py +0 -0
- {nexpy-2.0.0b8 → nexpy-2.0.1}/src/nexpy/readers/readstack.py +0 -0
- {nexpy-2.0.0b8 → nexpy-2.0.1}/src/nexpy/readers/readtiff.py +0 -0
- {nexpy-2.0.0b8 → nexpy-2.0.1}/src/nexpy/readers/readtxt.py +0 -0
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
pull_request:
|
|
8
|
+
branches:
|
|
9
|
+
- main
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
test:
|
|
13
|
+
runs-on: ${{ matrix.os }}
|
|
14
|
+
strategy:
|
|
15
|
+
fail-fast: false
|
|
16
|
+
matrix:
|
|
17
|
+
# Full Python coverage with PyQt5 and PyQt6 on Linux
|
|
18
|
+
python: ["3.10", "3.11", "3.12", "3.13", "3.14"]
|
|
19
|
+
qt: [pyqt5, pyqt6]
|
|
20
|
+
os: [ubuntu-latest]
|
|
21
|
+
include:
|
|
22
|
+
# Spot-check PySide6 on Linux
|
|
23
|
+
- {python: "3.12", qt: pyside6, os: ubuntu-latest}
|
|
24
|
+
# Spot-check PyQt5 on macOS (Windows has wheel issues)
|
|
25
|
+
- {python: "3.12", qt: pyqt5, os: macos-latest}
|
|
26
|
+
# Spot-check PyQt6 on macOS and Windows
|
|
27
|
+
- {python: "3.12", qt: pyqt6, os: macos-latest}
|
|
28
|
+
- {python: "3.12", qt: pyqt6, os: windows-latest}
|
|
29
|
+
|
|
30
|
+
steps:
|
|
31
|
+
- uses: actions/checkout@v4
|
|
32
|
+
- uses: astral-sh/setup-uv@v5
|
|
33
|
+
|
|
34
|
+
- name: Install Linux display dependencies
|
|
35
|
+
if: runner.os == 'Linux'
|
|
36
|
+
run: sudo apt-get update && sudo apt-get install -y libegl1
|
|
37
|
+
|
|
38
|
+
- name: Run tests
|
|
39
|
+
env:
|
|
40
|
+
QT_QPA_PLATFORM: offscreen
|
|
41
|
+
run: uv run --python ${{ matrix.python }} --extra ${{ matrix.qt }} pytest
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
name: "Sphinx: Render Documentation"
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
push:
|
|
6
|
+
branches:
|
|
7
|
+
- 'docs'
|
|
8
|
+
pull_request:
|
|
9
|
+
branches:
|
|
10
|
+
- 'docs'
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
build:
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
permissions:
|
|
16
|
+
contents: write
|
|
17
|
+
steps:
|
|
18
|
+
- uses: actions/checkout@v6
|
|
19
|
+
- name: Build HTML
|
|
20
|
+
uses: ammaraskar/sphinx-action@master
|
|
21
|
+
- name: Upload artifacts
|
|
22
|
+
uses: actions/upload-artifact@v6
|
|
23
|
+
with:
|
|
24
|
+
name: html-docs
|
|
25
|
+
path: docs/build/html/
|
|
26
|
+
- name: Deploy to GitHub Pages
|
|
27
|
+
uses: peaceiris/actions-gh-pages@v4
|
|
28
|
+
if: ${{github.ref == 'refs/heads/docs'}}
|
|
29
|
+
with:
|
|
30
|
+
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
31
|
+
publish_dir: docs/build/html
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: NeXpy
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.1
|
|
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
|
|
@@ -65,19 +65,19 @@ Project-URL: Issues, https://github.com/nexpy/nexpy/issues
|
|
|
65
65
|
Project-URL: Documentation, https://nexpy.github.io/nexpy
|
|
66
66
|
Project-URL: Changelog, https://github.com/nexpy/nexpy/releases
|
|
67
67
|
Keywords: neutron scattering,x-ray scattering,data analysis,visualization
|
|
68
|
-
Classifier: Development Status ::
|
|
68
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
69
69
|
Classifier: License :: OSI Approved :: BSD License
|
|
70
70
|
Classifier: Intended Audience :: Developers
|
|
71
71
|
Classifier: Intended Audience :: Science/Research
|
|
72
72
|
Classifier: Topic :: Scientific/Engineering
|
|
73
|
+
Classifier: Topic :: Scientific/Engineering :: Visualization
|
|
73
74
|
Classifier: Programming Language :: Python :: 3
|
|
74
75
|
Classifier: Programming Language :: Python :: 3.9
|
|
75
76
|
Classifier: Programming Language :: Python :: 3.10
|
|
76
77
|
Classifier: Programming Language :: Python :: 3.11
|
|
77
78
|
Classifier: Programming Language :: Python :: 3.12
|
|
78
79
|
Classifier: Programming Language :: Python :: 3.13
|
|
79
|
-
Classifier:
|
|
80
|
-
Classifier: Topic :: Scientific/Engineering :: Visualization
|
|
80
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
81
81
|
Requires-Python: >=3.9
|
|
82
82
|
Description-Content-Type: text/markdown
|
|
83
83
|
License-File: COPYING
|
|
@@ -88,7 +88,7 @@ Requires-Dist: ipython
|
|
|
88
88
|
Requires-Dist: lmfit
|
|
89
89
|
Requires-Dist: matplotlib
|
|
90
90
|
Requires-Dist: mplcursors
|
|
91
|
-
Requires-Dist: nexusformat>=2.0.
|
|
91
|
+
Requires-Dist: nexusformat>=2.0.1
|
|
92
92
|
Requires-Dist: numpy
|
|
93
93
|
Requires-Dist: packaging
|
|
94
94
|
Requires-Dist: pillow
|
|
@@ -99,10 +99,18 @@ Requires-Dist: qtpy
|
|
|
99
99
|
Requires-Dist: scipy
|
|
100
100
|
Requires-Dist: importlib_metadata; python_version < "3.10"
|
|
101
101
|
Requires-Dist: importlib_resources; python_version < "3.10"
|
|
102
|
-
Provides-Extra: testing
|
|
103
|
-
Requires-Dist: pytest; extra == "testing"
|
|
104
102
|
Provides-Extra: spec
|
|
105
103
|
Requires-Dist: spec2nexus; extra == "spec"
|
|
104
|
+
Provides-Extra: pyqt5
|
|
105
|
+
Requires-Dist: pyqt5>=5.12; extra == "pyqt5"
|
|
106
|
+
Provides-Extra: pyqt6
|
|
107
|
+
Requires-Dist: pyqt6>=6.2; extra == "pyqt6"
|
|
108
|
+
Provides-Extra: pyside2
|
|
109
|
+
Requires-Dist: pyside2>=5.12; extra == "pyside2"
|
|
110
|
+
Provides-Extra: pyside6
|
|
111
|
+
Requires-Dist: pyside6>=6.2; extra == "pyside6"
|
|
112
|
+
Provides-Extra: qt
|
|
113
|
+
Requires-Dist: nexpy[pyqt5]; extra == "qt"
|
|
106
114
|
Dynamic: license-file
|
|
107
115
|
|
|
108
116
|
Introduction
|
|
@@ -117,24 +125,65 @@ See the [NeXpy documentation](http://nexpy.github.io/nexpy) for more details.
|
|
|
117
125
|
|
|
118
126
|
Installing and Running
|
|
119
127
|
======================
|
|
120
|
-
Released versions of NeXpy can be installed using
|
|
128
|
+
Released versions of NeXpy can be installed into an existing environment using
|
|
121
129
|
|
|
122
130
|
```
|
|
123
131
|
$ pip install nexpy
|
|
124
132
|
```
|
|
125
133
|
|
|
126
|
-
or
|
|
134
|
+
or
|
|
127
135
|
|
|
128
136
|
```
|
|
129
137
|
$ conda install -c conda-forge nexpy
|
|
130
138
|
```
|
|
131
139
|
|
|
140
|
+
NeXpy will only run if a PyQt library (PyQt5, PyQt6, PySide2 or PySide6) is
|
|
141
|
+
also installed. With *pip* (but not *conda*), a Qt binding can also be
|
|
142
|
+
installed as an optional extra package
|
|
143
|
+
|
|
144
|
+
```
|
|
145
|
+
$ pip install nexpy[qt]
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
The `[qt]` extra installs PyQt5 as the Qt binding. If you prefer a different
|
|
149
|
+
binding, you can use `[pyqt6]`, `[pyside2]`, or `[pyside6]` instead.
|
|
150
|
+
|
|
151
|
+
NeXpy can be installed in an isolated environment using
|
|
152
|
+
|
|
153
|
+
```
|
|
154
|
+
$ uv tool install nexpy[qt]
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
or
|
|
158
|
+
|
|
159
|
+
```
|
|
160
|
+
$ pipx install nexpy[qt]
|
|
161
|
+
```
|
|
162
|
+
|
|
132
163
|
The source code can be downloaded from the NeXpy Git repository:
|
|
133
164
|
|
|
134
165
|
```
|
|
135
166
|
$ git clone https://github.com/nexpy/nexpy.git
|
|
136
167
|
```
|
|
137
168
|
|
|
169
|
+
Once installed, NeXpy can be run from the command line:
|
|
170
|
+
|
|
171
|
+
```
|
|
172
|
+
$ nexpy -h
|
|
173
|
+
usage: nexpy [-h] [-v] [-r] [-f] [filenames ...]
|
|
174
|
+
|
|
175
|
+
Launch NeXpy
|
|
176
|
+
|
|
177
|
+
positional arguments:
|
|
178
|
+
filenames NeXus file(s) to open on launch (optional)
|
|
179
|
+
|
|
180
|
+
options:
|
|
181
|
+
-h, --help show this help message and exit
|
|
182
|
+
-v, --version show program's version number and exit
|
|
183
|
+
-r, --restore open files from previous session
|
|
184
|
+
-f, --faulthandler enable faulthandler for system crashes
|
|
185
|
+
```
|
|
186
|
+
|
|
138
187
|
Prerequisites
|
|
139
188
|
=============
|
|
140
189
|
Python Command-Line API
|
|
@@ -161,9 +210,10 @@ open file is available if [IPython](https://ipython.org/) is installed.
|
|
|
161
210
|
|
|
162
211
|
NeXpy GUI
|
|
163
212
|
---------
|
|
164
|
-
The GUI is built using
|
|
165
|
-
[qtpy package](https://github.com/spyder-ide/qtpy) is used to import whatever
|
|
166
|
-
|
|
213
|
+
The GUI is built using Qt. The
|
|
214
|
+
[qtpy package](https://github.com/spyder-ide/qtpy) is used to import whatever
|
|
215
|
+
Qt binding is installed. One of PyQt5, PyQt6, PySide2, or PySide6 must be
|
|
216
|
+
installed separately (see installation instructions above).
|
|
167
217
|
|
|
168
218
|
The GUI embeds an [IPython shell](http://ipython.org/) and
|
|
169
219
|
[Matplotlib plotting pane](http://matplotlib.sourceforge.net), within a Qt
|
|
@@ -10,24 +10,65 @@ See the [NeXpy documentation](http://nexpy.github.io/nexpy) for more details.
|
|
|
10
10
|
|
|
11
11
|
Installing and Running
|
|
12
12
|
======================
|
|
13
|
-
Released versions of NeXpy can be installed using
|
|
13
|
+
Released versions of NeXpy can be installed into an existing environment using
|
|
14
14
|
|
|
15
15
|
```
|
|
16
16
|
$ pip install nexpy
|
|
17
17
|
```
|
|
18
18
|
|
|
19
|
-
or
|
|
19
|
+
or
|
|
20
20
|
|
|
21
21
|
```
|
|
22
22
|
$ conda install -c conda-forge nexpy
|
|
23
23
|
```
|
|
24
24
|
|
|
25
|
+
NeXpy will only run if a PyQt library (PyQt5, PyQt6, PySide2 or PySide6) is
|
|
26
|
+
also installed. With *pip* (but not *conda*), a Qt binding can also be
|
|
27
|
+
installed as an optional extra package
|
|
28
|
+
|
|
29
|
+
```
|
|
30
|
+
$ pip install nexpy[qt]
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
The `[qt]` extra installs PyQt5 as the Qt binding. If you prefer a different
|
|
34
|
+
binding, you can use `[pyqt6]`, `[pyside2]`, or `[pyside6]` instead.
|
|
35
|
+
|
|
36
|
+
NeXpy can be installed in an isolated environment using
|
|
37
|
+
|
|
38
|
+
```
|
|
39
|
+
$ uv tool install nexpy[qt]
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
or
|
|
43
|
+
|
|
44
|
+
```
|
|
45
|
+
$ pipx install nexpy[qt]
|
|
46
|
+
```
|
|
47
|
+
|
|
25
48
|
The source code can be downloaded from the NeXpy Git repository:
|
|
26
49
|
|
|
27
50
|
```
|
|
28
51
|
$ git clone https://github.com/nexpy/nexpy.git
|
|
29
52
|
```
|
|
30
53
|
|
|
54
|
+
Once installed, NeXpy can be run from the command line:
|
|
55
|
+
|
|
56
|
+
```
|
|
57
|
+
$ nexpy -h
|
|
58
|
+
usage: nexpy [-h] [-v] [-r] [-f] [filenames ...]
|
|
59
|
+
|
|
60
|
+
Launch NeXpy
|
|
61
|
+
|
|
62
|
+
positional arguments:
|
|
63
|
+
filenames NeXus file(s) to open on launch (optional)
|
|
64
|
+
|
|
65
|
+
options:
|
|
66
|
+
-h, --help show this help message and exit
|
|
67
|
+
-v, --version show program's version number and exit
|
|
68
|
+
-r, --restore open files from previous session
|
|
69
|
+
-f, --faulthandler enable faulthandler for system crashes
|
|
70
|
+
```
|
|
71
|
+
|
|
31
72
|
Prerequisites
|
|
32
73
|
=============
|
|
33
74
|
Python Command-Line API
|
|
@@ -54,9 +95,10 @@ open file is available if [IPython](https://ipython.org/) is installed.
|
|
|
54
95
|
|
|
55
96
|
NeXpy GUI
|
|
56
97
|
---------
|
|
57
|
-
The GUI is built using
|
|
58
|
-
[qtpy package](https://github.com/spyder-ide/qtpy) is used to import whatever
|
|
59
|
-
|
|
98
|
+
The GUI is built using Qt. The
|
|
99
|
+
[qtpy package](https://github.com/spyder-ide/qtpy) is used to import whatever
|
|
100
|
+
Qt binding is installed. One of PyQt5, PyQt6, PySide2, or PySide6 must be
|
|
101
|
+
installed separately (see installation instructions above).
|
|
60
102
|
|
|
61
103
|
The GUI embeds an [IPython shell](http://ipython.org/) and
|
|
62
104
|
[Matplotlib plotting pane](http://matplotlib.sourceforge.net), within a Qt
|
nexpy-2.0.1/README.rst
ADDED
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
Installation
|
|
2
|
+
============
|
|
3
|
+
Released versions of NeXpy are available on `PyPI
|
|
4
|
+
<https://pypi.python.org/pypi/NeXpy/>`__ and `conda-forge
|
|
5
|
+
<https://anaconda.org/conda-forge/nexpy>`__.
|
|
6
|
+
|
|
7
|
+
NeXpy can be installed into an existing environment using 'pip'::
|
|
8
|
+
|
|
9
|
+
$ pip install nexpy
|
|
10
|
+
|
|
11
|
+
or 'conda'::
|
|
12
|
+
|
|
13
|
+
$ conda install -c conda-forge nexpy
|
|
14
|
+
|
|
15
|
+
.. note:: You can add conda-forge to your default channels so that it is
|
|
16
|
+
automatically searched when installing. Just type
|
|
17
|
+
``conda config --add channels conda-forge``.
|
|
18
|
+
|
|
19
|
+
NeXpy will only run if a PyQt library (PyQt5, PyQt6, PySide2 or PySide6) is
|
|
20
|
+
also installed. With 'pip' (but not 'conda'), a Qt binding can also be
|
|
21
|
+
installed as an optional extra package::
|
|
22
|
+
|
|
23
|
+
$ pip install nexpy[qt]
|
|
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.
|
|
27
|
+
|
|
28
|
+
NeXpy can be installed in an isolated environment using `uv
|
|
29
|
+
<https://docs.astral.sh/uv/>`__::
|
|
30
|
+
|
|
31
|
+
$ uv tool install nexpy[qt]
|
|
32
|
+
|
|
33
|
+
or `pipx <https://pipx.pypa.io/>`__::
|
|
34
|
+
|
|
35
|
+
$ pipx install nexpy[qt]
|
|
36
|
+
|
|
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
|
|
42
|
+
<https://github.com/nexpy/nexpy>`__::
|
|
43
|
+
|
|
44
|
+
$ git clone https://github.com/nexpy/nexpy.git
|
|
45
|
+
|
|
46
|
+
Then use standard Python tools to build and/or install a distribution
|
|
47
|
+
from within the source directory::
|
|
48
|
+
|
|
49
|
+
$ python -m build # build a distribution
|
|
50
|
+
$ python -m pip install . # install the package
|
|
51
|
+
|
|
52
|
+
The Python API for reading and writing NeXus files is in a separate
|
|
53
|
+
package, `nexusformat <https://github.com/nexpy/nexusformat>`__, which
|
|
54
|
+
is also available on `PyPI <https://pypi.python.org/pypi/nexusformat>`__
|
|
55
|
+
and `conda-forge <https://anaconda.org/conda-forge/nexusformat>`__.
|
|
56
|
+
|
|
57
|
+
If the NeXpy GUI is not required, the package may be used in any Python
|
|
58
|
+
shell. It may be installed using::
|
|
59
|
+
|
|
60
|
+
$ pip install nexusformat
|
|
61
|
+
|
|
62
|
+
or::
|
|
63
|
+
|
|
64
|
+
$ conda install -c conda-forge nexusformat
|
|
65
|
+
|
|
66
|
+
The package can also be installed from the source code either by
|
|
67
|
+
downloading one of the `Github releases
|
|
68
|
+
<https://github.com/nexpy/nexusformat/releases>`__ or by cloning the
|
|
69
|
+
latest development version in the `NeXpy Git repository
|
|
70
|
+
<https://github.com/nexpy/nexusformat>`__::
|
|
71
|
+
|
|
72
|
+
$ git clone https://github.com/nexpy/nexusformat.git
|
|
73
|
+
|
|
74
|
+
Required Libraries
|
|
75
|
+
==================
|
|
76
|
+
Python Command-Line API
|
|
77
|
+
-----------------------
|
|
78
|
+
NeXpy provides a GUI interface to the `nexusformat API
|
|
79
|
+
<https://github.com/nexpy/nexusformat>`__, which uses `h5py
|
|
80
|
+
<http://h5py.org>`__ to read and write HDF5 files that implement the
|
|
81
|
+
`NeXus data format standard <https://www.nexusformat.org>`__. It does
|
|
82
|
+
not use the NeXus C API, which means that the current version cannot
|
|
83
|
+
read and write legacy HDF4 or XML NeXus files. One of the `NeXus
|
|
84
|
+
conversion utilities <https://manual.nexusformat.org/utilities.html>`__
|
|
85
|
+
should be used to convert such files to HDF5.
|
|
86
|
+
|
|
87
|
+
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.
|
|
92
|
+
|
|
93
|
+
================= =================================================
|
|
94
|
+
Library URL
|
|
95
|
+
================= =================================================
|
|
96
|
+
nexusformat https://github.com/nexpy/nexusformat/
|
|
97
|
+
h5py https://www.h5py.org
|
|
98
|
+
numpy https://numpy.org/
|
|
99
|
+
scipy https://scipy.org/
|
|
100
|
+
packaging https://packaging.pypa.io/
|
|
101
|
+
dateutil https://dateutil.readthedocs.io/
|
|
102
|
+
colored https://dslackw.gitlab.io/colored/
|
|
103
|
+
pygments https://pygments.org/
|
|
104
|
+
================= =================================================
|
|
105
|
+
|
|
106
|
+
NeXpy GUI
|
|
107
|
+
---------
|
|
108
|
+
The GUI is built using the PyQt. The `qtpy package
|
|
109
|
+
<https://github.com/spyder-ide/qtpy>`__ is used to import whatever PyQt
|
|
110
|
+
library is installed, whether PyQt5, PyQt6, PySide2, or PySide6.
|
|
111
|
+
|
|
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.
|
|
115
|
+
|
|
116
|
+
Least-squares fitting of 1D data uses the `LMFIT package
|
|
117
|
+
<https://lmfit.github.io/lmfit-py/>`__.
|
|
118
|
+
|
|
119
|
+
================= =================================================
|
|
120
|
+
Library URL
|
|
121
|
+
================= =================================================
|
|
122
|
+
IPython https://ipython.org/
|
|
123
|
+
qtconsole https://qtconsole.readthedocs.io/
|
|
124
|
+
qtpy https://github.com/spyder-ide/qtpy
|
|
125
|
+
matplotlib https://matplotlib.org/
|
|
126
|
+
lmfit https://lmfit.github.io/lmfit-py/
|
|
127
|
+
fabio https://github.com/silx-kit/fabio
|
|
128
|
+
pillow https://pillow.readthedocs.io/
|
|
129
|
+
pylatexenc https://pylatexenc.readthedocs.io/
|
|
130
|
+
ansi2html https://pypi.python.org/pypi/ansi2html/
|
|
131
|
+
mplcursors https://mplcursors.readthedocs.io/
|
|
132
|
+
================= =================================================
|
|
133
|
+
|
|
134
|
+
Additional Packages
|
|
135
|
+
-------------------
|
|
136
|
+
Importers may require additional libraries to read the imported files in
|
|
137
|
+
their native format, *e.g.*, `spec2nexus
|
|
138
|
+
<http://spec2nexus.readthedocs.org/>`__ for reading SPEC files.
|
|
139
|
+
|
|
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``.
|
|
145
|
+
|
|
146
|
+
================= =================================================
|
|
147
|
+
Library URL
|
|
148
|
+
================= =================================================
|
|
149
|
+
spec2nexus http://spec2nexus.readthedocs.org/
|
|
150
|
+
astropy http://www.astropy.org/
|
|
151
|
+
================= =================================================
|
|
152
|
+
|
|
153
|
+
.. note:: NeXpy should still run without these additional packages, but
|
|
154
|
+
invoking the relevant menu items may trigger a warning.
|
|
155
|
+
|
|
156
|
+
Running the GUI
|
|
157
|
+
---------------
|
|
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::
|
|
161
|
+
|
|
162
|
+
$ nexpy [-r]
|
|
163
|
+
|
|
164
|
+
The -r option restores all files loaded in the previous session.
|
|
165
|
+
|
|
166
|
+
Semantic Versioning
|
|
167
|
+
-------------------
|
|
168
|
+
NeXpy uses `Semantic Versioning <http://semver.org/spec/v2.0.0.html>`__.
|
|
169
|
+
|
|
170
|
+
User Support
|
|
171
|
+
------------
|
|
172
|
+
Consult the `NeXpy documentation <http://nexpy.github.io/nexpy/>`__ for
|
|
173
|
+
details of both the Python command-line API and how to use the NeXpy
|
|
174
|
+
GUI. If you have any general questions concerning the use of NeXpy,
|
|
175
|
+
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
|
|
178
|
+
<https://github.com/nexpy/nexpy/issues>`__, preferably with relevant
|
|
179
|
+
tracebacks.
|
|
180
|
+
|
|
181
|
+
Acknowledgements
|
|
182
|
+
----------------
|
|
183
|
+
The `NeXus format <http://www.nexusformat.org>`__ for neutron, x-ray and
|
|
184
|
+
muon data is developed by an international collaboration under the
|
|
185
|
+
supervision of the `NeXus International Advisory Committee
|
|
186
|
+
<https://www.nexusformat.org/NIAC.html>`__. The Python tree API used in
|
|
187
|
+
NeXpy was originally developed by Paul Kienzle, who also wrote the
|
|
188
|
+
standard Python interface to the NeXus C-API. The original version of
|
|
189
|
+
NeXpy was initially developed by Boyana Norris, Jason Sarich, and Daniel
|
|
190
|
+
Lowell, and Ray Osborn using wxPython, and formed the inspiration for
|
|
191
|
+
the current PyQt version. Validation of NeXus files was developed by
|
|
192
|
+
Kaitlyn Marlor and Justin Wozniak. I am grateful to Tom Schoonjans for
|
|
193
|
+
installing the packages on conda-forge.
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
package:
|
|
2
2
|
name: nexpy
|
|
3
|
-
version: "2.0.
|
|
3
|
+
version: "2.0.1"
|
|
4
4
|
|
|
5
5
|
source:
|
|
6
6
|
git_url: https://github.com/nexpy/nexpy.git
|
|
7
|
-
git_tag: v2.0.
|
|
7
|
+
git_tag: v2.0.1
|
|
8
8
|
|
|
9
9
|
build:
|
|
10
10
|
entry_points:
|
|
@@ -27,7 +27,7 @@ requirements:
|
|
|
27
27
|
- lmfit
|
|
28
28
|
- matplotlib
|
|
29
29
|
- mplcursors
|
|
30
|
-
- nexusformat >= 2.0.
|
|
30
|
+
- nexusformat >= 2.0.1
|
|
31
31
|
- numpy
|
|
32
32
|
- packaging
|
|
33
33
|
- pillow
|
|
@@ -40,12 +40,8 @@ requirements:
|
|
|
40
40
|
test:
|
|
41
41
|
imports:
|
|
42
42
|
- nexpy
|
|
43
|
-
- nexpy.api
|
|
44
|
-
- nexpy.api.frills
|
|
45
|
-
- nexpy.api.frills.models
|
|
46
|
-
- nexpy.definitions
|
|
47
43
|
- nexpy.gui
|
|
48
|
-
- nexpy.
|
|
44
|
+
- nexpy.models
|
|
49
45
|
- nexpy.readers
|
|
50
46
|
|
|
51
47
|
commands:
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Minimal makefile for Sphinx documentation
|
|
2
|
+
#
|
|
3
|
+
|
|
4
|
+
# You can set these variables from the command line, and also
|
|
5
|
+
# from the environment for the first two.
|
|
6
|
+
SPHINXOPTS ?=
|
|
7
|
+
SPHINXBUILD ?= sphinx-build
|
|
8
|
+
SOURCEDIR = source
|
|
9
|
+
BUILDDIR = build
|
|
10
|
+
|
|
11
|
+
# Put it first so that "make" without argument is like "make help".
|
|
12
|
+
help:
|
|
13
|
+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
|
14
|
+
|
|
15
|
+
.PHONY: help Makefile
|
|
16
|
+
|
|
17
|
+
# Catch-all target: route all unknown targets to Sphinx using the new
|
|
18
|
+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
|
|
19
|
+
%: Makefile
|
|
20
|
+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|