Making Selection Along x-axis
jabberwocky
Basically we are looking at the effects of heating certain minerals and how they show up in spectra. When doing this there are three important peaks that we want to look at, for each of these peaks individually we want to get the maximum point and the minimum points on either side of them.
These peaks show up in pretty well the same place along the x-axis (one peak and its two minimum points always show up between 950 and 795, for example) and so basically we want to write a macro which we can run on a graph which will go through and get each of these points and put them into a table for us.
The problem I am having is that I know there is a way to use the
GetMarquee
to get some of this information but thus far have been unable to figure out how to write it so that it will select a certain area along the x-axis (like for instance the 950 to 795 area mentioned above) and THEN get the information. Is there a way to do this (with GetMarquee
or with a different operation)?
This operation also accepts an x-range by the /R flag.
And I also would write a function and not a macro.
Hope that helps,
Thomas
February 11, 2011 at 08:59 am - Permalink
I think we are actually writing it as a function not a macro, but my boss calls them macros and I have just conformed to her jargon!
Thanks so much though, I will give this a shot!
February 11, 2011 at 09:14 am - Permalink
FindPeak
was in fact what I needed to use as a function, however I've been trying to select the coordinates along the x-axis and it simply isn't working.basically what it looks like right now is;
FindPeak/B=(1)/I/M=(0)/Q/R=[795,950] w
Not the whole code obviously, but a snippit of that section. If more is required let me know.
Anyway even though I have it set as 795,950 it will select things from outside that range, or won't select things that are in that range. I've tried using points instead (adding the /P to the code) and that just goes crazy off. Will do things such as select a point that is just on the white space of the graph and not along the graph itself.
Any suggestions?
March 16, 2011 at 09:50 am - Permalink
A
March 16, 2011 at 11:10 am - Permalink
Well don't I feel dumb. Yup, that fixed it! Thanks so much!
March 21, 2011 at 09:23 am - Permalink