After collecting 1000 scans (waves) in 24 hrs I plot them into a 2D graph looking for areas of interest. I see that in this particular test waves 500-640 are interesting and I want to extract those waves, from the 1000 wave experiment, putting them into another data set where I can mathematically manipulate them. Essentially I would like a query window (preferred), or a macro, that asks me what waves to extract. Can you point me to a solution? This process will soon be a production process and I’d like the operator instructions be relatively obvious.
So you are starting with 1000 individual waves?? I'm assuming you add these values to a 2D wave which is then graphed as a contour plot.
I would recommend writing a little macro that would allow the user to place cursors A and B bordering the area of interest. Then, the user simply presses the button and here's where your work starts.
Using the locations of cursors A and B, lets say they are at 500 and 640 like in your example. Here i'm also going to assume that your 1000 waves start with the same name... lets say "DataWaveXXXX" where XXXX is the number.
You can use
WaveList("DataWave*", ";", 0)
to get all the wave names of your data waves (make sure to sort them afterwards so they are in alpha-numeric order instead of just alphabetically... Use SortList).
then, you can do the following (assuming your sorted list is called "list"
string list variablei variablej = pcsr(b) string wavenamestr display
So, following your brief description (and using my assumptions) this process you result in a graph containing the data waves for samples 500-640. If you wanted a new Igor Experiment File containing these data waves, you can use Save Graph Copy (it's under the File menu and I can't remember the command at the moment) to create an Igor Experiment File containing the topmost graph and only the waves necessary to make it.
I would recommend writing a little macro that would allow the user to place cursors A and B bordering the area of interest. Then, the user simply presses the button and here's where your work starts.
Using the locations of cursors A and B, lets say they are at 500 and 640 like in your example. Here i'm also going to assume that your 1000 waves start with the same name... lets say "DataWaveXXXX" where XXXX is the number.
You can use
to get all the wave names of your data waves (make sure to sort them afterwards so they are in alpha-numeric order instead of just alphabetically... Use SortList).
then, you can do the following (assuming your sorted list is called "list"
variable i
variable j = pcsr(b)
string wavenamestr
display
for (i=pcsr(a); i<j; i+=1)
wavenamestr = stringfromlist(i, list, ";")
appendtograph $(wavenamestr)
endfor
So, following your brief description (and using my assumptions) this process you result in a graph containing the data waves for samples 500-640. If you wanted a new Igor Experiment File containing these data waves, you can use Save Graph Copy (it's under the File menu and I can't remember the command at the moment) to create an Igor Experiment File containing the topmost graph and only the waves necessary to make it.
November 13, 2012 at 03:26 pm - Permalink