Skip to content

Merge Hooke's igorbinarywave with igor.py, adding fancy structure parsing to both projects. #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 77 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
06c94cd
Split IGOR handling out into its own repository.
wking Jul 16, 2012
bf9cd0a
Add hooke.driver.igorbinarywave so Hooke can read Igor files.
Jun 4, 2010
f34cd7f
Ran update_copyright.py on igorbinarywave.py
Jun 4, 2010
101d030
Automatically split version 5 Igor wave files into columns
Jun 4, 2010
ce315c8
Added post-data optional field processing to igorbinarywave.loadibw.
Jun 4, 2010
32567bf
Ran update_copyright.py
Aug 3, 2010
18db175
Move hooke.driver.igorbinarywave to hooke.util.igorbinarywave.
Sep 8, 2010
ac02832
Add -n/--not-strict to igorbinarywave.py (currently for IBW files wit…
Oct 28, 2010
155a2be
Split igorbinarywave.py off of Hooke into its own package.
wking Jul 16, 2012
9b397d1
Upgrade to Python 2.7+ string formatting.
wking Jul 16, 2012
433ce47
Pull null-buffer check out into its own function: binarywave.assert_n…
wking Jul 16, 2012
73183fb
Restore native byte order before running need_to_reorder_bytes.
wking Jul 16, 2012
8df8676
Add support for zero-length waves.
wking Jul 17, 2012
41e6547
Add support for text waves.
wking Jul 17, 2012
2c97e5a
Preliminary support for dependent formula waves.
wking Jul 17, 2012
c9344ce
Add the test suite that's been driving today's changes.
wking Jul 17, 2012
d20d217
Split struct and util modules out of binarywave.
wking Jul 17, 2012
d479963
Stub out packed experiment (.pxp) reading.
wking Jul 17, 2012
4e9f269
API cleanup for binarywave (loadibw->load, move checksum to util, ...).
wking Jul 17, 2012
ead1da8
WaveRecord now loads waves as WaveRecord.wave.
wking Jul 17, 2012
f80fada
Move need_to_reorder_bytes from binarywave to util.
wking Jul 17, 2012
e10e3e2
Extend igor.struct.Structure and .Field to support nesting.
wking Jul 18, 2012
cf04518
struct: Add support for zero-count Fields.
wking Jul 18, 2012
d400cac
Split record handling into modules and implement VariablesRecord.
wking Jul 19, 2012
29b3524
Implement the plain-text HistoryRecord, RecreationRecord, and GetHist…
wking Jul 19, 2012
810a1a1
Implement the plain-text ProcedureRecord.
wking Jul 19, 2012
309967f
Implement the folder records and filesystem reconstruction.
wking Jul 19, 2012
6c2c99b
Read sIndices as uint32's in binarywave.load.
wking Jul 19, 2012
8574937
Store wave, bin_info, and wave_info separately in WaveRecord.
wking Jul 19, 2012
55a8cfc
Use variable names to store variables in the filesystem (vs. Variable…
wking Jul 19, 2012
11db2c4
fix record.base
wking Jul 19, 2012
5375c94
Add igor.LOG for easier debugging.
wking Jul 20, 2012
bdfe5f0
Rework igor.struct to support dynamic structures.
wking Jul 20, 2012
058cbd2
Initial merge with igor.py, still need to integrate code.
wking Jul 20, 2012
e1ebd50
Update igorbinarywave.py to use dynamic structure interface.
wking Jul 20, 2012
ccbf042
Add COPYING file with GPLv3 text.
wking Jul 20, 2012
8b9929f
Point out that test/data is not bundled.
wking Jul 20, 2012
6a09fdf
Use LOG to print helpful messages in test.py.
wking Jul 20, 2012
a2151cb
Add test-igorpy.py for testing igor.igorpy.
wking Jul 20, 2012
1d1e881
Add 'not enough data...' errors to packed.load().
wking Jul 21, 2012
fe7006e
Replace igor.igorpy parsing with translations from igor.packed.load.
wking Jul 21, 2012
ffb4b3e
Avoid expensive pformating in DynamicStructure.unpack_stream unless r…
wking Jul 21, 2012
84d9a56
Use DebuggingStream for any LOG.level <= DEBUG (not just ==).
wking Jul 21, 2012
1db4604
Pull common script code into igor.script and add bin/igorpackedexperi…
wking Jul 21, 2012
9b24573
Ran update-copyright.py.
wking Jul 21, 2012
b44e5e8
Add update-copyright blurb to the README (+minor typo fixes).
wking Jul 21, 2012
e82fdde
Remove struct._buffer because I don't use it anymore.
wking Jul 21, 2012
446da7b
Don't use u'...' syntax in igor.igorpy.
wking Jul 21, 2012
9c9a7bf
Python 3 scraps the iter(...).next() method, so use next(iter(...)).
wking Jul 21, 2012
69e98db
Use integer division in Field.indexes for Python 3 compatibility.
wking Jul 21, 2012
d2c87ab
Add igor.util._ord for Python 3 compatibility.
wking Jul 21, 2012
93014f2
Convert buffer(...) -> bytes(...) for Python 3 compatibility.
wking Jul 21, 2012
7710836
Use integer division when calculating DynamicStringIndicesDataField c…
wking Jul 21, 2012
5a636a0
Add W_plrX5.data_units check to test-igorpy.py.
wking Jul 21, 2012
4776df1
Convert exception.message -> exception.args[0] for Python 3 compatibi…
wking Jul 21, 2012
7612a46
Fixes to string/byte handling for Python 3 compatibility.
wking Jul 21, 2012
237a594
Add trove classifiers for Python 2.7 and 3.2 to setup.py.
wking Jul 21, 2012
eba8aab
Add AUTHORS (generated by update-copyright.py) to .gitignore.
wking Jul 21, 2012
e0a5ed5
Add igor.packed.walk for traversing a packed experiment filesystem.
wking Jul 21, 2012
b290d09
Add -p/--plot option so scripts will plot waves.
wking Jul 21, 2012
3ae7034
Use an explicit .array attribute to determine if fields are arrays.
wking Jul 21, 2012
dadce20
Carry on plotting in scripts if one of the plots fails (e.g. for text…
wking Jul 21, 2012
c6ffafd
Add an alias from gmail -> nist for Paul Kienzle to .mailmap.
wking Jul 21, 2012
b81f29e
Add closing semicolons (;) to C structures in docstrings.
wking Jul 21, 2012
b6d4db0
Fix homepage url formatting (%s -> {}) in setup.py.
wking Jul 22, 2012
ff3da75
Add igorpackedexperiment.py to setup.py script list.
wking Jul 22, 2012
53027c1
Use modern {} formatting instead of %s for setup.py's provides option.
wking Jul 22, 2012
1a740e9
igorpackedexperiment.py doesn't use numpy, so don't import it.
wking Jul 24, 2012
75ddaa0
Clear up copyright ambiguity by changing to LGPLv3+.
wking Jul 26, 2012
551d9bc
Fix DynamicLabelsField parsing algorithm.
wking Aug 20, 2012
748cddf
README: fix reStructuredText for `pip install` example.
wking Oct 11, 2012
2c2a79d
test/test.py: Fix ['Column0'] -> ['', 'Column0']
wking Apr 8, 2015
2b2b425
igor.script: Replace ArgumentParser(version=...) with a version argument
wking Aug 2, 2016
d792fd5
setup.py: Claim compatibility through 3.5
wking Aug 2, 2016
f3733eb
.update-copyright.conf: Update configuration for update-copyright 0.6.2
wking Aug 2, 2016
0a43edc
Run update-copyright.py
wking Aug 2, 2016
41952c5
igor: Bump to 0.3
wking Aug 2, 2016
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
AUTHORS
MANIFEST
build
dist
build/
dist/
igor.egg-info/
*.pyc
2 changes: 2 additions & 0 deletions .mailmap
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
W. Trevor King <[email protected]> <[email protected]>
Paul Kienzle <[email protected]> <[email protected]>
18 changes: 18 additions & 0 deletions .update-copyright.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[project]
name: igor
vcs: Git

[files]
authors: yes
files: yes
ignored: COPYING | README | .update-copyright.conf | .git* | test/*

[copyright]
short: {project} comes with ABSOLUTELY NO WARRANTY and is licensed under the GNU Lesser General Public License.
long: This file is part of {project}.

{project} is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

{project} is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with {project}. If not, see <http://www.gnu.org/licenses/>.
674 changes: 674 additions & 0 deletions COPYING

Large diffs are not rendered by default.

165 changes: 165 additions & 0 deletions COPYING.LESSER
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
GNU LESSER GENERAL PUBLIC LICENSE
Version 3, 29 June 2007

Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.


This version of the GNU Lesser General Public License incorporates
the terms and conditions of version 3 of the GNU General Public
License, supplemented by the additional permissions listed below.

0. Additional Definitions.

As used herein, "this License" refers to version 3 of the GNU Lesser
General Public License, and the "GNU GPL" refers to version 3 of the GNU
General Public License.

"The Library" refers to a covered work governed by this License,
other than an Application or a Combined Work as defined below.

An "Application" is any work that makes use of an interface provided
by the Library, but which is not otherwise based on the Library.
Defining a subclass of a class defined by the Library is deemed a mode
of using an interface provided by the Library.

A "Combined Work" is a work produced by combining or linking an
Application with the Library. The particular version of the Library
with which the Combined Work was made is also called the "Linked
Version".

The "Minimal Corresponding Source" for a Combined Work means the
Corresponding Source for the Combined Work, excluding any source code
for portions of the Combined Work that, considered in isolation, are
based on the Application, and not on the Linked Version.

The "Corresponding Application Code" for a Combined Work means the
object code and/or source code for the Application, including any data
and utility programs needed for reproducing the Combined Work from the
Application, but excluding the System Libraries of the Combined Work.

1. Exception to Section 3 of the GNU GPL.

You may convey a covered work under sections 3 and 4 of this License
without being bound by section 3 of the GNU GPL.

2. Conveying Modified Versions.

If you modify a copy of the Library, and, in your modifications, a
facility refers to a function or data to be supplied by an Application
that uses the facility (other than as an argument passed when the
facility is invoked), then you may convey a copy of the modified
version:

a) under this License, provided that you make a good faith effort to
ensure that, in the event an Application does not supply the
function or data, the facility still operates, and performs
whatever part of its purpose remains meaningful, or

b) under the GNU GPL, with none of the additional permissions of
this License applicable to that copy.

3. Object Code Incorporating Material from Library Header Files.

The object code form of an Application may incorporate material from
a header file that is part of the Library. You may convey such object
code under terms of your choice, provided that, if the incorporated
material is not limited to numerical parameters, data structure
layouts and accessors, or small macros, inline functions and templates
(ten or fewer lines in length), you do both of the following:

a) Give prominent notice with each copy of the object code that the
Library is used in it and that the Library and its use are
covered by this License.

b) Accompany the object code with a copy of the GNU GPL and this license
document.

4. Combined Works.

You may convey a Combined Work under terms of your choice that,
taken together, effectively do not restrict modification of the
portions of the Library contained in the Combined Work and reverse
engineering for debugging such modifications, if you also do each of
the following:

a) Give prominent notice with each copy of the Combined Work that
the Library is used in it and that the Library and its use are
covered by this License.

b) Accompany the Combined Work with a copy of the GNU GPL and this license
document.

c) For a Combined Work that displays copyright notices during
execution, include the copyright notice for the Library among
these notices, as well as a reference directing the user to the
copies of the GNU GPL and this license document.

d) Do one of the following:

0) Convey the Minimal Corresponding Source under the terms of this
License, and the Corresponding Application Code in a form
suitable for, and under terms that permit, the user to
recombine or relink the Application with a modified version of
the Linked Version to produce a modified Combined Work, in the
manner specified by section 6 of the GNU GPL for conveying
Corresponding Source.

1) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (a) uses at run time
a copy of the Library already present on the user's computer
system, and (b) will operate properly with a modified version
of the Library that is interface-compatible with the Linked
Version.

e) Provide Installation Information, but only if you would otherwise
be required to provide such information under section 6 of the
GNU GPL, and only to the extent that such information is
necessary to install and execute a modified version of the
Combined Work produced by recombining or relinking the
Application with a modified version of the Linked Version. (If
you use option 4d0, the Installation Information must accompany
the Minimal Corresponding Source and Corresponding Application
Code. If you use option 4d1, you must provide the Installation
Information in the manner specified by section 6 of the GNU GPL
for conveying Corresponding Source.)

5. Combined Libraries.

You may place library facilities that are a work based on the
Library side by side in a single library together with other library
facilities that are not Applications and are not covered by this
License, and convey such a combined library under terms of your
choice, if you do both of the following:

a) Accompany the combined library with a copy of the same work based
on the Library, uncombined with any other library facilities,
conveyed under the terms of this License.

b) Give prominent notice with the combined library that part of it
is a work based on the Library, and explaining where to find the
accompanying uncombined form of the same work.

6. Revised Versions of the GNU Lesser General Public License.

The Free Software Foundation may publish revised and/or new versions
of the GNU Lesser General Public License from time to time. Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns.

Each version is given a distinguishing version number. If the
Library as you received it specifies that a certain numbered version
of the GNU Lesser General Public License "or any later version"
applies to it, you have the option of following the terms and
conditions either of that published version or of any later version
published by the Free Software Foundation. If the Library as you
received it does not specify a version number of the GNU Lesser
General Public License, you may choose any version of the GNU Lesser
General Public License ever published by the Free Software Foundation.

If the Library as you received it specifies that a proxy can decide
whether future versions of the GNU Lesser General Public License shall
apply, that proxy's public statement of acceptance of any version is
permanent authorization for you to choose that version for the
Library.
2 changes: 2 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
include COPYING
include COPYING.LESSER
138 changes: 138 additions & 0 deletions README
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
====
Igor
====

:Authors: W. Trevor King <[email protected]>;
Paul Kienzle <[email protected]>
:License: GNU General Public License, version 3+

Python parsers for Igor Binary Waves (.ibw) and Packed Experiment
(.pxp) files written by WaveMetrics' IGOR Pro software.

Installation
============

Packages
--------

If `igor` already exists in your package manager's repository, you
should install `igor` in the usual way.

Gentoo
~~~~~~

I've packaged `igor` for Gentoo. You need layman_ and my `wtk
overlay`_. Install with::

# emerge -av app-portage/layman
# layman --add wtk
# emerge -av sci-misc/igor

Dependencies
------------

If you're installing by hand or packaging `igor` for another
distribution, you'll need the following dependencies:

=========== ================= ============================
Package Debian_ Gentoo_
=========== ================= ============================
Numpy_ python-numpy dev-python/numpy
Matplotlib_ python-matplotlib dev-python/matplotlib
Nose_ python-nose dev-python/nose
=========== ================= ============================

Installing by hand
------------------

`igor` is available as a Git_ repository::

$ git clone git://tremily.us/igor.git

See the homepage_ for details. To install the checkout, run the
standard::

$ python setup.py install

You can also automate this installation with pip_::

$ pip install igor

Usage
=====

See the docstrings and unit tests for examples using the Python API.
The package also installs to scripts, ``igorbinarywave.py`` and
``igorpackedexperiment.py`` which can be used to dump files to stdout.
For details on their usage, use the ``--help`` option. For example::

$ igorbinarywave.py --help

For users transitioning from igor.py_, there's a compatibility module
exposing the old interface. Just change::

import igor

to::

import igor.igorpy as igor

in your calling code.

Testing
=======

Run internal unit tests with::

$ nosetests --with-doctest --doctest-tests igor test

The data in the ``test/data`` directory is in the Git repository, but
it is not bundled with the source code. If you want the test data,
you'll have to clone the Git repository or download a snapshot.

Licence
=======

This project is distributed under the `GNU Lesser General Public
License Version 3`_ or greater, see the ``COPYING`` file distributed
with the project for details.

Maintenance
===========

Maintainer
----------

W. Trevor King
[email protected]
Copyright 2008-2012

Release procedure
-----------------

When a new version of the package is ready, increment __version__
in ``igor/__init__.py`` and run update-copyright_::

$ update-copyright.py

to update the copyright blurbs. Then run::

$ python setup.py sdist upload

This will place a new version on PyPI.


.. _layman: http://layman.sourceforge.net/
.. _wtk overlay: http://blog.tremily.us/posts/Gentoo_overlay/
.. _Debian: http://www.debian.org/
.. _Gentoo: http://www.gentoo.org/
.. _NumPy: http://numpy.scipy.org/
.. _Matplotlib: http://matplotlib.sourceforge.net/
.. _Nose: http://somethingaboutorange.com/mrl/projects/nose/
.. _Git: http://git-scm.com/
.. _homepage: http://blog.tremily.us/posts/igor/
.. _pip: http://pypi.python.org/pypi/pip
.. _igor.py: http://pypi.python.org/pypi/igor.py
.. _GNU Lesser General Public License Version 3:
http://www.gnu.org/licenses/lgpl.txt
.. _update-copyright: http://blog.tremily.us/posts/update-copyright/
43 changes: 0 additions & 43 deletions README.rst

This file was deleted.

Loading