Skip to content

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

License

Notifications You must be signed in to change notification settings

jbuencuerpo/igorwriter

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%