LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

After zooming, how do I get x and y values?

I have an instrument that saves data in a simple x and y format. When viewing this data I would like to determine the peak width, height, position and area. I have utilized the peak detector vi to pick the peak and set the threshold, however, I have not been successful at getting the peak width and area for a specific peak. I think my first step is to isolate the data range that my peak resides. So, after zooming on a specific peak, how do I extract the x and y values for that zoomed region and apply them to peak integration and fitting? Does anyone have a sample vi I could look at or is there already a canned vi in Labview to do this?

Thanks
Brian
0 Kudos
Message 1 of 2
(2,698 Views)
Have you tried to use the peak detector vi to search for *valleys* ? That could give you the peak start and end.
If you decide to use manual positionning of peaks, you can get the x limits of the graph display using property nodes : Right click on the graph terminal then Create>>Property node. Right click on the property node then Properties>>X scale>>Range.
You could also use graph cursors (wave form graph or XY graph) : make the cursor legend visible (right click on the graph), then give a name to cursor n°0 (peak start) and cursor n°1 (peak end). Set the cursor to "Lock to points". Get the x and y cursor coordinates using the cursor list property node, as illustrated in the attached example.
Once you get the x start and end coordinates, data
processing should not be too difficult, but depends on the data type you are dealing with (are the points equally spaced ? Are the data noisy ?..).
If your start and end X coordinates do not correspond exactly to experimental data, you can either interpolate through the points or search for the index of the nearest points in the x array (use the Threshold 1D array vi for that, pass the x fractional value (that you got from your windowing zoom) as input, as shown in the second example.
Ask if you need more help.
Chilly Charly    (aka CC)
Download All
0 Kudos
Message 2 of 2
(2,698 Views)