LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Finding Peaks and FWHM (USB2000+ & Omnidriver)

Hi there,

 

I work as a summer student and am supposed to write a program to measure different spectra (finding peaks + fwhm). I use the USB2000+ from OceanOptics with the Omnidriver+SPAM package.

Sadly I have no experience neither with LabVIEW nor with programming at all.

 

I started with some LabVIEW tutorials and after that I created a .vi regarding to the OceanOptics Omnidriver and Labview tutorial ( http://www.youtube.com/watch?v=tT5C43D3rR )

 

Now I can measure the spectrum and find my peaks + wavelength, but I don't know how to get the FWHM (or rather the wavelength) of my peaks.

Is it possible to get the FWHM value and the wavelength with Omnidriver and LabVIEW or is there an easier way to achieve this?

 

BTW I am using LabVIEW 8.5

 

Attached you can find .vi's I tried to work with as well as a picture of a test spectrum

 

 

I very much appreciate your help.

 

 

Jens

 

Download All
0 Kudos
Message 1 of 6
(3,262 Views)

Hi Jens,

 

Thank you for using National Instruments forum.

 

I had a careful look at the different VIs proposed in LabVIEW. You do not have a VI, which can directly give you the FWHM value.

 

You need to program yourself the calculation.

 

I wrote down here the different steps to find the FWHM:

1. Find the peak with the "Threshold 1D array" VI with max/min array function. But I think you already did it.

2. Look for the Max index (Ind_max)of the Max

3. Search the array for the next value of half the max. Look for its index (Ind_1).

4. Calculate the difference between the wavelength values corresponding to Ind_max and Ind_1 and multiply by 2 to have the FWHM.

 

It works if you have a symmetrical spectrum.

 

Hope that helps.

 

Keep me updated with the evolution of your application.

Julien De Freitas

Applications Engineering Group Leader / Certified LabVIEW Developer (CLD)
National Instruments Switzerland
Message 2 of 6
(3,246 Views)

Hi Julien,

 

first of all thank you for your advice.

I tried it out and in case I have symmetric peaks it works well.

For the case I have non symmetric peaks I did the same with reversed the arrays to get the wavelengths.

 

So right now my VI will automatically detect the highest peak and analyse/calculate its FWHM. But in case I have more than one peak and do not want to detect the highest one, is there a way to set limits to get just one peak (the peak I  want to analyse)? (For example I have 3 peaks at 940nm, 1014nm and 1090nm. The peak at 1090nm the highest one, but I want to analyse the peak at 1014nm)

 

Thank you in advance.

 

Jens

0 Kudos
Message 3 of 6
(3,231 Views)

Hi Jens,

 

Could you tell me the LabVIEW 8.5 package you have? Do you have the base package or the full development system?

 

If you have the full development system, you can use the Peak Detector VI.

http://zone.ni.com/reference/en-XX/help/371361D-01/lvanls/peak_detector/

 

If not, you need to program yourself the peak search. I can give you some clues.

 

Regards,

Julien De Freitas

Applications Engineering Group Leader / Certified LabVIEW Developer (CLD)
National Instruments Switzerland
0 Kudos
Message 4 of 6
(3,228 Views)

Hi Julien,

 

thanks for your fast answer. I use the full development system at work. At home I just have a Students Version.

Thanks, then I will try out the Peak Detector VI, but it would still be nice to give me some clues to program the peak detector by myself to try it out at home.

 

Thank you,

 

Regards

 

Jens

0 Kudos
Message 5 of 6
(3,226 Views)

Hi Jens,

 

The NI LabVIEW Student Version has the same functionality as LabVIEW Full Development System.

http://sine.ni.com/nips/cds/view/p/lang/en/nid/210866

 

Keep me updated with the evolution of your application.

 

Regards,

Julien De Freitas

Applications Engineering Group Leader / Certified LabVIEW Developer (CLD)
National Instruments Switzerland
0 Kudos
Message 6 of 6
(3,224 Views)