Making Selection Along x-axis

I posted here a couple months ago with another question, which has thankfully been resolved and is up and running so thanks for that! Now I have a new task which I am finding perplexing but I think probably has a simple answer that I am hoping someone else has dealt with.

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)?
I don't know about GetMarquee, but your problem looks like you want to give FindPeak a shot.
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
thomas_braun wrote:
I don't know about GetMarquee, but your problem looks like you want to give FindPeak a shot.
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

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!
Alright bit of an update but a new problem.

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?
I don't know if this solves your problem, but to refer to the x scaling of the wave you have to use round brackets like /R=(795,950). As far as I understand the /P flag affects only the output.
A
awirsing wrote:
I don't know if this solves your problem, but to refer to the x scaling of the wave you have to use round brackets like /R=(795,950). As far as I understand the /P flag affects only the output.
A

Well don't I feel dumb. Yup, that fixed it! Thanks so much!