Skip to content

Commit

Permalink
Merge pull request #37 from prjemian/issue_35
Browse files Browse the repository at this point in the history
Issue 35
  • Loading branch information
prjemian committed Aug 21, 2015
2 parents 9bf9c5d + ebdb5d6 commit 26b8d2c
Show file tree
Hide file tree
Showing 6 changed files with 199 additions and 141 deletions.
151 changes: 76 additions & 75 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,75 +1,76 @@
..
This file describes user-visible changes between the versions.
Change History
##############

Production
**********

:2015.0214.0: h5toText: handle HDF5 'O' data type (variable length strings)
:2015.0127.0: spec: ignore bad data lines
:2015.0125.0: spec: change handling of #L & #X, refactor detection of scanNum and scanCmd
:2015.0113.0: dropped requirement of *lxml* package
:2014.1228.1: spec: build mne:name cross-references for counters and positioners
:2014.1228.0: show version in documentation
:2014.1028.0: spec: quietly ignore unrecognized scan content *for now*
:2014.1027.1: spec: major changes in SPEC file support: **custom plugins**

* **spec** based on plugins for each control line, users can add plugins
* declared **prjPySpec** module as legacy, code is frozen at *2014.0623.0* release
* added **spec** module to replace **prjPySpec**

:2014.0623.0: updated argparse settings
:2014.0622.2: added extractSpecScan.py to the suite from the USAXS project
:2014.0410.0: restore scan.fileName variable to keep interface the same for some legacy clients
:2014.0404.1: fix sdist utf8 problem, see: http://bugs.python.org/issue11638
:2014.0404.0: tree_api_parser moved back into NeXpy project
:2014.0320.6: handle multiple header sections in SPEC data file
:2014.0320.5: fix the new project URL
:2014.0320.4: Sphinx cannot build PDF with code-block in a footnote
:2014.0320.3: note the new home URL in the packaging, too, drop nexpy requirement, default docs theme
:2014.0320.2: tree_api_parse will go back into nexpy project, remove docs of it here
:2014.0320.1: allow readthedocs to build Sphinx without extra package requirements
:2014.0320.0:

* new home page at http://spec2nexus.readthedocs.org, easier to publish there
* move common methods from __init__.py so docs will build at readthedocs.org
* new test case fails existing SPEC reader, ignore blank lines

:2014.03.11: documentation
:2014.03.09: h5toText: option to suppress printing of attributes, put URLs in command-line usage documentation, better test of is_spec_file()
:2014.03.08: fixed string writer and content display bug in eznx, added h5toText.py, prjPySpec docs improved again
:2014.03.051: prjPySpec now handles SPEC v6 data file header additions, add new getScanCommands() method
:2014.03.04: (2014_Mardi_Gras release) removed nexpy project requirement from setup, prjPySpec raises exceptions now
:2014.03.02: drops nexus tree API (and its dependencies) in favor of native h5py writer

Development: GitHub repository
******************************

:2014.02.20: version number fits PEP440, LICENSE file included in sdist, more documentation and examples
:2014-02-19: reference published documentation (re-posted)
:2014-02-19: add documentation framework
:2014-02-18: fork to GitHub to make generally available

Development: NeXpy branch
*************************

:2014-01: briefly, a branch in https://github.com/nexpy/nexpy

* spec2nexus added during this phase
* relies on nexpy.api.nexus for NeXus support

Production: USAXS livedata
**************************

:2010-2014: production use

* support livedata WWW page of APS USAXS instrument

