取消
顯示結果 
搜尋替代 
您的意思是: 

peak counting with burst counting, etc

已解決!
前往解決方案

I am trying to write a program that counts peaks (+ spikes) and valleys (- spikes) and bursts (defined as 3 or more peaks in a row with 1 msec or less in between them) and peaks and valleys that are within 1 msec of each other.  The peak counting part is easy but I am doubting myself on the other parts. Can someone take a look and let me know if I am way off base? Right now I don't have any data to test it but the signals we are looking at are EEG-like (actually looking at individual neuronal cells and recorded signals from Microarrays). thanks

0 積分
1 條訊息(共 5 條)
3,204 檢視

mtgjbird01,
I looked over your code, and it looks like it should work.


As you know, this is difficult to determine without real data.


My recommendation would be to create some simulated data and feed this into the VI to test it. The easiest way to do this would be to create a 1D array of values, and feed it into both Peak Detector.vi's in place of your blue Signal input.

Jared A.
Applications Engineer
National Instruments
0 積分
2 條訊息(共 5 條)
3,175 檢視

Thanks for looking at it.  I will try using some simulated data.  My major concern is in the part of the program that counts events with both + and - parts to them - I am a little worried that this may be overestimated if there are several peaks of one kind (say + peaks) within 1 msec of each other because I have the time of peak data from both the + peaks and - peaks combined into an array and then sorted ascending and this doesn't take into account whether the peaks are + or -.  Is there a way to assign some kind of value or index to each time of peak value to ensure they are looked at singly?

0 積分
3 條訊息(共 5 條)
3,164 檢視
解決方案
接受者 mtgjbird01

mtgjbird01,
The main issue you are running into is merging the (+) and (-) peak arrays. When you do so, you can no longer tell whether the item is a (+) or (-) peak.

 

We need some way of saving this information, and then still being able to sort. This can be done by Bundling the Double value with a Boolean, then applying the sort. After the sort, we will still know whether it is a (+) or (-) peak based on the Boolean Value.

 

Sort Bundle.png

 

 

Jared A.
Applications Engineer
National Instruments
4 條訊息(共 5 條)
3,152 檢視

YAY! Thanks! you are the best!極度高興的表情

0 積分
5 條訊息(共 5 條)
3,138 檢視