title: Calculate the magnitude and phase of a signal at a particular frequency in python
body: <p>I have a signal for which I need to calculate the magnitude and phase at 200 Hz frequency only. I would like to use Fourier transform for it. I am very new to signal processing. And this is my first time using a fourier transform.</p>
  <p>I found that I can use the scipy.fftpack.fft to calculate the fft of the signal. Then use numpy.mag and numpyh.phase to calculate the magnitude and phases of the entire signal. But I would like to get the magnitude and phase value of the signal corresponding to 200 Hz frequency only. How can I do this using Python?</p>
  <p>So far I have done.</p>
  <pre><code>from scipy.fftpack import fft
  import numpy as np
  
  fft_data = fft(signal)
  magnitude = np.mag(fft_data)
  phase = np.phase(fft_data)
  </code></pre>