09-16-2010 09:42 AM
I have generated an XY graph with an array of 10 points. Great.
I pulled the peak value out and made a cursor appear at that point. Great.
I now need 2 more cursors or indetification marks on the graph as well as a integral calculation.
This is called aFull Width at Half Max (FWHM) calculation.
We get the peak/2 on the Y axis and draw a line across the graph.
We then find the 2 intersecting point on the graph
Once we know these intersecting points we integrate what is inside the area.
See attached photo.
We would integrate from X1 to X2 and fmax.
So my question is what is the best way to visually represent this data?
I can't seem to add 4 cursors and get them where I want them.
09-16-2010 09:55 AM
DO you have some data for me to play with?
09-16-2010 10:32 AM
Here's the vi
I'm close
09-16-2010 10:41 AM
Something like this? I find the peak and the peak/2 points then use the threshold vi to find the x value and then look to see when it falls below the peak/2 point for the x2 value and plot all of the cursors.
09-16-2010 10:42 AM
@Murph wrote:
Here's the vi
I'm close
You did not save any data in your vi. I made my own. It shoudl give you a good example of how to do everything.
09-16-2010 02:14 PM
Thanks.
I changed a few things using your suggestions but still need some data that I don't know how to get.
In your example on cursor X1 you found the Y values by peak/2. Good.
Then using the threshold peak detector you extracted a value for X.
I tried that but do not get what I expect.
So close. What am I missing here?
I am using an XY graph and yours is a waveform graph, does that make a difference?
I put the data in this vi.
09-16-2010 02:51 PM
OK I made a few more changes to your code and now I have it working on the XY graph. It make it slightly more complicated. I would say that you need more resolution in your graph or you will need to interpolate the data if you need the value when the line cross the cursor position. Look at the graph and you will see what I mean.
09-16-2010 02:55 PM
Are you using Ver 10?
I can't open that vi.
I am still using 2009
09-16-2010 02:56 PM
Here is version 9
09-20-2010 09:44 AM
I agree that if we use more data we'll be more accurate but the way we are getting the X scale value is based on a fixed data point. If the attached example it is the 4th array element.
What I need is the calculated exact value ofthe X scale where it intersects with the 50% of peak.