Scipy filter analog vs. digital

It would be greatly appreciated if the usage of the python package scipy's filter (e.g. butter) analog=True argument could be explained. I don't understand what is meant by this (any signal being processed by scipy in python on a computer is discrete and will always be digital?). I an pretty familiar with DSP but have little knowledge of analog signals.

This seems like a simple question, but I have scoured the docs and online forums and not found anything addressing this directly, apologies if I have missed something!

The function butter() doesn't do any signal processing. It is a routine to design a filter, either digital or analog. I.e., it computes the filter coefficients.

I use Matlab/Octave where you have basically the same function. The command

[b,a] = butter(2,1,'s');


designs an analog ('s') second-order filter with angular cut-off frequency $$\omega_c=1$$. The coefficients are b = 1 and a = [1,sqrt(2),1], i.e., the transfer function is

$$H(s)=\frac{1}{s^2+\sqrt{2}s+1}$$

• And the butter function with the time domain set to some number of seconds, or possibly 'd', will design one in the sampled-time ($z$) domain. Mar 9, 2023 at 20:47
• This answer does not actually answer the question. It just explains what butter does and how to use it. What about the difference between analog and digital filters in python?
– Buzz
Oct 17, 2023 at 17:21