Click here to Skip to main content
15,868,141 members
Home / Discussions / C#
   

C#

 
GeneralRe: Linq Query Limitations, more than one query fails Pin
Member 136243255-Feb-18 11:14
Member 136243255-Feb-18 11:14 
GeneralRe: Linq Query Limitations, more than one query fails Pin
Member 136243255-Feb-18 11:20
Member 136243255-Feb-18 11:20 
QuestionPreferred connection to database, config or class? Pin
bjay tiamsic4-Feb-18 12:46
bjay tiamsic4-Feb-18 12:46 
AnswerRe: Preferred connection to database, config or class? Pin
OriginalGriff4-Feb-18 19:59
mveOriginalGriff4-Feb-18 19:59 
GeneralRe: Preferred connection to database, config or class? Pin
bjay tiamsic5-Feb-18 19:48
bjay tiamsic5-Feb-18 19:48 
GeneralRe: Preferred connection to database, config or class? Pin
Pete O'Hanlon5-Feb-18 20:06
subeditorPete O'Hanlon5-Feb-18 20:06 
AnswerRe: Preferred connection to database, config or class? Pin
Eddy Vluggen5-Feb-18 1:18
professionalEddy Vluggen5-Feb-18 1:18 
QuestionPeak Search Algorithm with sliding window and peak excursion Pin
Krellon31-Jan-18 22:46
Krellon31-Jan-18 22:46 
Dear coder/Mathematician folk,

I have a question on how to best peak search a series of noise like points. The points are stored as doubles in a double array. The points represent voltage levels in dBuV.

I'm not a mathematician and I have limited knowledge regarding the elegancie's of how C# can be put to handle complex problems. Or maybe not so complex to some Smile | :)

I would like 'n' points returning that have a delta from there neighbours of >= 6dB and within a specified window of 'm' points.
The window allows us to reject all peaks regardless of delta bar the point with the highest peak.

As we go through the data points we look at each point [DP] with respect to its neighbour. If the delta to left neighbour [P1] is >= 6dB and delta to right neighbour [P2] is >= 6dB we have a peak.

if either neighbours delta is less than 6dB we may have a slope condition. We must there for ride the slope with respect to [P2] goint up and down the troughs until we hit a transition and the delta from [P2] is >= 6dB. This would be our next point.

We repeat the process though all points returning just the peaks that are separated by the window width and have clear >= 6dB margin from there neighbours.

The following data represents a typical trace. Only points 9,11, and 24 are real points that should be returnd.

C#
double[] trace = new double[] {47.92370605,44,49,46.31715393,44.98129654,46.17653275,78,73,82,63,69,41.72979736,41.13000488,41.49586487,37,40,30,40.79894257,40.65593719,41.37298584,39.13498688,55,51,60,39.3440094,38.51491547,42,35.12589264};


I hope I explained things clearly. Please feel free to ask for any clarifications Smile | :)

Many thanks for your time and effort

Nigel
AnswerRe: Peak Search Algorithm with sliding window and peak excursion Pin
Pete O'Hanlon31-Jan-18 22:49
subeditorPete O'Hanlon31-Jan-18 22:49 
GeneralRe: Peak Search Algorithm with sliding window and peak excursion Pin
Krellon31-Jan-18 23:13
Krellon31-Jan-18 23:13 
GeneralRe: Peak Search Algorithm with sliding window and peak excursion Pin
Pete O'Hanlon1-Feb-18 3:32
subeditorPete O'Hanlon1-Feb-18 3:32 
GeneralRe: Peak Search Algorithm with sliding window and peak excursion Pin
Krellon1-Feb-18 4:45
Krellon1-Feb-18 4:45 
GeneralRe: Peak Search Algorithm with sliding window and peak excursion Pin
OriginalGriff1-Feb-18 4:46
mveOriginalGriff1-Feb-18 4:46 
GeneralRe: Peak Search Algorithm with sliding window and peak excursion Pin
Krellon1-Feb-18 5:02
Krellon1-Feb-18 5:02 
GeneralRe: Peak Search Algorithm with sliding window and peak excursion Pin
Pete O'Hanlon1-Feb-18 5:31
subeditorPete O'Hanlon1-Feb-18 5:31 
GeneralRe: Peak Search Algorithm with sliding window and peak excursion Pin
Krellon1-Feb-18 6:30
Krellon1-Feb-18 6:30 
QuestionRe: Peak Search Algorithm with sliding window and peak excursion Pin
Eddy Vluggen31-Jan-18 23:06
professionalEddy Vluggen31-Jan-18 23:06 
AnswerRe: Peak Search Algorithm with sliding window and peak excursion Pin
Krellon31-Jan-18 23:17
Krellon31-Jan-18 23:17 
GeneralRe: Peak Search Algorithm with sliding window and peak excursion Pin
Eddy Vluggen31-Jan-18 23:26
professionalEddy Vluggen31-Jan-18 23:26 
GeneralRe: Peak Search Algorithm with sliding window and peak excursion Pin
Krellon1-Feb-18 0:20
Krellon1-Feb-18 0:20 
GeneralRe: Peak Search Algorithm with sliding window and peak excursion Pin
Eddy Vluggen1-Feb-18 1:37
professionalEddy Vluggen1-Feb-18 1:37 
GeneralRe: Peak Search Algorithm with sliding window and peak excursion Pin
Krellon1-Feb-18 2:47
Krellon1-Feb-18 2:47 
GeneralRe: Peak Search Algorithm with sliding window and peak excursion Pin
Eddy Vluggen1-Feb-18 3:21
professionalEddy Vluggen1-Feb-18 3:21 
GeneralRe: Peak Search Algorithm with sliding window and peak excursion Pin
Krellon1-Feb-18 4:07
Krellon1-Feb-18 4:07 
GeneralRe: Peak Search Algorithm with sliding window and peak excursion Pin
Eddy Vluggen1-Feb-18 9:25
professionalEddy Vluggen1-Feb-18 9:25 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.