Pattern detection


I am trying to figure out how to detect a signal and return a boolean if a pattern is found or not.
I attached 2 plots to illustrate my issue.
The first plot is a typical plot, without signal, but it may vary a bit. The background is starting from 0.8 in general, but from time to time might start later or drop earlier.
The second one is the same but with signal. (~ damped wave signal+background)
test2.pdf (41.0 KB)
test2.root (13.8 KB)

I already tried many methods, but this wasn’t fully working.

  • Using damped wave fit ([0] + exp(-[1]*x)*sin([2]*x+[3])) . I could not make it work, automatically. One fit by hand is ok when there is signal. But as this is not really a clean signal, this allied signal might be superposition of many signals, therefore many fits are failing…
  • I tried FFT, I see some peaks, but as I am not sure about the frequencies I am expecting… not sure this is a good observable. As other profiles are also showing some frequencies… not sure I can safely extract the frequencies generating this signal and tell about the shape… the signal looks like a continuum of frequencies, perhaps I do not sample enough.
  • TSpectrum + Gaussians, but the algo is not converging… Perhaps gaussian are not appropriate here

In addition to the difficulty of extraction, as said before the pattern is similar but not exactly the same each time… (shape of the background is changing a bit starting later of finishing earlier)
Therefore I wondered if someone knows about some signal processing methods, in order to tag my plots as “signal” or background. I saw MLP algorithms, but I never tried. Does someone have some feedback about it ?

Thank you very much in advance,

Hi Marco,

I cannot provide you with a solution, but maybe some ideas:

  • One thing that comes to mind is that you can rebin (at least /2 or /4), to make the background more smooth.
  • You can try to come up with an empirical function for the background and fit it. Then you fit a signal+background model and make a goodness-of-fit test. The damped wave fit might be a good starting point for a signal model, but it will certainly not fit the background. Ask yourself if there is a way to tell which function you could use to describe it. (What’s causing this background shape?)
  • An FFT certainly is an option, but you usually have to work a bit to get it working reliably. Maybe go with the other proposals first.
1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.