Help with FindLevel

I'm having a problem changing the FindLevel command in my programming.

I want specify a range of x value based on a wave for my wave of interest. To clarify, the wave I am looking at has 6K points, but the values in appropriate units only go from about 7-51. So I want to find the peaks for this wave with a range of 19-29 from the specific wave set as x values.

Thanks for any help.
If I could figure out what it is you are asking, I bet I could help you. Please clarify your clarification.

--Jim Prouty
Software Engineer, WaveMetrics, Inc.
Sorry for the confusing first post.

I am attempting to use the AutomaticallyFindPeaks function to identify peaks in my spectra. Each file has around 700, so doing this with a user procedure would be ideal. The FindLevel command is the part I wish to adjust. The normal format being: FindLevel/Q/R=[0,n] wave1,0

I would like to adjust the part in brackets to reflect values in a specific wave (call it wave0) instead of the points in wave1. This would normally not be an issue, but the values of wave0 do not depend linearly on the points in wave1.

I hope this clarifies the request.

Thank You.
/R only selects a point range of the wave listed in the command; it knows nothing about other waves.

But even when your data is an XY Pair (separate x and y waves, normally the wave full of x values is at least in sorted, usually ascending, order, so you can find which point in the X wave corresponds to the points in both x and y waves. Use the point number with /R.

If the X wave is sorted, you can use BinarySearch to find the point for a given x value.

Do that twice to find the start and end point, and use them with /R.

You may find it helpful to upload your experiment as a file attachment so others can see what you're trying, and what your data looks like.

--Jim Prouty
Software Engineer, WaveMetrics, Inc.