LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

FWHM with peak detector

Solved!
Go to solution

Hi,

    I know I am posting a question that has been asked several times before, but in looking through the answers to those questions, I was unable to find a solution that worked for my case. Attached is a VI for reading data (much like a chromatogram), which I would like to be able to use to find the FWHM of any peak which appears in the specta to be analyzed. I have also included a data file, containing one peak. A previous post had mentioned using the peak detect.vi and a square root function to find the half widths, but it returned a false value when I attempted that concept. I have a similar program that I can run in Excel to give me the FWHM, based on finding the peaks, finding the four closest data points to the half max, and interpolating these to find the values at the exact half max. However, being new to LabView, I do not know how to program this function. Any help would be greatly appreciated.

<>< Eric

Download All
0 Kudos
Message 1 of 29
(15,810 Views)

Hi Eric,

 

Have you tried the using the Pulse Measurements vi?  It can be found at Programming » Waveform » Analog Waveform » Waveform Measurements » Pulse Measurements.

 

Best Regards,

Bryan H.
0 Kudos
Message 2 of 29
(15,771 Views)

Maybe I dont understand how this vi is supposed to work, but to me, the Pulse Measuremnts vi is designed for a periodic pulse that is constant, not for waveform data that is different with every spectrum analyzed. In addition, I dont see how this gives the FWHM of a peak. The data I provided gives a typical spectrum with a peak like that which I need to measure the FWHM. Thank you for the reply,

<>< Eric

0 Kudos
Message 3 of 29
(15,765 Views)

You might try using the "Threshold 1D array" VI.  Find you peak using max/min array function, go the the index of the max, and then search the array for the next value of 1/2 the max.  The index of that value will half the full width from the index of the peak and could be multiplied by two to give the full width.  If the peak is not symettrical, then "Reverse the 1D array" and search for the 1/2 peak point starting at your peak again. 

 

The difference between the two threshold points should be the Full Width of the Half Magnitude points.

 

Hope that helps.

0 Kudos
Message 4 of 29
(15,761 Views)
Solution
Accepted by Eric-APU

You might try using the "Threshold 1D array" VI.  Find you peak using max/min array function, go the Max index of the max, and then search the array for the next value of 1/2 the max.  The index of that value will half the full width from the index of the peak and could be multiplied by two to give the full width.  If the peak is not symmetrical, then "Reverse the 1D array" and search for the 1/2 peak point starting at your peak again. 

 

The difference between the two threshold points should be the Full Width of the Half Magnitude points.

 

Hope that helps.

 

Good Grief...spelling is terrible.

Message 5 of 29
(15,758 Views)

Thanks for the advice, I tried it, and figured out a combination that made it work. It may not be pretty, but it calculates the exact, interpolated FWHM for any peak. I have attached my file here so others can use the code for a similar application. In this code, it is designed that the user inputs a file, and brackets the peak they want the "resolving power" calculated for (in this case, resolving power is peak maximum time divided by the FWHM) using the Red and Blue cursors. Thanks again,

<>< Eric

0 Kudos
Message 6 of 29
(15,727 Views)

Hi Eric;

I wanted to look at your peak detection and there was  one VI missing, could you please email me (Hamid.yazdi@yahoo.com) the missing VI?

I think it was KO calculator.vi

 

 

Regards

Hamid Yazdi

 

Hamid.yazdi@yahoo.com

0 Kudos
Message 7 of 29
(15,145 Views)
could you somehow save this vi as 8.5. i can't open this vi becuase i have labview 8.5 on my computer.
0 Kudos
Message 8 of 29
(15,092 Views)

Here it is in 8.5. As I told the poster above you (in a separate email), the Ko VI is unnecessary, it was for some specific work I am doing using this program. Hope this helps.

<>< Eric 

0 Kudos
Message 9 of 29
(15,089 Views)

this is a program for set of resonance frequencies can u please tell how to calculate the FWHM for all the peaks and the Q factor simulations below is the program and one of the data . or atleast tell me how to calculate the FWHm taking one by on epeak at a time. Please help me.

Download All
0 Kudos
Message 10 of 29
(12,548 Views)