Click here to Skip to main content
15,881,882 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Hello
I have a program in C# that takes two vectors X (t) and Y (mV), and plots using MSChart Visual Studio 2010. The plotted graph shows several peaks, would automatically identify the following graph:

-> Beginning and end of each peak;
-> Identify on the program the number of peaks;
-> Identify the value of each peak and at what time it occurs.

Thank you for your attention.
Posted
Comments
Sergey Alexandrovich Kryukov 12-Mar-14 17:51pm    
Is anything known about the mathematical model of the sampled function? any theory? Because, in its general form, the problem is pretty difficult.
—SA
Matt T Heffron 12-Mar-14 18:08pm    
I'd suggest changing your display name NOT to be your email address UNLESS you really like SPAM!
The email address harvesters look EVERWHERE!
When people reply to your question, you'll get an email.
[no name] 12-Mar-14 19:20pm    
Do you know any maths? I am serious because the answer really involves maths. You haven't said what it is you are plotting with these 2 (technically) scalars. Is it a continuous function. eg are you reading the output of some device which produces a continuous voltage and sampling at a fixed interval. This should all be in your question.
BillWoodruff 12-Mar-14 22:48pm    
Evaluating the relative complexity, or simplicity, of what's involved in achieving your three goals here requires you to tell us more about your code. Specifically, we need to know if you have access to the "raw data:" if you do, then why can't you analyze the data, and develop the summary information you need ?

Second, we can infer from goal three that there is a time-series involved here. Is time one of the axes of the resulting chart ?

Describe the data in detail, and, perhaps, we can assist.

1 solution

This is not such a simple problem that it may seem.

First of all, you need to totally isolate the analysis of data, and charts, data presentation. Data presentation should only be used as output, never be a source of data. So, let's forget about charts and focus on data.

I don't know the semantic of your data; it does not really matter. For a minute, let's imaging this is some statistical distribution. Even if it is not, you could possibly use the algorithms developed for statistics. Then the peak could be called a mode of distribution: http://en.wikipedia.org/wiki/Mode_%28statistics%29[^].

Your case would be the case of multi-modal distribution: http://en.wikipedia.org/wiki/Multimodal_distribution[^].

The problem appears to be more complex because you don't provide any assumption on the function describing your sample data. In general case, the problem is quite difficult. Please see:
Please see:
http://www.itwm.fraunhofer.de/fileadmin/ITWM-Media/Abteilungen/BV/Pdf/wirjadi08-branch-and-bound.pdf[^],
http://www.stat.tamu.edu/~jchown/NKCreport.pdf[^],
http://books.google.com/books?id=QKxmYCgHn20C&pg=PA58&lpg=PA58&dq=algorithm+find+modes+of+%22multimodal+distribution%22&source=bl&ots=8MVmMHxT-a&sig=avQVC8T-tRwHS3YS6zi76rAVa0w&hl=en&sa=X&ei=X9YgU5n0Nabx0gGhrIDgDg&ved=0CEwQ6AEwBQ#v=onepage&q=algorithm%20find%20modes%20of%20%22multimodal%20distribution%22&f=false[^],
http://books.google.com/books?id=uY-Z3vORugwC&pg=PA54&lpg=PA54&dq=algorithm+find+modes+of+%22multimodal+distribution%22&source=bl&ots=QKu8TbTVz6&sig=glZ6BiCjdbXrV_HzVpPDyJL1biw&hl=en&sa=X&ei=X9YgU5n0Nabx0gGhrIDgDg&ved=0CLIBEOgBMBI#v=onepage&q=algorithm%20find%20modes%20of%20%22multimodal%20distribution%22&f=false[^],
http://www.peerevaluation.org/data/bbf94b34eb32268ada57a3be5062fe7d/tbme-SShahid-2026734-proof.pdf[^].

See also this short reviews of available approaches to general pike detection: http://www.ncbi.nlm.nih.gov/pmc/articles/PMC2631518[^].

Probably, the solution for some special cases would be much easier. For example, maybe your pikes are thing and well isolated; then you could think of something pretty simple, perhaps heuristic.

—SA
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900