From: ImageAnalyst on
OK, thanks for posting your signal. But all I see is a noisy signal
without any context. When you mean "detect spikes" what do you want
to do? Do you want to keep the spikes, or get rid of them? Is it
important that you know the "width" of the spikes? If so, how do you
define width? Base width, or full-width-half-max? What defines a
spike? Virtually every third element is a spike of some height as
near as I can tell. How big does a spike have to be before it's
detected as a "true" spike and not just small, localized noise?

Have you done anything yet? Did you look up the references I gave
you? Or try the median filter like I suggested? Or the outlier
program? Did you try findpeaks in the Signal Processing Toolbox? Did
you try a search of the FileExchange? Or the internet (http://
billauer.co.il/peakdet.html)? Have you tried anything at all? If so,
were any acceptable? If not, why not?

Try something and get back to us if it's not acceptable.
From: Walter Roberson on
Luna Moon wrote:
> On Jun 11, 5:16 pm, Clay <c...(a)claysturner.com> wrote:
>> On Jun 11, 2:12 pm, Luna Moon <lunamoonm...(a)gmail.com> wrote:

>>> I have very spiky signals. Visually it's very easy to detect spikes,
>>> but how do I detect spikes in a computerized appraoch?

> Here is my signal:
> http://img810.imageshack.us/img810/5043/spikes.jpg
> any thoughts?

At 2000, the narrow line, is that a trough or negative spike? Just after
that is apparently a double peak, but is one of them a spike instead? At
400-ish, is that a double spike or a peak there? At around 1400, that's
obviously a spike, but there are points on either side that are higher
than anything else on except one point at around at 1250 -- why is that,
are spikes wider than the sampling frequency?
From: Fred Marshall on
Luna Moon wrote:
> On Jun 11, 5:16 pm, Clay <c...(a)claysturner.com> wrote:
>> On Jun 11, 2:12 pm, Luna Moon <lunamoonm...(a)gmail.com> wrote:
>>
>>> Hi all,
>>> I have very spiky signals. Visually it's very easy to detect spikes,
>>> but how do I detect spikes in a computerized appraoch?
>>> thanks a lot!
>> Given the sketchy details. I'd hazard a guess at something like run
>> your data through a median filter and subtract that result from a
>> equivalent delayed version of the original signal to emphasize the
>> spikes. Then maybe you can threshold detect the spikes. How well this
>> works really depends on how much different your spikes are from real
>> desired features of your signal. Like a lot of parametric signal
>> processing, you have to play around with it to see what really works.
>>
>> Clay
>
> Here is my signal:
>
> http://img810.imageshack.us/img810/5043/spikes.jpg
>
> any thoughts?

Can you label the plot showing which features are what you'd call spikes
that would be desirable to detect somehow?

Or, are you wanting someone else to define what a spike is in this
signal AND to tell you how to detect such things?

Fred
From: Fred Marshall on

How to detect a spike:

Establish detection criteria:

- Signal peak X% larger than the surrounding mean over (Z seconds) ...
or if not this then what?

- Duration less than Y seconds ... or if not this then what?

- Periodic (sometimes they are).... or not this?

etc.

Fred




From: Avier on
i think the idea is right to use mean or a median filter

both can work ,,,although the signal is very noisy but by setting proper
threshold ,spikes can be detected


for the filter simply start a loop ,,take three values (or as you require)
at a time divide by three ,, ,if above threshold ---alarm
on the center sample (out of 1 2 3 saples peak at 2 nd)

easiest way as i can think