[SciPy-user] is there an easy way to extend/continuate a modulo function ?

Stef Mientki s.mientki at ru.nl
Sun Apr 15 15:26:10 EDT 2007



Ryan May wrote:
> Stef Mientki wrote:
>   
>> In comparing different filters, I plot the phase of the transfer function
>>
>>     # calculate the transfer function
>>     h,w = signal.freqz ( filt_coeff[0], filt_coeff[1] )
>>     # calculate the phase angle
>>     w_Phase = arctan( imag(w) / real(w))
>>
>>     
> You could use arctan2 instead of arctan:
>
> 	w_Phase = arctan2( imag(w), real(w))
>
> Ryan
>   
Thanks Ryan,

arctan2 works twice as well as arctan+unwrap ;-)
i.e. it unfolds the from (-pi/1 .. pi/2)  into (-pi ..pi)

But unfortunately, both methods don't seem to work on this specific 
transfer function,
I see a lot "-1.#IND", seems to be a special presentation of "-1",
but don't know what it "really" means,
my wrapper application also seems to have trouble with that.
If I find more details, you'll hear again from me.

cheers,
Stef Mientki







More information about the SciPy-User mailing list