views:

193

answers:

2

I am porting code from Matlab to Python and am having trouble finding a replacement for the firls( ) routine. It is used for, least-squares linear-phase Finite Impulse Response (FIR) filter design.

I looked at scipy.signal and nothing there looked like it would do the trick. Of course I was able to replace my remez and freqz algorithsm, so that's good.

On one blog I found an algorithm that implemented this filter without weighting, but I need one with weights.

Thanks, David

A: 

It seems unlikely that you'll find exactly what you seek already written in Python, but perhaps the Matlab function's help page gives or references a description of the algorithm?

SamB
A: 

This blog post contains code detailing how to use scipy.signal to implement FIR filters.

rlotun
Well, that was intereseting blog post, but not exactly what I was looking for. I saw the firwin( ) function, but it does not have have the ability to express the frequency response the way I need it for Magnetic resonance imaging... I was hoping not to reinvent the wheel, but it's looking more likely that I will need to do that.Thanks,
delicasso