LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

FWHM with peak detector

Solved!
Go to solution
If Ni had the written the function you want, it would be part of the distribution. You are just making things up by supposing this algorithm exists in some dark hidden office somewhere. You've been told how to implement yourself. You seem to think each and every oddball measurement function is supposed to be handed to you.
0 Kudos
Message 21 of 29
(1,500 Views)

"every measurement function" here is what they advertise "... Integrating all the tools that engineers and scientists need"
how about the most common functions necessary. Why even supply the dx function then. Heck not using in might even make my life much simpler and Not so hard to do!  NI does make equipment that uses this functionality so the code exist and NI has it. Not a stretch. mathematical integration function is available on all modern digital oscilloscope and they don't make you write the code you're self. To suggest that NI doen't have the code for it but they supplies the FFT ???  The whole point of this package is to NOT have to do all this scurrying around to to such common programing tasks.
all the "tools" not quite not in this case. The VI should calculate the area under a peak. You see I actually have science to do.
If I wantted to deal with all this low level programing I could have sloged through doing in in ansi C
Now I am back to doing the parts I though I was purchasing.
Just to be clear at what I am gettimg at this is from their web site
" Integrating all the tools that engineers and scientists need to build a wide range of applications in dramatically less time, LabVIEW is a development environment for problem solving, accelerated productivity, and continual innovation."

0 Kudos
Message 22 of 29
(1,465 Views)

Now I see what the problem is.  You're completely confused.  "integrating all the tools that engineers and scientists" needs does NOT mean "includes every algorithm known to man" as you've interpreted it.  In fact, this is an INSANE way to interpret this.  It means the software is designed to bring the various tools you use to conduct your experiments, or tools, together so that you can have a central control interface.

 

Your argument is they've included the FFT so they should include everything else that might possibly be easier?  The FFT isn't that hard of an application.  It's also quite a bit easier than what you're asking for.  You're NOT asking for something as simple as integrating under a curve.  You're wanting to put together an algorithm that finds peaks in a curve, determines when the peak starts and ends while not being tricked by noise, and ignores the rest of the curve.  There's a lot to that.  If you'd spend any of the time you've spent bumping old threads and throwing tantrums about this, you'd be well on your way to having a successful implemetation.  If you tried things and posted what you're trying, you'd be getting help instead of being told to act like the professional scientist you are.  These things SHOULD be obvious to you.

0 Kudos
Message 23 of 29
(1,454 Views)
In all my years of LabVIEW, I've never had need for this highly specialized function. You may think that your discipline is the most important out there but that it's just egotistical and wrong. You are just speculating about the existence of the algorithm and have some fantasy about hardware you will not even mention. Even if some hardware does something similar, code in firmware or an fpga is not at all the same as LabVIEW. You are just a troll.
0 Kudos
Message 24 of 29
(1,441 Views)

No sir it is you that are confused... it says the I am not doing to do low level programing... and he area under the curve is not some random esoteric function. The point about the FFT is that with the click of a mouse you can build a skyscraper but to put wheel blocks under my trailer I have I have build a new house.
You say
"You're NOT asking for something as simple as integrating under a curve.  You're wanting to put together an algorithm that finds peaks in a curve, determines when the peak starts and ends while not being tricked by noise, and ignores the rest of the curve."
labview was supposed to make it EZ. and as I said to think that they didn't figure this out in their equipment is ridiculous
SO!  you know exactly why I bought labview, I wanted NI to put together an algorithm,  that's it in a nut shell and given the hype they should have give such functionality.
If NI finds all that so daunting it's hard to understand how they came up with a FFT or many of the other modern miracles they preform! Why would I purchase this package for my company expecting the most basic of functionality when they promise the moon....
They sent me here to this site to get some answers ! Thanks for making matteres worse!
you're supposed to have an answer not start a pissing matches with new costumers ..

0 Kudos
Message 25 of 29
(1,430 Views)
You still are assuming that your need is overwhelmingly important and the algorithm is vital to the vast majority of users. Since you bought LabVIEW without a basic review of what it actually came with, out is your fault. Since you seem incapable of duplicating what others have done, that is your fault. Since all that you do seem capable of is whining, you just can't be taken seriously. It is NOT basic functionality except in your delusions of self-importance.
0 Kudos
Message 26 of 29
(1,420 Views)

You missed two key points.  They are your entire problem.

 

1) The FFT is used more than your algorithm

2) The FFT is a less complex algorithm than yours.

 

When you understand those two, you'll do a lot less stomping and pouting.

0 Kudos
Message 27 of 29
(1,402 Views)

It depends on whether you are actually fitting the curve shape for the FWHM or just want a simple FWHM. 

 

The later is not difficult to implement.

 

You can use a plot with cursors (need to use the property node for the graph to select the data and split the data array accordingly) and search the array of data between the two cursors for the maximum.

I would substract the average of the cursor Y values from the maximum, call it a Z = 1/2 * (maximum - average of the cursor Y values).

 

Note: if you don't subtract the average of the Y cursor values and you have a background the value of the FWHM can be WAY off.

 

Then, search the Y array for the first number >= Z, note the X position of that data point

Then, continue searching the Y array for the first number <= Z, note the X position of that data point.

Finally, substract the found X values (if no scaling is given this will simply be the difference of the index).

 

Not that difficult, but yes more difficult than if a VI existed.  However, you would still need to select the data from the array that you wished to send to the FWHM.vi

 

It is acually fun to learn the ins and outs of all the property nodes for the graph. There is a lot of power in thegraph property nodes (select plots, label the axes from column headers, etc.). 

I have written several porgrams to load/plot data for analysis in the past, it is great to customize the data analysis, it is a real time saver.

0 Kudos
Message 28 of 29
(1,346 Views)

@jfxcoll wrote:

No sir it is you that are confused... 


I don't think we're confused but you're obviously pretty lazy.  

 

Have you not bothered to just do a quick search to find the functionality you need???  Smiley Frustrated  

Sheldon has a nice Gaussian Fit VI that includes the FWHM for example:  http://www.quadesl.com/labviewCode.html  Tweak it to your own application and you're good to go... Smiley Very Happy

 

LabVIEW is a programming language so expecting it to have every possible function is quite unrealistic.  I love Python too for its "batteries included" mentality but if a particular function is not available I go search around to see if someone else has done it and if not, I code it up myself.  That's life man, suck it up.

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019 - Unfortunately now moving back to C#, .NET, Python due to forced change to subscription model by NI. 8^{
0 Kudos
Message 29 of 29
(1,335 Views)