![](/profiles/wavemetrics/themes/wavemetrics/logo.png)
Igor newbie needs a small bit of help
![](/sites/default/files/styles/thumbnail/public/default_images/Artboard%201_1.png?itok=jeHOCIXy)
tim2020
I am new to IGOR coding and was hoping a generous member could help me code a small script.
This would help me tremendously get started with my project.
I have 10 waves (named 1 thru 10) in a folder called exp1 The organization of the folders is: root/6_12_13/animal1/exp1
I want to make a function that does the same operation to each wave in this folder.
In this case, subtract the first value in a wave from the entire wave and then divide these numbers by the initial first value. or (wave1 - first value wave1) / first value wave1
Ideally the function would create new waves and keep the original waves.
Any help would be so much appreciated. Thanks!
I think the best course of action here would be to use the WaveSelectorWidget in a panel to allow the user to browse/select a wave to process. This gives you access to the data folder path of interest, which is necessary to ensure the routine works on the data in the appropriate folder without require the user to first set the active data folder.
The WaveList function will allow you to work on any number of waves (not limited to 10) in a for loop.
July 26, 2013 at 06:37 am - Permalink
You choose all waves you want to apply the function to in the DataBrowser. Now I assume that you want to subtract/divide each wave from/by itself, right?
Then try to use some code like this:
Hope this helps!
Marty
July 26, 2013 at 09:25 am - Permalink
Execute Setup() once from the command line. Then execute Demo().
July 26, 2013 at 10:57 am - Permalink