Giter VIP home page Giter VIP logo

pat-gardner / nexpy Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nexpy/nexpy

0.0 1.0 0.0 13 MB

NeXpy provides a high-level python interface to NeXus data contained within a simple GUI. It is designed to provide an intuitive interactive toolbox allowing users both to access existing NeXus files and to create new NeXus-conforming data structures without expert knowledge of the file format.

License: Other

Batchfile 0.01% Shell 0.02% Python 95.23% XSLT 4.75%

nexpy's Introduction

Introduction

NeXpy provides a high-level python interface to NeXus data contained within a simple GUI. It is designed to provide an intuitive interactive toolbox allowing users both to access existing NeXus files and to create new NeXus-conforming data structures without expert knowledge of the file format.

See the NeXpy documentation for more details.

Installing and Running

Released versions of NeXpy can be installed using either

    $ pip install nexpy

or

    $ easy_install nexpy 

If you have an Anaconda installation, use::

    $ conda install -c nexpy nexpy

The source code can be downloaded from the NeXpy Git repository:

    $ git clone https://github.com/nexpy/nexpy.git

To install in the standard Python location:

    $ python setup.py install

To install in an alternate location:

    $ python setup.py install --prefix=/path/to/installation/dir

As of v0.6.0, the Python API for reading and writing NeXus files is in a separate package, nexusformat, which is also available on PyPI and will be automatically installed as a NeXpy dependency if you use pip.

If the NeXpy GUI is not required, the package may be used in a regular Python shell. It may be installed using::

    $ pip install nexusformat

or::

    $ easy_install nexusformat 

or::

    $ conda install -c nexpy nexusformat

The package can also be installed from the source code using the setup commands described above. The source code is available either by downloading one of the Github releases or by cloning the latest development version in the NeXpy Git repository::

    $ git clone https://github.com/nexpy/nexusformat.git

Prerequisites

Python Command-Line API

The current version of NeXpy uses h5py to read and write NeXus files because of its ability to handle large data files. There is therefore no dependency on the NeXus C API. This also means that the current version cannot read and write HDF4 or XML NeXus files.

If you only intend to utilize the Python API from the command-line, the only other required library is Numpy.

NeXpy GUI

The GUI is built using the PyQt. The latest version supports PyQt4, PySide, or, with v0.10.0, PyQt5, and should load whichever library it finds. None are listed as a dependency but one or other must be installed. PyQt5 is included in the Anaconda default distribution while PySide is included in the Enthought Python Distribution or within Enthought's Canopy Application.

The GUI includes an IPython shell and a Matplotlib plotting pane. The IPython shell is embedded in the Qt GUI using an implementation based on the newly-released Jupyter QtConsole, which has replaced the old IPython QtConsole.

Some people have reported that NeXpy crashes on launch on some Linux systems. We believe that this may be due to both PyQt4 and PyQt5 being installed, although that doesn't cause a problem on all systems. If NeXpy crashes on launch, please try setting the environment variable QT_API to 'pyqt', for the PyQt4 library, 'pyqt5' for the PyQt5 library, or 'pyside', for the PySide library, depending on what you have installed, e.g., in BASH, type::

    $ export QT_API=pyqt

Additional Packages

Additional functionality is provided by other external Python packages. Least-squares fitting requires Matt Newville's least-squares fitting package, lmfit-py. Importers may also require libraries to read the imported files in their native format, e.g., spec2nexus for reading SPEC files.

From v0.4.3, the log window is colorized if ansi2html is installed.

From v0.9.1, a new 2D smoothing option is available in the list of interpolations in the signal tab if astropy is installed. It is labelled 'convolve' and provides, by default, a 2-pixel Gaussian smoothing of the data. The number of pixels can be changed in the shell by setting plotview.smooth.

The following packages are recommended.

To run with the GUI

To run from the installed location, add the $prefix/bin directory to your path (only if you installed outside the python installation), and then run:

    $ nexpy

User Support

Consult the NeXpy documentation for details of both the Python command-line API and how to use the NeXpy GUI. If you have any general questions concerning the use of NeXpy, please address them to the NeXus Mailing List. If you discover any bugs, please submit a Github issue, preferably with relevant tracebacks.

nexpy's People

Contributors

rayosborn avatar prjemian avatar j-woz avatar tacaswell avatar peterfpeterson avatar jkotan avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.