I'm trying to figure out how to use the areaxy function to generate a list of values between a single x-series (time) and 1,000 different y-series. I only have 6 time points and a corresponding number of y-values. Using the print areaxy command, I can get the area values, however, I don't want to manually do this 1,000 times. How can I import the data sets from Excel into Igor, have it automatically calculate the areas and generate a new wave containing those values? Can anybody help.
Thanks,
Mark
Have a look here
http://www.igorexchange.com/node/1406
This should help with the loading of files. AC suggests a better way than I did.
AreaXY and storing the results should be obvious from the example codes.
Hope this helps,
Jason.
March 14, 2010 at 11:03 am - Permalink
I have posted a snippet that does the area work here. Copy and paste it to your procedure window. Read the comments to see how it works. You will need to find a way to come up with a list of your 1000 Y wave names. If they are named systematically then you can use WaveList as shown in the example.
You can load Excel data using the XLLoadWave operation. Execute this:
DisplayHelpTopic "XLLoadWave XOP"
For a discussion of loading multiple waves from a user-defined function:
DisplayHelpTopic "Loading Waves Using Igor Procedures"
You will have to modify the procedures shown there to use XLLoadWave instead of the LoadWave operation and will no doubt need to make other modifications.
March 14, 2010 at 11:28 am - Permalink
Here's the macro and function I came up with:
--Jim Prouty
Software Engineer, WaveMetrics, Inc.
March 15, 2010 at 11:29 am - Permalink