I'm playing with Python & numpy to filter audio. It is relatively straightforward to design and us low-high-bandpass/stop FIR and IIR filters, stuff can be done in a couple of lines.

I'm implementing a small software defined radio software, and I need an all-pass filter that has 90 degrees phase shift everywhere, and is flat (as much as possible).

Unfortunately I was unable to find any quick solution for this.

Please share your thoughts on this.

Thank you,


  • $\begingroup$ Welcome to DSP.stackexchange. This site can help you if you need to answer a question of how or why something works, or do not understand a concept, help you devise an algorithm from the domain if signal processing. What you're looking for is more programming - maybe you should flag your own question and request it be moved to stackoverflow.com , it might be more suitable there. Also, try providing the information about what you have tried and which precise part gives you problems. $\endgroup$
    – penelope
    Jan 14, 2013 at 9:43

1 Answer 1


The Hilbert transform will produce a signal with 90 degree phase shift. Look in Numpy documentation at scipy.signal.hilbert as a start.

I'm not sure what you are actually trying to do, but you mentioned 90 degree phase shift and radio in the same post, so you may find the following article of use:


  • $\begingroup$ Thank you Bruce, I missed this part. I'll check the docs. $\endgroup$
    – netom
    Jan 14, 2013 at 16:00
  • $\begingroup$ Yepp, Mr. Hilbert solved my Problem. To put it into python: numpy.imag(scipy.signal.hilbert( <signal array> )) $\endgroup$
    – netom
    Jan 15, 2013 at 6:35
  • 1
    $\begingroup$ Note that hilbert actually computes the analytic signal, you have to take the imaginary part to get the actual hilbert transform. This is copied from Matlab $\endgroup$
    – endolith
    Mar 26, 2014 at 16:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.