igorwriter

Write IGOR binary (.ibw) or text (.itx) files from numpy array


License
MIT
Install
pip install igorwriter==0.1.0

Documentation

IgorWriter

Write IGOR binary (.ibw) or text (.itx) files from numpy array

Installation

$ pip install igorwriter

Usage

>>> import numpy as np
>>> from igorwriter import IgorWave
>>> array = np.array([1,2,3,4,5,6])
>>> wave = IgorWave(array, name='mywave')
>>> wave.set_datascale('DataUnit')
>>> wave.set_dimscale('x', 0, 0.01, 's')  # set x scale information
>>> wave.save('mywave.ibw')
>>> wave.save_itx('mywave.itx')

Notes on Image Plots

Image Plot in IGOR and imshow in matplotlib use different convention for x and y axes:

  • Rows as x, columns as y (IGOR)
  • Columns as x, rows as y (Matplotlib)

Thus, image parameter was introduced in save() and save_itx() methods. If you use e.g.

>>> wave.save('path.ibw', image=True)

plt.imshow and Image Plot will give the same results.