MartinP Posted June 21, 2007 Report Share Posted June 21, 2007 I'm using "Peak Detector.VI" to detect the peaks in data coming from a MassSpectrometer in the lab. The raw data contains some noise that makes the subroutine detect not real peaks, and miss some real peaks. To minimize this problem I thought I should smoothen out the raw data, and tried the "Savitzky-Golay filter.VI". The data (curve) looks much better afterwards. The only problem is that "Peak Detector.VI" is not able to find a single peak on the data, after they have been filtered by the Savitzky-Golay routine. I cannnot understand why that happpens. Anybody got any idea ? The problem is well illustrated in the attached VI (LabVIEW 8.21). Martin Quote Link to comment
ASTDan Posted June 21, 2007 Report Share Posted June 21, 2007 Hello Martin, I amplfied the signal that you used the filter on by a factor of 10 and got the Peak detector to work. You would have to multiply by .10 to get the data back to the format you need. My theory is since the data values you are using are very small the peak algorithim doesn't like it. Does anyone else have a better solution or can explain why this occurs. Interesting problem. Dan Quote Link to comment
rpursley Posted June 21, 2007 Report Share Posted June 21, 2007 I observed the same behavior. I had to scale by a factor of 7 before the filtered peaks would be detected at all. At this point I could change the width to 10-15 (which is a more appropriate range for this data) and still get good results. Before, only a width of 3 would work for the unfiltered data. I usually do not see this behavior when I do peak detection because I normalize my data before peak detection so I can select a percentage of the max value of the data as my threshold, instead of a fixed value. Randy Quote Link to comment
McKman Posted June 22, 2007 Report Share Posted June 22, 2007 Hello Martin I read about your problem on Info-LabView. I had similar problems analyzing data in the lab here. I was having problems consistently finding peaks when the data peaks may be sharp or rounded. I decided to build my own tool to look for peaks and came up with the attached Peak Search solution wired into your example. It has worked very well for me. See if it offers the functionality you want (or what you actually need as opposed to what you want ;-). Mark Quote Link to comment
wevanarsdale Posted June 22, 2007 Report Share Posted June 22, 2007 Martin: The first derivative is known as part of the smoothing algorithm (see reference). This derivative can be calculated using the example shown in the LabVIEW 8.2 help for Savitzky-Golay Filter Coefficients.vi. The attached VI does cubic smoothing based on the reference. Perhaps you could modify this VI to also generate the first derivative and check for zeros. I hope this helps. Bill http://forums.lavag.org/index.php?act=attach&type=post&id=6182 Quote Link to comment
Anders Björk Posted June 23, 2007 Report Share Posted June 23, 2007 QUOTE(MartinP @ Jun 20 2007, 02:21 PM) I'm using "Peak Detector.VI" to detect the peaks in data coming from a MassSpectrometer in the lab.The raw data contains some noise that makes the subroutine detect not real peaks, and miss some real peaks. To minimize this problem I thought I should smoothen out the raw data, and tried the "Savitzky-Golay filter.VI". The data (curve) looks much better afterwards. The only problem is that "Peak Detector.VI" is not able to find a single peak on the data, after they have been filtered by the Savitzky-Golay routine. I cannnot understand why that happpens. Anybody got any idea ? The problem is well illustrated in the attached VI (LabVIEW 8.21). Martin Is the peaks in your VI-representative for your massspectra? What type of Mass is it? I would try build a moving maximum estimator, to find some approximate peak-positions. I did a work with other co-authors on MALDI-TOF spectra, we fitted two gaussians to each peak and gained information thereby. M Kempka, J Sjödahl, A Björk and J Roeraade, 'Improved Method for Peak Picking in MALDI-TOF/MS', Rapid Commun. Mass Spectrom. 18 (2004), 1208–1212 Otherwise using wavelets to denoise would be wise, my opion is that it would more suitable than SG. Another option is to find the peaks in wavecoefficents and then back transform. Quote Link to comment
ZZZZZZ Posted June 29, 2007 Report Share Posted June 29, 2007 Can anyone post the Demo Peak Detecor.vi FP- and Block Diagram-Images here? Just curious. I don't have LV 8. Quote Link to comment
ZZZZZZ Posted July 1, 2007 Report Share Posted July 1, 2007 I found some Peak Detection here: http://www.originalcode.com/programs_scientific.html Maybe there is something to learn? Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.