10-28-2022 03:16 PM - edited 10-28-2022 03:18 PM
Hello
I am having an issue when using peak detector.vi for finding peaks from mass spectrum (atomic masses vs intensity).
When I wrote code first time i just used two rows from the actual file to test. once testing was done, i used the actual file where the file structure is bit different.
I am attaching my vi with two csv files. file 1 is just two rows, manually created from a file, same as file 2. file 2 is what the actual file would be.
the peak detection works for file 1 but not for file 2!
I am unable to find the difference between the two files, but surely something i am overlooking.
PS: please keep all these three files in same folder, when you test this on your end.
10-28-2022 03:32 PM
I suggest you back-save (Save as Previous...) to LabVIEW 2018 or so if you want more help. Many of us have locked in at earlier versions to avoid the new subscription plans.
10-28-2022 06:49 PM
Hello NIquist
Thank you for the suggestion. I saved to the LabVIEW 2018 version and reposting it.
10-31-2022 12:01 PM - edited 10-31-2022 12:03 PM
Wow, now I wish I hadn't said anything! 😲 I have looked at the raw data in Excel as well as your VI where I added a bunch of probes and extra indicators and I can't see why the peak detector VI is having trouble with the real data. I thought you might have shifted the locations later in your math but nope. There is only that one extraneous peak point even though the detector should find many.
I don't have time to delve deeper this afternoon but I will try to look at it later. Hopefully one of the brainiacs here will chime in and make us both look stupid. 😜
EDIT: BTW, try to avoid hiding indicators as it makes troubleshooting more difficult. Just move them out of the way or to an unused tab.
10-31-2022 01:39 PM - edited 10-31-2022 01:41 PM
10-31-2022 01:46 PM
Hello NIquist,
Thank you for looking into it. Your assesment confirms that i am not completly losing my mind!
I hope someone finds out what is going on...
10-31-2022 01:53 PM
Hello GerdW
Thank you for looking into this.
So does it mean that Peak Detector is failing due to low thresold value?
However, the file 1 and file 2 data collected on same mass spectrometer and the background intensity is in similar range.
I think it is to do something with excel saving, though both are saved as CSV file.
One experiement I did is, through excel, I reogranized file2 as file1 (like just two rows), that also doesn't work.
This is interesting that when you scale up the values (by 100M), you could find the peak for file2!
10-31-2022 02:14 PM
Hi Jpdas,
some algorithms don't "like" values that are different be several orders of magnitude - like yours.
Then it might help to scale them into similar ranges…
(Your last message seems to be temporarily suspended into spam prevention so this answer might make more sense once it reappears…)