Write IGOR binary (.ibw) or text (.itx) files from numpy array
$ pip install igorwriter
>>> 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')
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.