* (http://usaxs.xray.aps.anl.gov/livedata/),

* https://subversion.xray.aps.anl.gov/trac/small_angle/browser/USAXS/livedata/prjPySpec.py
* converted from Tcl

:2000-2010: Tcl code (*readSpecData.tcl*) in production use at APS sectors 32, 33, & 34
..
This file describes user-visible changes between the versions.
Change History
##############

Production
**********

:2015.0822.0: extractSpecScan: add option to report scan heading data, such as positioners and Q
:2015.0214.0: h5toText: handle HDF5 'O' data type (variable length strings)
:2015.0127.0: spec: ignore bad data lines
:2015.0125.0: spec: change handling of #L & #X, refactor detection of scanNum and scanCmd
:2015.0113.0: dropped requirement of *lxml* package
:2014.1228.1: spec: build mne:name cross-references for counters and positioners
:2014.1228.0: show version in documentation
:2014.1028.0: spec: quietly ignore unrecognized scan content *for now*
:2014.1027.1: spec: major changes in SPEC file support: **custom plugins**

* **spec** based on plugins for each control line, users can add plugins
* declared **prjPySpec** module as legacy, code is frozen at *2014.0623.0* release
* added **spec** module to replace **prjPySpec**

:2014.0623.0: updated argparse settings
:2014.0622.2: added extractSpecScan.py to the suite from the USAXS project
:2014.0410.0: restore scan.fileName variable to keep interface the same for some legacy clients
:2014.0404.1: fix sdist utf8 problem, see: http://bugs.python.org/issue11638
:2014.0404.0: tree_api_parser moved back into NeXpy project
:2014.0320.6: handle multiple header sections in SPEC data file
:2014.0320.5: fix the new project URL
:2014.0320.4: Sphinx cannot build PDF with code-block in a footnote
:2014.0320.3: note the new home URL in the packaging, too, drop nexpy requirement, default docs theme
:2014.0320.2: tree_api_parse will go back into nexpy project, remove docs of it here
:2014.0320.1: allow readthedocs to build Sphinx without extra package requirements
:2014.0320.0:

* new home page at http://spec2nexus.readthedocs.org, easier to publish there
* move common methods from __init__.py so docs will build at readthedocs.org
* new test case fails existing SPEC reader, ignore blank lines

:2014.03.11: documentation
:2014.03.09: h5toText: option to suppress printing of attributes, put URLs in command-line usage documentation, better test of is_spec_file()
:2014.03.08: fixed string writer and content display bug in eznx, added h5toText.py, prjPySpec docs improved again
:2014.03.051: prjPySpec now handles SPEC v6 data file header additions, add new getScanCommands() method
:2014.03.04: (2014_Mardi_Gras release) removed nexpy project requirement from setup, prjPySpec raises exceptions now
:2014.03.02: drops nexus tree API (and its dependencies) in favor of native h5py writer

Development: GitHub repository
******************************

:2014.02.20: version number fits PEP440, LICENSE file included in sdist, more documentation and examples
:2014-02-19: reference published documentation (re-posted)
:2014-02-19: add documentation framework
:2014-02-18: fork to GitHub to make generally available

Development: NeXpy branch
*************************

:2014-01: briefly, a branch in https://github.com/nexpy/nexpy

* spec2nexus added during this phase
* relies on nexpy.api.nexus for NeXus support

Production: USAXS livedata
**************************

:2010-2014: production use

* support livedata WWW page of APS USAXS instrument

* (http://usaxs.xray.aps.anl.gov/livedata/),

* https://subversion.xray.aps.anl.gov/trac/small_angle/browser/USAXS/livedata/prjPySpec.py
* converted from Tcl

:2000-2010: Tcl code (*readSpecData.tcl*) in production use at APS sectors 32, 33, & 34
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
html_theme = 'default'
html_theme = 'classic'
#html_theme = 'sphinxdoc'

# Theme options are theme-specific and customize the look and feel of a theme
Expand Down
8 changes: 6 additions & 2 deletions docs/source/extractSpecScan.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ the usage message::

[linux,511]$ extractSpecScan
usage: extractSpecScan [-h] [-v] [--nolabels] -s SCAN [SCAN ...] -c COLUMN
[COLUMN ...] [--quiet | --verbose]
[COLUMN ...] [-G] [-P] [-Q] [-V] [--quiet | --verbose]
spec_file
extractSpecScan: error: too few arguments

Expand All @@ -31,7 +31,7 @@ the version number::
the help message::

usage: extractSpecScan [-h] [-v] [--nolabels] -s SCAN [SCAN ...] -c COLUMN
[COLUMN ...] [--quiet | --verbose]
[COLUMN ...] [-G] [-P] [-Q] [-V] [--quiet | --verbose]
spec_file
Save columns from SPEC data file scan(s) to TSV files
Expand All @@ -53,6 +53,10 @@ the help message::
--quiet suppress all program output (except errors),
do not use with --verbose option
--verbose print more program output, do not use with --quiet option
-G report scan Geometry (#G) header information
-P report scan Positioner (#P) header information
-Q report scan Q (#Q) header information
-V report scan (UNICAT-style #H & #V) header information


Example
Expand Down
104 changes: 52 additions & 52 deletions src/spec2nexus/__init__.py
Original file line number Diff line number Diff line change
@@ -1,52 +1,52 @@
# -*- coding: iso-8859-1 -*-

'''command-line tool to convert SPEC data files to NeXus HDF5'''

#-----------------------------------------------------------------------------
# :author: Pete R. Jemian
# :email: prjemian@gmail.com
# :copyright: (c) 2014-2015, Pete R. Jemian
#
# Distributed under the terms of the Creative Commons Attribution 4.0 International Public License.
#
# The full license is in the file LICENSE.txt, distributed with this software.
#-----------------------------------------------------------------------------

__version__ = '2015.0214.0'
__release__ = __version__
__author__ = 'Pete R. Jemian'
__email__ = 'prjemian@gmail.com'
__copyright__ = '2014-2015, Pete R. Jemian'

__package_name__ = 'spec2nexus'
__license_url__ = 'http://creativecommons.org/licenses/by/4.0/deed.en_US'
__license__ = 'Creative Commons Attribution 4.0 International Public License (see LICENSE file)'
__description__ = 'Converts SPEC data files and scans into NeXus HDF5 files'
__author_name__ = __author__
__author_email__ = __email__
__url__ = u'http://spec2nexus.readthedocs.org'
__download_url__ = u'https://github.com/prjemian/spec2nexus/tarball/' + __version__
__keywords__ = ['SPEC', 'diffraction', 'data acquisition', 'NeXus', 'HDF5']

__install_requires__ = ('h5py','numpy', )
__classifiers__ = [
'Development Status :: 5 - Production/Stable',
'Environment :: Console',
'Intended Audience :: Science/Research',
'License :: Freely Distributable',
'License :: Public Domain',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Topic :: Scientific/Engineering',
'Topic :: Scientific/Engineering :: Astronomy',
'Topic :: Scientific/Engineering :: Bio-Informatics',
'Topic :: Scientific/Engineering :: Chemistry',
'Topic :: Scientific/Engineering :: Information Analysis',
'Topic :: Scientific/Engineering :: Interface Engine/Protocol Translator',
'Topic :: Scientific/Engineering :: Mathematics',
'Topic :: Scientific/Engineering :: Physics',
'Topic :: Scientific/Engineering :: Visualization',
'Topic :: Software Development',
'Topic :: Utilities',
]
# -*- coding: iso-8859-1 -*-

'''command-line tool to convert SPEC data files to NeXus HDF5'''

#-----------------------------------------------------------------------------
# :author: Pete R. Jemian
# :email: prjemian@gmail.com
# :copyright: (c) 2014-2015, Pete R. Jemian
#
# Distributed under the terms of the Creative Commons Attribution 4.0 International Public License.
#
# The full license is in the file LICENSE.txt, distributed with this software.
#-----------------------------------------------------------------------------

__version__ = '2015.0822.0'
__release__ = __version__
__author__ = 'Pete R. Jemian'
__email__ = 'prjemian@gmail.com'
__copyright__ = '2014-2015, Pete R. Jemian'

__package_name__ = 'spec2nexus'
__license_url__ = 'http://creativecommons.org/licenses/by/4.0/deed.en_US'
__license__ = 'Creative Commons Attribution 4.0 International Public License (see LICENSE file)'
__description__ = 'Converts SPEC data files and scans into NeXus HDF5 files'
__author_name__ = __author__
__author_email__ = __email__
__url__ = u'http://spec2nexus.readthedocs.org'
__download_url__ = u'https://github.com/prjemian/spec2nexus/tarball/' + __version__
__keywords__ = ['SPEC', 'diffraction', 'data acquisition', 'NeXus', 'HDF5']

__install_requires__ = ('h5py','numpy', )
__classifiers__ = [
'Development Status :: 5 - Production/Stable',
'Environment :: Console',
'Intended Audience :: Science/Research',
'License :: Freely Distributable',
'License :: Public Domain',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Topic :: Scientific/Engineering',
'Topic :: Scientific/Engineering :: Astronomy',
'Topic :: Scientific/Engineering :: Bio-Informatics',
'Topic :: Scientific/Engineering :: Chemistry',
'Topic :: Scientific/Engineering :: Information Analysis',
'Topic :: Scientific/Engineering :: Interface Engine/Protocol Translator',
'Topic :: Scientific/Engineering :: Mathematics',
'Topic :: Scientific/Engineering :: Physics',
'Topic :: Scientific/Engineering :: Visualization',
'Topic :: Software Development',
'Topic :: Utilities',
]

0 comments on commit 26b8d2c

Please sign in to comment.