Read and write Igor Pro files (Igor binary wave) with Python
- Install ibwpy with pip
$ python -m pip install git+https://github.com/MiLL4U/ibwpy.git-
download a wheel package (*.whl) from Releases
-
Install ibwpy with pip
$ python -m pip install ibwpy-x.y.z-py3-none-any.whl(replace x.y.z with the version of ibwpy which you downloaded)
- Clone this repository
$ git clone https://github.com/MiLL4U/ibwpy.git- Go into the repository
$ cd ibwpy- Install ibwpy with setup.py
$ python setup.py installRead wave from ibw file:
import ibwpy as ip
test_wave = ip.load("test_wave.ibw")
print(test_wave)Make new wave from Numpy array
import numpy as np
arr_1 = np.array([[1., 2., 3.],
[1.5, 2.5, 3.5]])
wave_1 = ip.from_nparray(arr_1, 'wave1')
# wave1 (IgorBinaryWave)
# [[1. 2. 3. ]
# [1.5 2.5 3.5]]Treat wave as NumPy array:
arr_2 = np.ones((2, 3))
print(arr_2)
# [[1. 1. 1.]
# [1. 1. 1.]]
wave_1 = wave_1 + arr_2
print(wave_1)
# wave1 (IgorBinaryWave)
# [[2. 3. 4. ]
# [2.5 3.5 4.5]]Save wave as ibw file
wave_1.save("wave1.ibw")