[SciPy-user] remezord for scipy; ticket 475

Günter Dannoritzer dannoritzer@web...
Sun Mar 15 07:03:13 CDT 2009


Hi,

A while back I asked about the remezord() function here on the mailing
list and got the reply that unit tests will be needed in order to add it
to the SciPy. I had sent some questions concerning the functionality to
Lev who provided the function and he agreed on moving this discussion to
the mailing list.

So below are my questions and Lev's reply.

Guenter


Lev Givon wrote:
> Received from Günter Dannoritzer on Fri, Feb 20, 2009 at 05:33:16PM EST:
>> Hi Lev,
>>
>> I saw you provided a patch to support remezord() in scipy with ticket #475:
>>
>> http://scipy.org/scipy/scipy/ticket/475
>>
> 
> Hi, Günter. Glad to see that someone besides myself finds the above
> function useful :-)
> 
>> Unfortunately this patch is not scheduled for any release yet due to the
>> missing test cases. Now I am trying to figure out how difficult it would
>> be to add test cases and was wondering whether you could give me some
>> hints for them.
>>
>> Basically what I see is that remezord() actually is based on three
>> functions, using methods from Kaiser, Herrmann, and Ichige papers to
>> compute the required order for a filter.
>>
>> What I am having a hard time with is how to verify the proper function
>> of those algorithms in self-checking tests. I can see that some simple
>> parameter checking can be done, but then, how to determine that the
>> results are correct? One way would be to calculate the actual filter
>> after the order estimation and make sure that the transfer function is
>> within the specified window. Maybe calculate further transfer functions
>> with reduced order and make sure that the specified transfer function is
>> not met anymore within a specified error range?
> 
> Rather than checking whether the transfer functions determined by the
> remez() function actually satisfy the filter design parameters passed
> to remezord(), wouldn't it be preferrable (and possibly more feasible)
> to check that the my implementations of the various filter order
> estimation functions actually produce the output values described in
> the respective papers where they are described? As far as I can
> gather, numpy tests should check whether an algorithm implementation
> is correct on the assumption that the underlying algorithm is correct.
> 
>> Like allow the calculated order to be +/- 1 or 2 within the actual
>> minimum order that can be calculated with the remez() function and meets
>> the required transfer function?
> 
> Not exactly sure what you mean. The Remez algorithm computes a filter's
> coefficients given a specified filter order; it cannot calculate the
> minimum order itself.
> 
>> Next question would be how complex to do the transfer function? Just
>> low, high, band pass filter and stop band filter? Then vary the corner
>> frequencies?
>>
>> I was not sure whether you are still subscribed to the scipy user
>> mailing list and send you this mail direct. If you are still subscribed
>> we could just move the discussion to the mailing list.
> 
> Yes, I am subscribed to scipy-user; feel free to continue the
> discussion there. I'm interested in feedback from others so that I can
> learn a bit about writing numpy tests myself in the future.
>  
>> Thanks for your ideas.
>>
>> Cheers,
>>
>> Guenter
> 
> 							L.G.
> 



More information about the SciPy-user mailing list