# Tag Info

Accepted

### How to get scipy remez to give matlab firpm answer?

The firpm and remez commands return symmetric linear phase filter solutions. In order to create a symmetric linear phase high pass filter, you must have an odd number of taps (Type 1 filter, see chart ...
Accepted

### Why is Scipy implementation of Hilbert() function different from Matlab implementation of the function?

It works fine for me: ...
Accepted

### Are IIR filters (and specifically Butterworth filter) causal?

Yes, Butterworth are IIR. The decay from an impulse technically lasts forever. Yes, all [implementable] IIR are causal. Yes, because of #1 and #2. Don't use ...
Accepted

### Scipy filter analog vs. digital

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 ...
Accepted

### Why is implementing a digital LPF with low cutoff frequency but high sampling frequency infeasible?

Also, any advice related to how to implement a 100 Hz cutoff LPF on a signal with a high sampling frequency would be appreciated. Easy: use second order representation (...

### Why is implementing a digital LPF with low cutoff frequency but high sampling frequency infeasible?

In addition to Hilmar's good comments in his own answer, see this question as well as Rick Lyon's interesting blog post which shows similar pole pattern graphs, demonstrating why very low cut-off ...
Accepted

### Scipy resample, "fourier method" explanation

Suppose you have initially a real-valued sequence x of length N. The function is basically doing this: To upsample, it ...
Accepted

### Designing digital low pass filter with low pass-band group delay

Minimum phase filters will not give you a near constant group delay. You can design a non-linear phase FIR filter with a linear desired passband phase with a specified group delay that is smaller than ...
Accepted

### Why does scipy introduce its own convention for H(z) coefficients?

I agree with the OP's annoyance in that two conventions are used and believe it comes down to what is commonly used in filter design vs what is commonly used in control systems. However the only ...
Accepted

### Calculating values of frequency bins in Python

This is simply how Discrete Fourier Transform (i.e. Fourier Transform theory applied on sampled signal) works. You get an output of length N if your input has ...
Accepted

### Delay in Savitzky-Golay filtering

Standard Savitzky-Golay filters are linear phase (type I) FIR filters. So they have an odd number of filter coefficients $2N+1$, and the delay equals $N$. For a good overview of Savitzky-Golay ...

### Python Hilbert does not seem to calculate the envelope

Hm well, technically it is some kind of envelope: it oscillates between hilbert(x) and -hilbert(x). Your examples (dashed lines ...

### What Are The Semantics Of Wav-File Sample Values?

I don't know much about this semantics? of WAV files but their numerical format is the following. (assuming mono) Given a recording with 8-bit per sample precision, then those samples are unsigned ...
Accepted

### Apply FFT to positive spiky signal

When calculating the frequency correctly as the inverse of the period, instead of the inverse of the period times 2 pi, the fft does indeed give the expected answer.
Accepted

### IIR design: SciPy CMSIS-DSP coefficient format

scipy.signal returns a sos matrix when you set output='sos', which is cascaded second-order sections and has a shape of ...

### Why does changing the format of an audio file from int16 to float produce jitter?

The reason for this is that wavfile.write supports different number ranges for different data types. The Valid ranges are WAV format Min Max NumPy dtype 32-bit ...
Accepted

### Constraints on number of taps in a FIR filter vs. FFT length

I think you got it backwards: the number of taps is determined by your filter requirements (cutoff frequency, steepness, attenuation, etc). The FFT length is then derived from the filter length, not ...