-1

I have a signal with several tones and want to know where a given tone starts and where it ends.

At first, I am applying a band pass filter and transform the signal (fft) in order to know if the recording has the tone.

Now, I get the filtered signal in the time domain (figure). It was suposed to be from 0ms to 276ms (red line). Keep in mind that this tone might be shifted in time (from 150 to 426ms).

plt.plot(time_, np.abs(signal))

How can I detect where the tone starts and ends using scipy?

Dayvid Oliveira
  • 1,157
  • 2
  • 14
  • 34
  • 1
    I don't think this is a programming question. In fact I think the question has no objective answer, since a tone is a superposition of frequency components each of which extends throughout all time. It has, therefore, no precise beginning or end. – Paul Cornelius Feb 20 '16 at 01:02
  • Start by plotting a spectrogram. (I've voted to close this question though since, as posed, it's more about signal processing than programming.) – tom10 Feb 20 '16 at 04:53
  • The question would most likely get better answers of at the dsp.stackexchange: http://dsp.stackexchange.com/ – hotpaw2 Feb 20 '16 at 19:31

1 Answers1

0

Determine the form (run fft, define frequency response, perform signal synthesis) of your 'tone' and run a cross-correlation function. You'll be able to detect the emergence of your 'tone' as the cross correlation function will have a higher value after the 'tone' begins (which will go up and down since signal is periodical).

archived
  • 647
  • 8
  • 24