Skip to content

imLew/ibwpy

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ibwpy

Read and write Igor Pro files (Igor binary wave) with Python

Installation

Install with pip (using Git, recommended)

  1. Install ibwpy with pip
$ python -m pip install git+https://github.com/MiLL4U/ibwpy.git

Install with pip (without Git)

  1. download a wheel package (*.whl) from Releases

  2. 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)

Install with git clone

  1. Clone this repository
$ git clone https://github.com/MiLL4U/ibwpy.git
  1. Go into the repository
$ cd ibwpy
  1. Install ibwpy with setup.py
$ python setup.py install

Examples

Read

Read wave from ibw file:

import ibwpy as ip
test_wave = ip.load("test_wave.ibw")
print(test_wave)

Make

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]]

Calculation

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

Save wave as ibw file

wave_1.save("wave1.ibw")

About

Read and write Igor Pro files (Igor binary wave) with Python

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%