Skip to main content
spec2nexus
##########

Converts SPEC data files and scans into NeXus HDF5 files

:status: forking from NeXpy *prjPySpec* branch
:author: Pete R. Jemian
:email: prjemian@gmail.com
:copyright: 2014, Pete R. Jemian
:license: Creative Commons Attribution 4.0 International Public License (see *LICENSE.txt*)
:URL: https://github.com/prjemian/spec2nexus
:PyPI: https://pypi.python.org/pypi/spec2nexus/
:documentation: http://prjemian.github.io/spec2nexus

Provides
########

* **spec2nexus** : command-line tool to convert SPEC data files to NeXus HDF5
* **prjPySpec** : python binding to read SPEC [#]_ data files
* **eznx** : (Easy NeXus) supports writing NeXus [#]_ HDF5 [#]_ files using h5py [#]_

.. [#] http://certif.com
.. [#] http://nexusformat.org
.. [#] http://hdfgroup.org
.. [#] http://h5py.org

Installation
############

Released versions of spec2nexus are available on `PyPI
<https://pypi.python.org/pypi/spec2nexus/>`_. If you have the `Python Setup Tools
<https://pypi.python.org/pypi/setuptools>`_ installed, then you can install
using either::

$ pip install spec2nexus

or::

$ easy_install spec2nexus

The latest development versions of spec2nexus can be downloaded from the
GitHub repository listed above::

$ git clone http://github.com/prjemian/spec2nexus.git

To install in the standard Python location::

$ cd spec2nexus
$ python setup.py install

To install in user's home directory::

$ python setup.py install --user

To install in an alternate location::

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

Required Libraries
##################

======== =============================
Library URL
======== =============================
h5py http://www.h5py.org
numpy http://numpy.scipy.org/
nexpy http://nexpy.github.io/nexpy/
======== =============================

How to use spec2nexus
#####################

See the documentation (http://spec2nexus.github.io/spec2nexus)
for complete instructions.

simple use
**********

Convert all scans in a SPEC data file::

$ spec2nexus path/to/file/specfile.dat

Writes ``path/to/file/specfile.hdf5`` (note: will not
overwrite if the HDF5 exists, use the *-f* option
to force overwrite).

show installed version
**********************

Verify the version of the installed spec2nexus::

$ spec2nexus -V
2014-02-18

Help on usage
*************

::

$ spec2nexus.py -h
usage: spec2nexus [-h] [-e HDF5_EXTENSION] [-f] [-V] [-s SCAN_LIST] [-t]
[-q | -v]
infile [infile ...]

spec2nexus: Convert SPEC data file into a NeXus HDF5 file.

positional arguments:
infile SPEC data file name(s)

optional arguments:
-h, --help show this help message and exit
-e HDF5_EXTENSION, --hdf5-extension HDF5_EXTENSION
NeXus HDF5 output file extension, default = .hdf5
-f, --force-overwrite
overwrite output file if it exists
-V, --version show program's version number and exit
-s SCAN_LIST, --scan SCAN_LIST
specify which scans to save, such as: -s all or -s 1
or -s 1,2,3-5 (no spaces!), default = all
-t, --tree-only print NeXus/HDF5 node tree (does not save to a file)
-q, --quiet suppress all program output (except errors), do not
use with -v option
-v, --verbose print more program output, do not use with -q option

Release history Release notifications | RSS feed

2021.2.8

2 files

2021.2.7

2 files

2021.2.6

2 files

2021.2.5

2 files

2021.2.4

2 files

2021.2.3

2 files

2021.2.2

2 files

2021.2.1

2 files

2021.2.0

2 files

2021.1.11

2 files

2021.1.10

2 files

2021.1.9

2 files

2021.1.8

2 files

2021.1.7

2 files

2021.1.6

2 files

2021.1.5

2 files

2021.1.4

2 files

2021.1.3

2 files

2021.1.2

2 files

2021.1.1

2 files

2021.1.0

2 files

2021.0.1

2 files

2021.0.0

2 files

2020.0.2

2 files

2020.0.1

2 files

2020.0.0

2 files

2019.503.0

2 files

2019.501.0

2 files

2019.422.0

2 files

2019.321.0

2 files

2017.901.4

2 files

2017.901.3

2 files

2017.901.2

2 files

2017.901.1

2 files

2017.901.0

2 files

2017.711.0

2 files

2017.522.1

2 files

2017.522.0

2 files

2017.317.0

2 files

2017.202.0

2 files

2017.201.0

2 files

2017.3.0

2 files

2016.1025.0

2 files

2016.1004.0

1 file

2016.0829.0

1 file

2016.0615.1

1 file

2016.0601.0

1 file

2016.216.0

1 file

2016.0210.0

1 file

2016.0204.0

1 file

2016.0201.0

1 file

2016.0131.0

1 file

2016.0130.0

1 file

2015.1221.0

2015.822.0

2 files

2015.0214.0

1 file

2015.0127.0

1 file

2015.0125.0

1 file

2015.0113.0

1 file

2014.1228.1

1 file

2014.1228.0

1 file

2014.1028.0

1 file

2014.1027.1

1 file

2014.0623.0

1 file

2014.0622.2

1 file

2014.0622.1

1 file

2014.0410.0

1 file

2014.0404.1

1 file

2014.0320.6

1 file

2014.0320.5

1 file

2014.0320.3

1 file

2014.03.11

1 file

2014.03.09

1 file

2014.03.08

1 file

2014.03.04

1 file

2014.03.02

1 file

2014.02.20

1 file

2.1.0

2 files

This release

2014-02-19 This release

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page