02-17-2012 09:11 AM
I'm collecting a data array and saving it to a spread sheet. I can plot this on an xy graph however in order to process the data i need to separate the curve into separate gaussians. In theory decimating the curve should do what i need but I can't figure out how to make this work. Can i do this using point by point, or is there a way of converting each line into a wave to process it in this way?
The attached files are the basic vi that im using to read the saved file and an example file. I haven't included any of the errors as i've made as they haven't worked. I hae tried a simple guassian fit but as the peaks are overlaid on each other it isn't working and i feel sure that theres a better way of doing it than multiple iterations of this, particularly as the number of peaks varies.
02-22-2012 04:11 AM
Hello and thanks for using the forums.
If I understand your query correctly, you would like to be able to split your data into separate plot instances on the same XY graph in the simplist way possible. I have attached an altered version of your VI which will plot each gaussian separately.
If I've misunderstood your query please feel free to provide some further clarification.
02-22-2012 04:44 AM
Almost. Each data line contains a number of gaussians, which i need to track from instance to instance. I understand the deconvolution vi should be able to decompose the signals in this way but needs an x*y and a y input, where as i only have the x*y. I may of course have completely the wrong understanding of deconvolution in this application.....
Thanks for the time!
02-22-2012 06:01 AM
Ah yes I can see now, each data curve has a number of gaussians within it. You mention that what you need to track is each instance of a gaussian, is this regardless of it's size/value? You can use the peak detect VI to do this when configured appropriately.
Deconvolution would require you, as well as the convoluted line (X*Y), to know the waveform which you wish to deconvolve. So I don't think that is what you are looking for in this instance.
02-22-2012 06:52 AM
I'm trying to compare the relative intensities of some of the gaussians, the problem being that they overspill into each other. I've tried running the peak detection for this purpose but the very intense section affects the less bright sections surrounding it. This is why i was hoping to be able to deconvolve the curve. As you say i know that I need to deconvolve gaussian forms, just not the exact form they take.
02-22-2012 10:35 AM
Thanks for the additonal info. I'm afraid I'm not sure how you will be able to deconvolve the gaussian forms from the main curve without knowing the main function itself as this is one of the requirements for standard deconvolution.
With the curve as it is and without knowing the main function which you wish to extract, I can't think of a way to isolate the individual gaussians as you describe. The main way I can suggest experimenting further with is using the Peak Detector VI taking both the amplitude and 2nd derivative outputs to determine the sharpness/intensity.
02-24-2012 12:00 PM
I don't have/know Matlab so the following is no use to me, but is there a simple way to implement it in labview?
02-27-2012 03:41 AM
There are functions under the mathematics palette such as Guassian Peak Fit which can perform some of these operations to an extent, however you can also implement a Matlab script using a Matlab node if there is a .m file you'd like to try and use. This would require a licensed version of Matlab to be installed in order for LabVIEW to access the script server, but it can be useful for complex mathematical operations to perform them within a script.
02-27-2012 09:07 AM
There is a shipping example that demonstrates fitting data to three gaussians. This is easily extended to more or less than three.
\LabVIEW\examples\math\curvefit.llb\Fit sum of 3 Gaussians with offset.vi