NeXpy 1.0.2__tar.gz → 1.0.4__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-1.0.2 → NeXpy-1.0.4}/PKG-INFO +1 -1
- {NeXpy-1.0.2 → NeXpy-1.0.4}/conda-recipe/meta.yaml +4 -4
- {NeXpy-1.0.2 → NeXpy-1.0.4}/doc/source/pythongui.rst +93 -18
- {NeXpy-1.0.2 → NeXpy-1.0.4}/setup.cfg +4 -3
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/NeXpy.egg-info/PKG-INFO +1 -1
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/NeXpy.egg-info/SOURCES.txt +7 -6
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/NeXpy.egg-info/requires.txt +5 -2
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/_version.py +2 -2
- NeXpy-1.0.4/src/nexpy/examples/plugins/README.rst +42 -0
- {NeXpy-1.0.2/src/nexpy/examples/plugins → NeXpy-1.0.4/src/nexpy/examples/plugins/chopper_plugin}/chopper/convert_qe.py +1 -1
- NeXpy-1.0.4/src/nexpy/examples/plugins/chopper_plugin/pyproject.toml +13 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/gui/consoleapp.py +11 -3
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/gui/datadialogs.py +73 -95
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/gui/mainwindow.py +62 -21
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/gui/treeview.py +4 -2
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/gui/utils.py +1 -1
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/gui/widgets.py +15 -6
- NeXpy-1.0.2/src/nexpy/examples/plugins/README.rst +0 -29
- {NeXpy-1.0.2 → NeXpy-1.0.4}/.gitattributes +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/.github/workflows/ci.yml +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/.gitignore +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/COPYING +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/README.md +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/README.rst +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/conda-recipe/bld.bat +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/conda-recipe/build.sh +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/doc/Makefile +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/doc/make.bat +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/doc/source/_static/__ignore__.txt +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/doc/source/conf.py +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/doc/source/examples.rst +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/doc/source/favicon.ico +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/doc/source/images/axis-limits-bar.png +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/doc/source/images/customize-panel.png +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/doc/source/images/limits-panel.png +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/doc/source/images/nexpy-fits.png +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/doc/source/images/nexpy-gui.png +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/doc/source/images/nexpy-logo.png +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/doc/source/images/options-tab.png +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/doc/source/images/projection-panel.png +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/doc/source/images/projection-tab.png +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/doc/source/images/scan-panel.png +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/doc/source/images/signal-tab.png +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/doc/source/images/simple-plot.png +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/doc/source/images/skewed-axis.png +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/doc/source/images/x-tab.png +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/doc/source/images/y-tab.png +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/doc/source/images/z-tab.png +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/doc/source/images/z-toolbar.png +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/doc/source/includeme.rst +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/doc/source/index.rst +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/doc/source/pythonshell.rst +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/doc/source/readers.rst +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/doc/source/treeapi.rst +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/pyproject.toml +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/setup.py +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/NeXpy.egg-info/dependency_links.txt +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/NeXpy.egg-info/entry_points.txt +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/NeXpy.egg-info/pbr.json +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/NeXpy.egg-info/top_level.txt +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/__init__.py +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/api/__init__.py +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/api/frills/__init__.py +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/api/frills/fit.py +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/api/frills/functions/__init__.py +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/api/frills/models/__init__.py +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/api/frills/models/bose.py +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/api/frills/models/critexp.py +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/api/frills/models/op.py +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/api/frills/models/pdfdecay.py +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/definitions/__init__.py +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/definitions/applications/NXarchive.nxdl.xml +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/definitions/applications/NXarpes.nxdl.xml +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/definitions/applications/NXcanSAS.nxdl.xml +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/definitions/applications/NXdirecttof.nxdl.xml +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/definitions/applications/NXfluo.nxdl.xml +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/definitions/applications/NXindirecttof.nxdl.xml +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/definitions/applications/NXiqproc.nxdl.xml +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/definitions/applications/NXlauetof.nxdl.xml +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/definitions/applications/NXmonopd.nxdl.xml +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/definitions/applications/NXmx.nxdl.xml +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/definitions/applications/NXrefscan.nxdl.xml +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/definitions/applications/NXreftof.nxdl.xml +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/definitions/applications/NXsas.nxdl.xml +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/definitions/applications/NXsastof.nxdl.xml +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/definitions/applications/NXscan.nxdl.xml +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/definitions/applications/NXspe.nxdl.xml +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/definitions/applications/NXsqom.nxdl.xml +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/definitions/applications/NXstxm.nxdl.xml +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/definitions/applications/NXtas.nxdl.xml +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/definitions/applications/NXtofnpd.nxdl.xml +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/definitions/applications/NXtofraw.nxdl.xml +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/definitions/applications/NXtofsingle.nxdl.xml +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/definitions/applications/NXtomo.nxdl.xml +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/definitions/applications/NXtomophase.nxdl.xml +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/definitions/applications/NXtomoproc.nxdl.xml +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/definitions/applications/NXxas.nxdl.xml +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/definitions/applications/NXxasproc.nxdl.xml +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/definitions/applications/NXxbase.nxdl.xml +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/definitions/applications/NXxeuler.nxdl.xml +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/definitions/applications/NXxkappa.nxdl.xml +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/definitions/applications/NXxlaue.nxdl.xml +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/definitions/applications/NXxlaueplate.nxdl.xml +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/definitions/applications/NXxnb.nxdl.xml +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/definitions/applications/NXxrot.nxdl.xml +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/definitions/applications/nxdlformat.xsl +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/definitions/base_classes/NXaperture.nxdl.xml +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/definitions/base_classes/NXattenuator.nxdl.xml +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/definitions/base_classes/NXbeam.nxdl.xml +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/definitions/base_classes/NXbeam_stop.nxdl.xml +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/definitions/base_classes/NXbending_magnet.nxdl.xml +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/definitions/base_classes/NXcapillary.nxdl.xml +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/definitions/base_classes/NXcite.nxdl.xml +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/definitions/base_classes/NXcollection.nxdl.xml +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/definitions/base_classes/NXcollimator.nxdl.xml +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/definitions/base_classes/NXcrystal.nxdl.xml +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/definitions/base_classes/NXcylindrical_geometry.nxdl.xml +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/definitions/base_classes/NXdata.nxdl.xml +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/definitions/base_classes/NXdetector.nxdl.xml +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/definitions/base_classes/NXdetector_group.nxdl.xml +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/definitions/base_classes/NXdetector_module.nxdl.xml +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/definitions/base_classes/NXdisk_chopper.nxdl.xml +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/definitions/base_classes/NXentry.nxdl.xml +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/definitions/base_classes/NXenvironment.nxdl.xml +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/definitions/base_classes/NXevent_data.nxdl.xml +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/definitions/base_classes/NXfermi_chopper.nxdl.xml +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/definitions/base_classes/NXfilter.nxdl.xml +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/definitions/base_classes/NXflipper.nxdl.xml +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/definitions/base_classes/NXfresnel_zone_plate.nxdl.xml +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/definitions/base_classes/NXgeometry.nxdl.xml +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/definitions/base_classes/NXgrating.nxdl.xml +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/definitions/base_classes/NXguide.nxdl.xml +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/definitions/base_classes/NXinsertion_device.nxdl.xml +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/definitions/base_classes/NXinstrument.nxdl.xml +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/definitions/base_classes/NXlog.nxdl.xml +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/definitions/base_classes/NXmirror.nxdl.xml +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/definitions/base_classes/NXmoderator.nxdl.xml +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/definitions/base_classes/NXmonitor.nxdl.xml +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/definitions/base_classes/NXmonochromator.nxdl.xml +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/definitions/base_classes/NXnote.nxdl.xml +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/definitions/base_classes/NXobject.nxdl.xml +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/definitions/base_classes/NXoff_geometry.nxdl.xml +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/definitions/base_classes/NXorientation.nxdl.xml +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/definitions/base_classes/NXparameters.nxdl.xml +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/definitions/base_classes/NXpdb.nxdl.xml +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/definitions/base_classes/NXpinhole.nxdl.xml +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/definitions/base_classes/NXpolarizer.nxdl.xml +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/definitions/base_classes/NXpositioner.nxdl.xml +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/definitions/base_classes/NXprocess.nxdl.xml +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/definitions/base_classes/NXreflections.nxdl.xml +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/definitions/base_classes/NXroot.nxdl.xml +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/definitions/base_classes/NXsample.nxdl.xml +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/definitions/base_classes/NXsample_component.nxdl.xml +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/definitions/base_classes/NXsensor.nxdl.xml +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/definitions/base_classes/NXshape.nxdl.xml +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/definitions/base_classes/NXslit.nxdl.xml +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/definitions/base_classes/NXsource.nxdl.xml +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/definitions/base_classes/NXsubentry.nxdl.xml +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/definitions/base_classes/NXtransformations.nxdl.xml +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/definitions/base_classes/NXtranslation.nxdl.xml +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/definitions/base_classes/NXuser.nxdl.xml +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/definitions/base_classes/NXvelocity_selector.nxdl.xml +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/definitions/base_classes/NXxraylens.nxdl.xml +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/definitions/base_classes/nxdlformat.xsl +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/definitions/contributed_definitions/NXcontainer.nxdl.xml +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/definitions/contributed_definitions/NXcsg.nxdl.xml +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/definitions/contributed_definitions/NXcxi_ptycho.nxdl.xml +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/definitions/contributed_definitions/NXelectrostatic_kicker.nxdl.xml +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/definitions/contributed_definitions/NXmagnetic_kicker.nxdl.xml +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/definitions/contributed_definitions/NXquadric.nxdl.xml +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/definitions/contributed_definitions/NXquadrupole_magnet.nxdl.xml +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/definitions/contributed_definitions/NXseparator.nxdl.xml +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/definitions/contributed_definitions/NXsnsevent.nxdl.xml +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/definitions/contributed_definitions/NXsnshisto.nxdl.xml +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/definitions/contributed_definitions/NXsolenoid_magnet.nxdl.xml +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/definitions/contributed_definitions/NXsolid_geometry.nxdl.xml +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/definitions/contributed_definitions/NXspecdata.nxdl.xml +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/definitions/contributed_definitions/NXspin_rotator.nxdl.xml +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/definitions/contributed_definitions/nxdlformat.xsl +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/examples/README.rst +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/examples/chopper.nxs +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/examples/example.nxs +0 -0
- {NeXpy-1.0.2/src/nexpy/examples/plugins → NeXpy-1.0.4/src/nexpy/examples/plugins/chopper_plugin}/chopper/__init__.py +0 -0
- {NeXpy-1.0.2/src/nexpy/examples/plugins → NeXpy-1.0.4/src/nexpy/examples/plugins/chopper_plugin}/chopper/__init__.pyc +0 -0
- {NeXpy-1.0.2/src/nexpy/examples/plugins → NeXpy-1.0.4/src/nexpy/examples/plugins/chopper_plugin}/chopper/convert_qe.pyc +0 -0
- {NeXpy-1.0.2/src/nexpy/examples/plugins → NeXpy-1.0.4/src/nexpy/examples/plugins/chopper_plugin}/chopper/get_ei.py +0 -0
- {NeXpy-1.0.2/src/nexpy/examples/plugins → NeXpy-1.0.4/src/nexpy/examples/plugins/chopper_plugin}/chopper/get_ei.pyc +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/examples/scripts/README.rst +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/examples/scripts/chopper_plot.py +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/examples/scripts/example.py +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/gui/__init__.py +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/gui/fitdialogs.py +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/gui/importdialog.py +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/gui/plotview.py +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/gui/pyqt.py +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/gui/resources/back.png +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/gui/resources/backward-icon.png +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/gui/resources/customize.png +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/gui/resources/equal.png +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/gui/resources/export-data.png +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/gui/resources/export-figure.png +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/gui/resources/filesave.png +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/gui/resources/forward-icon.png +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/gui/resources/forward.png +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/gui/resources/hand.png +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/gui/resources/home.png +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/gui/resources/icon/NeXpy.png +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/gui/resources/icon/NeXpy.svg +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/gui/resources/link-icon.png +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/gui/resources/lock-icon.png +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/gui/resources/lock-red-icon.png +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/gui/resources/move.png +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/gui/resources/pause-icon.png +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/gui/resources/refresh-icon.png +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/gui/resources/subplots.png +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/gui/resources/unlock-icon.png +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/gui/resources/unlock-red-icon.png +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/gui/resources/zoom_to_rect.png +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/gui/scripteditor.py +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/nexpygui.py +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/plugins/__init__.py +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/readers/__init__.py +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/readers/readspec.py +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/readers/readstack.py +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/readers/readtiff.py +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/src/nexpy/readers/readtxt.py +0 -0
- {NeXpy-1.0.2 → NeXpy-1.0.4}/tests/test_imports.py +0 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
package:
|
|
2
2
|
name: nexpy
|
|
3
|
-
version: "1.0.
|
|
3
|
+
version: "1.0.4"
|
|
4
4
|
|
|
5
5
|
source:
|
|
6
6
|
git_url: https://github.com/nexpy/nexpy.git
|
|
7
|
-
git_tag: v1.0.
|
|
7
|
+
git_tag: v1.0.4
|
|
8
8
|
|
|
9
9
|
build:
|
|
10
10
|
entry_points:
|
|
@@ -20,13 +20,13 @@ requirements:
|
|
|
20
20
|
|
|
21
21
|
run:
|
|
22
22
|
- python >=3.7
|
|
23
|
-
- nexusformat >=1.0.
|
|
23
|
+
- nexusformat >=1.0.2
|
|
24
24
|
- numpy
|
|
25
25
|
- scipy
|
|
26
26
|
- h5py
|
|
27
27
|
- qtpy
|
|
28
28
|
- ipython
|
|
29
|
-
- qtconsole
|
|
29
|
+
- qtconsole >= 5.4.3
|
|
30
30
|
- ipykernel >=6.15.2
|
|
31
31
|
- matplotlib
|
|
32
32
|
- lmfit >=1.0.3
|
|
@@ -216,6 +216,10 @@ File Menu
|
|
|
216
216
|
.. note:: If a plugin of the same name exists in both directories, the
|
|
217
217
|
user's plugin is loaded.
|
|
218
218
|
|
|
219
|
+
.. note:: With NeXpy v1.0.3, plugins can also be loaded directly from
|
|
220
|
+
external packages, in which the plugin modules are declared
|
|
221
|
+
using the ``nexpy.readers`` entry point.
|
|
222
|
+
|
|
219
223
|
.. seealso:: `NeXpy Plugins`_
|
|
220
224
|
|
|
221
225
|
**Remove Plugin**
|
|
@@ -1225,21 +1229,94 @@ Here is an example of an import dialog::
|
|
|
1225
1229
|
NeXpy Plugins
|
|
1226
1230
|
-------------
|
|
1227
1231
|
It is possible to customize NeXpy by adding new menus to the main menu bar
|
|
1228
|
-
with sub-menus that open
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1232
|
+
with sub-menus that open GUI dialogs or perform operations that are
|
|
1233
|
+
specific to a specialized application.
|
|
1234
|
+
|
|
1235
|
+
Installing Plugins
|
|
1236
|
+
^^^^^^^^^^^^^^^^^^
|
|
1237
|
+
NeXpy searches for plugin modules in two ways.
|
|
1238
|
+
|
|
1239
|
+
1. The plugin code can be installed using the ``Install Plugin...`` dialog
|
|
1240
|
+
either locally in the user's ``~/.nexpy/plugins``directory or in the
|
|
1241
|
+
``nexpy.plugins`` directory within the installed NeXpy distribution.
|
|
1242
|
+
|
|
1243
|
+
2. The plugin code can be contained within an external installed package,
|
|
1244
|
+
which declares an entry point labelled ``nexpy.plugins``. An example
|
|
1245
|
+
package, that is installable using ``pip install .`` is available in
|
|
1246
|
+
the NeXpy package examples directory.
|
|
1247
|
+
|
|
1248
|
+
.. note:: The second method was introduced in NeXpy v1.0.3. It is
|
|
1249
|
+
recommended for new plugins.
|
|
1250
|
+
|
|
1251
|
+
Plugins are loaded from the users' directory, the NeXpy distribution's
|
|
1252
|
+
plugin directory, and external package entry points, *in that order*,
|
|
1253
|
+
for backward compatibility with existing installations. Duplicate
|
|
1254
|
+
plugins will not be loaded, but a warning will be added to the NeXpy log
|
|
1255
|
+
file. If a previously installed plugin is now available in an external
|
|
1256
|
+
package, please remove the prior installation using the
|
|
1257
|
+
``Remove Plugin...`` dialog.
|
|
1258
|
+
|
|
1259
|
+
Defining Plugins
|
|
1260
|
+
^^^^^^^^^^^^^^^^
|
|
1261
|
+
The modules that are accessed through the plugin menu should be defined
|
|
1262
|
+
as a Python package, *i.e.*, by creating a sub-directory that contains
|
|
1263
|
+
``__init__.py``. This must contain a function, ``plugin_menu``, which returns
|
|
1264
|
+
the name to be added to the top-level NeXpy menu bar, and a list of tuples,
|
|
1265
|
+
each of which contains the sub-menu name and the corresponding function
|
|
1266
|
+
triggered by clicking on it.
|
|
1267
|
+
|
|
1268
|
+
There is an example package, ``chopper_plugin``, in the ``nexpy.examples``
|
|
1269
|
+
directory, to show how plugins should be configured. It adds a top-level
|
|
1270
|
+
menu item, ``Chopper``, that has a couple of sub-menu items to perform
|
|
1271
|
+
data analysis on the example file, ``chopper.nxs``, which is also
|
|
1272
|
+
distributed with NeXpy.
|
|
1273
|
+
|
|
1274
|
+
Here is the structure of the ``chopper_plugin`` package::
|
|
1275
|
+
|
|
1276
|
+
chopper_plugin:
|
|
1277
|
+
└── pyproject.toml
|
|
1278
|
+
└── chopper
|
|
1279
|
+
├── __init.py__
|
|
1280
|
+
├── convert_qe.py
|
|
1281
|
+
└── get_ei.py
|
|
1282
|
+
|
|
1283
|
+
.. note:: If the plugin is to be installed using the ``Install Plugin...``
|
|
1284
|
+
dialog, just select the ``chopper`` sub-directory in the above
|
|
1285
|
+
file tree.
|
|
1286
|
+
|
|
1287
|
+
Here is the ``pyproject.toml`` file::
|
|
1288
|
+
|
|
1289
|
+
[build-system]
|
|
1290
|
+
requires = ["setuptools", "setuptools-scm"]
|
|
1291
|
+
build-backend = "setuptools.build_meta"
|
|
1292
|
+
|
|
1293
|
+
[project]
|
|
1294
|
+
name = "chopper_plugin"
|
|
1295
|
+
version = "1.0.0"
|
|
1296
|
+
dependencies = [
|
|
1297
|
+
"nexpy"
|
|
1298
|
+
]
|
|
1299
|
+
|
|
1300
|
+
[project.entry-points."nexpy.plugins"]
|
|
1301
|
+
chopper = "chopper:plugin_menu"
|
|
1302
|
+
|
|
1303
|
+
This is sufficient to install the plugin using ``pip`` and make it
|
|
1304
|
+
discoverable by NeXpy through ``nexpy.plugins`` entry point. If the
|
|
1305
|
+
plugin is embedded within a larger package, adjust the entry point so
|
|
1306
|
+
that it points to the sub-directory containing the ``__init__.py`` file
|
|
1307
|
+
that defines the ``plugin_menu`` function. For example, if the plugin
|
|
1308
|
+
modules are contained within the ``plugins`` sub-directory of
|
|
1309
|
+
``mypackage``, add the following entry point::
|
|
1310
|
+
|
|
1311
|
+
[project.entry-points."nexpy.plugins"]
|
|
1312
|
+
plugin_name = "mypackage.plugins.plugin_name:plugin_menu"
|
|
1313
|
+
|
|
1314
|
+
.. seealso:: Information on defining entry points in external packages
|
|
1315
|
+
that do not use a ``pyproject.toml`` file is available in
|
|
1316
|
+
the `Setup Tools documentation
|
|
1317
|
+
<https://setuptools.pypa.io/en/latest/userguide/entry_point.html>`_.
|
|
1318
|
+
|
|
1319
|
+
Here is the ``__init__.py`` file, which defines the ``plugin_menu`` function::
|
|
1243
1320
|
|
|
1244
1321
|
from . import get_ei, convert_qe
|
|
1245
1322
|
|
|
@@ -1271,9 +1348,7 @@ a grid defines a set of parameters, functions to read those parameters from
|
|
|
1271
1348
|
the PySide text boxes (here, they are decorated with ``@property``, which
|
|
1272
1349
|
means that the function can be called without an argument), a couple of
|
|
1273
1350
|
buttons to activate different parts of the analysis, and finally the
|
|
1274
|
-
functions themselves
|
|
1275
|
-
|
|
1276
|
-
Here is the code::
|
|
1351
|
+
functions themselves::
|
|
1277
1352
|
|
|
1278
1353
|
import numpy as np
|
|
1279
1354
|
from nexpy.gui.datadialogs import GridParameters, NXDialog
|
|
@@ -29,12 +29,12 @@ package_dir =
|
|
|
29
29
|
=src
|
|
30
30
|
python_requires = >=3.7
|
|
31
31
|
install_requires =
|
|
32
|
-
nexusformat >= 1.0.
|
|
32
|
+
nexusformat >= 1.0.2
|
|
33
33
|
numpy
|
|
34
34
|
scipy
|
|
35
35
|
h5py >= 2.9
|
|
36
36
|
qtpy
|
|
37
|
-
qtconsole
|
|
37
|
+
qtconsole >= 5.4.3
|
|
38
38
|
ipython
|
|
39
39
|
ipykernel >= 6.15.2
|
|
40
40
|
matplotlib
|
|
@@ -43,6 +43,7 @@ install_requires =
|
|
|
43
43
|
ansi2html
|
|
44
44
|
pillow
|
|
45
45
|
mplcursors
|
|
46
|
+
importlib-metadata; python_version<"3.10"
|
|
46
47
|
|
|
47
48
|
[options.packages.find]
|
|
48
49
|
where = src
|
|
@@ -50,7 +51,7 @@ where = src
|
|
|
50
51
|
[options.package_data]
|
|
51
52
|
nexpy.gui = resources/*.*, resources/*/*.*
|
|
52
53
|
nexpy.definitions = */*.xml
|
|
53
|
-
nexpy = examples/*.*, examples/*/*.*, examples
|
|
54
|
+
nexpy = examples/*.*, examples/*/*.*, examples/*/*/*.*, examples/*/*/*/*.*
|
|
54
55
|
|
|
55
56
|
[options.entry_points]
|
|
56
57
|
gui_scripts =
|
|
@@ -171,12 +171,13 @@ src/nexpy/examples/README.rst
|
|
|
171
171
|
src/nexpy/examples/chopper.nxs
|
|
172
172
|
src/nexpy/examples/example.nxs
|
|
173
173
|
src/nexpy/examples/plugins/README.rst
|
|
174
|
-
src/nexpy/examples/plugins/
|
|
175
|
-
src/nexpy/examples/plugins/chopper/__init__.
|
|
176
|
-
src/nexpy/examples/plugins/chopper/
|
|
177
|
-
src/nexpy/examples/plugins/chopper/convert_qe.
|
|
178
|
-
src/nexpy/examples/plugins/chopper/
|
|
179
|
-
src/nexpy/examples/plugins/chopper/get_ei.
|
|
174
|
+
src/nexpy/examples/plugins/chopper_plugin/pyproject.toml
|
|
175
|
+
src/nexpy/examples/plugins/chopper_plugin/chopper/__init__.py
|
|
176
|
+
src/nexpy/examples/plugins/chopper_plugin/chopper/__init__.pyc
|
|
177
|
+
src/nexpy/examples/plugins/chopper_plugin/chopper/convert_qe.py
|
|
178
|
+
src/nexpy/examples/plugins/chopper_plugin/chopper/convert_qe.pyc
|
|
179
|
+
src/nexpy/examples/plugins/chopper_plugin/chopper/get_ei.py
|
|
180
|
+
src/nexpy/examples/plugins/chopper_plugin/chopper/get_ei.pyc
|
|
180
181
|
src/nexpy/examples/scripts/README.rst
|
|
181
182
|
src/nexpy/examples/scripts/chopper_plot.py
|
|
182
183
|
src/nexpy/examples/scripts/example.py
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
nexusformat>=1.0.
|
|
1
|
+
nexusformat>=1.0.2
|
|
2
2
|
numpy
|
|
3
3
|
scipy
|
|
4
4
|
h5py>=2.9
|
|
5
5
|
qtpy
|
|
6
|
-
qtconsole
|
|
6
|
+
qtconsole>=5.4.3
|
|
7
7
|
ipython
|
|
8
8
|
ipykernel>=6.15.2
|
|
9
9
|
matplotlib
|
|
@@ -13,6 +13,9 @@ ansi2html
|
|
|
13
13
|
pillow
|
|
14
14
|
mplcursors
|
|
15
15
|
|
|
16
|
+
[:python_version < "3.10"]
|
|
17
|
+
importlib-metadata
|
|
18
|
+
|
|
16
19
|
[fabio]
|
|
17
20
|
fabio
|
|
18
21
|
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
.. restructured text format
|
|
2
|
+
|
|
3
|
+
------------------------
|
|
4
|
+
About the example plugin
|
|
5
|
+
------------------------
|
|
6
|
+
This contains an example of a package, ``chopper_plugin`` that provides a
|
|
7
|
+
plugin menu to NeXpy. The entire directory can be copied to another location
|
|
8
|
+
to form the template of another plugin, which should be given a unique name.
|
|
9
|
+
|
|
10
|
+
The package has an example ``pyproject.toml`` file, which defines the name
|
|
11
|
+
of the package and an entry point labelled ``nexpy.readers``, which
|
|
12
|
+
allows NeXpy to discover the plugin when the package has been installed,
|
|
13
|
+
using ``python -m pip install .``.
|
|
14
|
+
|
|
15
|
+
Alternatively, the ``chopper`` sub-directory could be installed either
|
|
16
|
+
locally or within the installed NeXpy package using the ``Install Plugin...``
|
|
17
|
+
dialog. However, installing the plugin as an external package with an
|
|
18
|
+
entry point is now the preferred method for making the plugin discoverable.
|
|
19
|
+
|
|
20
|
+
In this example, a menu item, 'Chopper', is added to the top-level NeXpy
|
|
21
|
+
menu, with two sub-menu items designed to operated on ``chopper.nxs``,
|
|
22
|
+
which is included as an example file. When loaded, select the ``chopper``
|
|
23
|
+
root in the NeXpy tree before clicking on either menu item.
|
|
24
|
+
|
|
25
|
+
The requirement for a plugin is that a function ``plugin_menu`` initializes
|
|
26
|
+
the submenu items in the package's ``__init__.py``. These would normally
|
|
27
|
+
initiate dialog boxes that are defined within files in the package, although
|
|
28
|
+
they could also be imported from an external package.
|
|
29
|
+
|
|
30
|
+
**get_ei**
|
|
31
|
+
|
|
32
|
+
A simple GUI to calibrate the incident energy by determining the first moments
|
|
33
|
+
of two monitor peaks and computing the energy from the time difference. The
|
|
34
|
+
NeXus root must be selected and unlocked so that the calibrated energy can
|
|
35
|
+
be saved to the NXmonochromator group.
|
|
36
|
+
|
|
37
|
+
**convert_qe**
|
|
38
|
+
|
|
39
|
+
A simple GUI to convert inelastic neutron scattering data in ``chopper.nxs``
|
|
40
|
+
from angular and time-of-flight coordinates into Q and energy transfer. After
|
|
41
|
+
choosing Q and energy bin sizes, the converted data can be plotted and/or
|
|
42
|
+
saved as a new NXdata group within the NeXus root.
|
|
@@ -45,7 +45,7 @@ class ConvertDialog(NXDialog):
|
|
|
45
45
|
|
|
46
46
|
def read_parameters(self):
|
|
47
47
|
self.L1 = - self.entry['sample/distance']
|
|
48
|
-
self.L2 =
|
|
48
|
+
self.L2 = self.entry['instrument/detector/distance'].average()
|
|
49
49
|
self.m1 = self.entry['monitor1']
|
|
50
50
|
self.t_m1 = self.m1.moment()
|
|
51
51
|
self.d_m1 = self.entry['monitor1/distance']
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools", "setuptools-scm"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "chopper_plugin"
|
|
7
|
+
version = "1.0.0"
|
|
8
|
+
dependencies = [
|
|
9
|
+
"nexpy"
|
|
10
|
+
]
|
|
11
|
+
|
|
12
|
+
[project.entry-points."nexpy.plugins"]
|
|
13
|
+
chopper = "chopper:plugin_menu"
|
|
@@ -174,14 +174,22 @@ class NXConsoleApp(JupyterApp, JupyterConsoleApp):
|
|
|
174
174
|
except ValueError:
|
|
175
175
|
return 0
|
|
176
176
|
backups = self.settings.options('backups')
|
|
177
|
-
|
|
177
|
+
plugins = self.settings.options('plugins')
|
|
178
|
+
total_backups = backups + plugins
|
|
179
|
+
for backup in total_backups:
|
|
178
180
|
if not (os.path.exists(backup) and
|
|
179
181
|
os.path.realpath(backup).startswith(self.backup_dir)):
|
|
180
|
-
|
|
182
|
+
if backup in backups:
|
|
183
|
+
self.settings.remove_option('backups', backup)
|
|
184
|
+
elif backup in plugins:
|
|
185
|
+
self.settings.remove_option('plugins', backup)
|
|
181
186
|
elif backup_age(backup) > 5:
|
|
182
187
|
try:
|
|
183
188
|
shutil.rmtree(os.path.dirname(os.path.realpath(backup)))
|
|
184
|
-
|
|
189
|
+
if backup in backups:
|
|
190
|
+
self.settings.remove_option('backups', backup)
|
|
191
|
+
elif backup in plugins:
|
|
192
|
+
self.settings.remove_option('plugins', backup)
|
|
185
193
|
except OSError:
|
|
186
194
|
pass
|
|
187
195
|
self.settings.save()
|
|
@@ -11,7 +11,7 @@ import numbers
|
|
|
11
11
|
import os
|
|
12
12
|
import shutil
|
|
13
13
|
from operator import attrgetter
|
|
14
|
-
from pathlib import
|
|
14
|
+
from pathlib import Path
|
|
15
15
|
|
|
16
16
|
import matplotlib as mpl
|
|
17
17
|
import numpy as np
|
|
@@ -1341,10 +1341,7 @@ class DirectoryDialog(NXDialog):
|
|
|
1341
1341
|
self.checkbox[f] = NXCheckBox(checked=True)
|
|
1342
1342
|
grid.addWidget(NXLabel(f), i, 0)
|
|
1343
1343
|
grid.addWidget(self.checkbox[f], i, 1)
|
|
1344
|
-
|
|
1345
|
-
scroll_widget.set_layout(grid)
|
|
1346
|
-
scroll_area = NXScrollArea(scroll_widget)
|
|
1347
|
-
self.set_layout(prefix_layout, scroll_area, self.close_layout())
|
|
1344
|
+
self.set_layout(prefix_layout, NXScrollArea(grid), self.close_layout())
|
|
1348
1345
|
self.prefix_box.setFocus()
|
|
1349
1346
|
|
|
1350
1347
|
@property
|
|
@@ -1597,7 +1594,6 @@ class PlotScalarDialog(NXDialog):
|
|
|
1597
1594
|
self.prefix_box = NXLineEdit()
|
|
1598
1595
|
self.prefix_box.textChanged.connect(self.select_prefix)
|
|
1599
1596
|
prefix_layout = self.make_layout(NXLabel('Prefix'), self.prefix_box)
|
|
1600
|
-
self.scroll_area = NXScrollArea()
|
|
1601
1597
|
self.files = GridParameters()
|
|
1602
1598
|
i = 0
|
|
1603
1599
|
for name in sorted(self.tree, key=natural_sort):
|
|
@@ -1611,9 +1607,7 @@ class PlotScalarDialog(NXDialog):
|
|
|
1611
1607
|
self.files[name].checkbox.stateChanged.connect(
|
|
1612
1608
|
self.update_files)
|
|
1613
1609
|
self.file_grid = self.files.grid(header=('File', self.scan_header, ''))
|
|
1614
|
-
self.
|
|
1615
|
-
self.scroll_widget.set_layout(self.make_layout(self.file_grid))
|
|
1616
|
-
self.scroll_area.setWidget(self.scroll_widget)
|
|
1610
|
+
self.scroll_area = NXScrollArea(self.make_layout(self.file_grid))
|
|
1617
1611
|
self.file_box.set_layout(prefix_layout, self.scroll_area,
|
|
1618
1612
|
self.file_box.close_layout())
|
|
1619
1613
|
self.file_box.close_box.accepted.connect(self.choose_files)
|
|
@@ -1621,24 +1615,11 @@ class PlotScalarDialog(NXDialog):
|
|
|
1621
1615
|
|
|
1622
1616
|
def select_prefix(self):
|
|
1623
1617
|
prefix = self.prefix_box.text()
|
|
1624
|
-
self.files
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
if self.data_path in root:
|
|
1630
|
-
i += 1
|
|
1631
|
-
if self.scan_path:
|
|
1632
|
-
self.files.add(name, root[self.scan_path], name, True)
|
|
1633
|
-
else:
|
|
1634
|
-
self.files.add(name, i, name, True)
|
|
1635
|
-
self.files[name].checkbox.stateChanged.connect(
|
|
1636
|
-
self.update_files)
|
|
1637
|
-
self.file_grid = self.files.grid(header=('File', self.scan_header, ''))
|
|
1638
|
-
self.scroll_widget.deleteLater()
|
|
1639
|
-
self.scroll_widget = NXWidget()
|
|
1640
|
-
self.scroll_widget.set_layout(self.make_layout(self.file_grid))
|
|
1641
|
-
self.scroll_area.setWidget(self.scroll_widget)
|
|
1618
|
+
for f in self.files:
|
|
1619
|
+
if f.startswith(prefix):
|
|
1620
|
+
self.files[f].checkbox.setChecked(True)
|
|
1621
|
+
else:
|
|
1622
|
+
self.files[f].checkbox.setChecked(False)
|
|
1642
1623
|
|
|
1643
1624
|
def update_files(self):
|
|
1644
1625
|
if self.scan_variable is None:
|
|
@@ -4458,11 +4439,10 @@ class InstallPluginDialog(NXDialog):
|
|
|
4458
4439
|
self.close_buttons())
|
|
4459
4440
|
self.set_title('Installing Plugin')
|
|
4460
4441
|
|
|
4461
|
-
def
|
|
4442
|
+
def get_menu_info(self, plugin_name, plugin_path):
|
|
4462
4443
|
try:
|
|
4463
4444
|
plugin_module = import_plugin(plugin_name, [plugin_path])
|
|
4464
|
-
|
|
4465
|
-
return name
|
|
4445
|
+
return plugin_module.plugin_menu()
|
|
4466
4446
|
except Exception as error:
|
|
4467
4447
|
report_error("Installing Plugin", error)
|
|
4468
4448
|
|
|
@@ -4470,8 +4450,8 @@ class InstallPluginDialog(NXDialog):
|
|
|
4470
4450
|
plugin_directory = self.get_directory()
|
|
4471
4451
|
plugin_name = os.path.basename(os.path.normpath(plugin_directory))
|
|
4472
4452
|
plugin_path = os.path.dirname(plugin_directory)
|
|
4473
|
-
|
|
4474
|
-
if
|
|
4453
|
+
name, actions = self.get_menu_info(plugin_name, plugin_path)
|
|
4454
|
+
if name is None:
|
|
4475
4455
|
raise NeXusError("This directory does not contain a valid plugin")
|
|
4476
4456
|
if self.radiobutton['local'].isChecked():
|
|
4477
4457
|
plugin_path = self.local_directory
|
|
@@ -4492,9 +4472,9 @@ class InstallPluginDialog(NXDialog):
|
|
|
4492
4472
|
shutil.copytree(plugin_directory, installed_path)
|
|
4493
4473
|
for action in [action for action
|
|
4494
4474
|
in self.mainwindow.menuBar().actions()
|
|
4495
|
-
if action.text() ==
|
|
4475
|
+
if action.text() == name]:
|
|
4496
4476
|
self.mainwindow.menuBar().removeAction(action)
|
|
4497
|
-
self.mainwindow.add_plugin_menu(
|
|
4477
|
+
self.mainwindow.add_plugin_menu(name, actions)
|
|
4498
4478
|
|
|
4499
4479
|
def accept(self):
|
|
4500
4480
|
try:
|
|
@@ -4511,59 +4491,58 @@ class RemovePluginDialog(NXDialog):
|
|
|
4511
4491
|
|
|
4512
4492
|
super().__init__(parent=parent)
|
|
4513
4493
|
|
|
4514
|
-
self.local_directory = self.mainwindow.plugin_dir
|
|
4515
|
-
self.nexpy_directory = pkg_resources.resource_filename('nexpy',
|
|
4516
|
-
|
|
4517
|
-
self.backup_dir = self.mainwindow.backup_dir
|
|
4518
|
-
|
|
4519
|
-
|
|
4494
|
+
self.local_directory = Path(self.mainwindow.plugin_dir)
|
|
4495
|
+
self.nexpy_directory = Path(pkg_resources.resource_filename('nexpy',
|
|
4496
|
+
'plugins'))
|
|
4497
|
+
self.backup_dir = Path(self.mainwindow.backup_dir)
|
|
4498
|
+
|
|
4499
|
+
local_plugins = []
|
|
4500
|
+
for item in self.local_directory.iterdir():
|
|
4501
|
+
if item.is_dir() and not item.name.startswith('_'):
|
|
4502
|
+
local_plugins.append(
|
|
4503
|
+
self.checkboxes((str(item), ' ' + item.name, False),
|
|
4504
|
+
align='left'))
|
|
4505
|
+
nexpy_plugins = []
|
|
4506
|
+
for item in self.nexpy_directory.iterdir():
|
|
4507
|
+
if item.is_dir() and not item.name.startswith('_'):
|
|
4508
|
+
nexpy_plugins.append(
|
|
4509
|
+
self.checkboxes((str(item), ' ' + item.name, False),
|
|
4510
|
+
align='left'))
|
|
4511
|
+
|
|
4512
|
+
if len(local_plugins) == 0 and len(nexpy_plugins) == 0:
|
|
4513
|
+
self.display_message('Removing Plugins', 'No plugins to remove')
|
|
4514
|
+
self.reject()
|
|
4515
|
+
elif len(local_plugins) == 0:
|
|
4516
|
+
self.set_layout(NXLabel("NeXpy Plugins", bold=True),
|
|
4517
|
+
*nexpy_plugins,
|
|
4518
|
+
self.close_buttons())
|
|
4519
|
+
elif len(nexpy_plugins) == 0:
|
|
4520
|
+
self.set_layout(NXLabel("Local Plugins", bold=True),
|
|
4521
|
+
*local_plugins,
|
|
4522
|
+
self.close_buttons())
|
|
4523
|
+
else:
|
|
4524
|
+
self.set_layout(NXLabel("Local Plugins", bold=True),
|
|
4525
|
+
*local_plugins,
|
|
4526
|
+
NXLabel("NeXpy Plugins", bold=True),
|
|
4527
|
+
*nexpy_plugins,
|
|
4528
|
+
self.close_buttons())
|
|
4520
4529
|
|
|
4521
|
-
self.set_layout(self.directorybox('Choose plugin directory'),
|
|
4522
|
-
self.radiobuttons(('local', 'Local plugin', True),
|
|
4523
|
-
('nexpy', 'NeXpy plugin', False)),
|
|
4524
|
-
self.close_buttons())
|
|
4525
4530
|
self.set_title('Removing Plugin')
|
|
4526
|
-
self.radiobutton['local'].clicked.connect(self.set_local_directory)
|
|
4527
|
-
self.radiobutton['nexpy'].clicked.connect(self.set_nexpy_directory)
|
|
4528
|
-
self.set_local_directory()
|
|
4529
|
-
|
|
4530
|
-
def set_local_directory(self):
|
|
4531
|
-
self.set_default_directory(self.local_directory)
|
|
4532
|
-
self.directoryname.setText(self.local_directory)
|
|
4533
|
-
|
|
4534
|
-
def set_nexpy_directory(self):
|
|
4535
|
-
self.set_default_directory(self.nexpy_directory)
|
|
4536
|
-
self.directoryname.setText(self.nexpy_directory)
|
|
4537
|
-
|
|
4538
|
-
def get_menu_name(self, plugin_name, plugin_path):
|
|
4539
|
-
try:
|
|
4540
|
-
plugin_module = import_plugin(plugin_name, [plugin_path])
|
|
4541
|
-
name, _ = plugin_module.plugin_menu()
|
|
4542
|
-
return name
|
|
4543
|
-
except Exception:
|
|
4544
|
-
return None
|
|
4545
4531
|
|
|
4546
4532
|
def remove_plugin(self):
|
|
4547
|
-
|
|
4548
|
-
|
|
4549
|
-
|
|
4550
|
-
|
|
4551
|
-
|
|
4552
|
-
|
|
4553
|
-
|
|
4554
|
-
|
|
4555
|
-
|
|
4556
|
-
|
|
4557
|
-
if self.confirm_action(f"Remove '{plugin_directory}'?",
|
|
4558
|
-
"This cannot be reversed"):
|
|
4559
|
-
backup = os.path.join(self.backup_dir, timestamp())
|
|
4560
|
-
os.mkdir(backup)
|
|
4561
|
-
shutil.move(plugin_directory, backup)
|
|
4562
|
-
self.mainwindow.settings.set('plugins',
|
|
4563
|
-
os.path.join(backup, plugin_name))
|
|
4533
|
+
for plugin_path in self.checkbox:
|
|
4534
|
+
plugin_name = Path(plugin_path).name
|
|
4535
|
+
if self.checkbox[plugin_path].isChecked():
|
|
4536
|
+
if self.confirm_action(f"Remove '{plugin_path}'?",
|
|
4537
|
+
"This cannot be reversed"):
|
|
4538
|
+
backup_path = self.backup_dir / timestamp()
|
|
4539
|
+
backup_path.mkdir()
|
|
4540
|
+
shutil.move(str(plugin_path), str(backup_path))
|
|
4541
|
+
self.mainwindow.settings.set(
|
|
4542
|
+
'plugins', str(backup_path.joinpath(plugin_name)))
|
|
4564
4543
|
self.mainwindow.settings.save()
|
|
4565
4544
|
else:
|
|
4566
|
-
|
|
4545
|
+
continue
|
|
4567
4546
|
for action in [action for action
|
|
4568
4547
|
in self.mainwindow.menuBar().actions()
|
|
4569
4548
|
if action.text().lower() == plugin_name.lower()]:
|
|
@@ -4621,13 +4600,12 @@ class RestorePluginDialog(NXDialog):
|
|
|
4621
4600
|
def get_name(self, plugin):
|
|
4622
4601
|
return os.path.basename(plugin)
|
|
4623
4602
|
|
|
4624
|
-
def
|
|
4603
|
+
def get_menu_info(self, plugin_name, plugin_path):
|
|
4625
4604
|
try:
|
|
4626
4605
|
plugin_module = import_plugin(plugin_name, [plugin_path])
|
|
4627
|
-
|
|
4628
|
-
|
|
4629
|
-
|
|
4630
|
-
return None
|
|
4606
|
+
return plugin_module.plugin_menu()
|
|
4607
|
+
except Exception as error:
|
|
4608
|
+
report_error("Restoring Plugin", error)
|
|
4631
4609
|
|
|
4632
4610
|
def remove_backup(self, backup):
|
|
4633
4611
|
shutil.rmtree(os.path.dirname(os.path.realpath(backup)))
|
|
@@ -4643,8 +4621,8 @@ class RestorePluginDialog(NXDialog):
|
|
|
4643
4621
|
if plugin_name is None:
|
|
4644
4622
|
return
|
|
4645
4623
|
plugin_path = os.path.dirname(plugin_directory)
|
|
4646
|
-
|
|
4647
|
-
if
|
|
4624
|
+
name, actions = self.get_menu_info(plugin_name, plugin_path)
|
|
4625
|
+
if name is None:
|
|
4648
4626
|
raise NeXusError("This directory does not contain a valid plugin")
|
|
4649
4627
|
if self.radiobutton['local'].isChecked():
|
|
4650
4628
|
plugin_path = self.local_directory
|
|
@@ -4654,11 +4632,11 @@ class RestorePluginDialog(NXDialog):
|
|
|
4654
4632
|
if os.path.exists(restored_path):
|
|
4655
4633
|
if self.confirm_action("Overwrite plugin?",
|
|
4656
4634
|
f"Plugin '{plugin_name}' already exists"):
|
|
4657
|
-
|
|
4658
|
-
os.mkdir(
|
|
4659
|
-
shutil.move(restored_path,
|
|
4660
|
-
self.mainwindow.settings.set(
|
|
4661
|
-
|
|
4635
|
+
backup_path = os.path.join(self.backup_dir, timestamp())
|
|
4636
|
+
os.mkdir(backup_path)
|
|
4637
|
+
shutil.move(restored_path, backup_path)
|
|
4638
|
+
self.mainwindow.settings.set(
|
|
4639
|
+
'plugins', os.path.join(backup_path, plugin_name))
|
|
4662
4640
|
self.mainwindow.settings.save()
|
|
4663
4641
|
else:
|
|
4664
4642
|
return
|
|
@@ -4667,8 +4645,8 @@ class RestorePluginDialog(NXDialog):
|
|
|
4667
4645
|
|
|
4668
4646
|
for action in [action for action
|
|
4669
4647
|
in self.mainwindow.menuBar().actions()
|
|
4670
|
-
if action.text() ==
|
|
4648
|
+
if action.text() == name]:
|
|
4671
4649
|
self.mainwindow.menuBar().removeAction(action)
|
|
4672
|
-
self.mainwindow.add_plugin_menu(
|
|
4650
|
+
self.mainwindow.add_plugin_menu(name, actions)
|
|
4673
4651
|
|
|
4674
4652
|
self.accept()
|