hcrisp

03-13-2009, 10:04 AM

I posted this yesterday, but it looks like it got deleted.

There appears to be an error in FREQRESP_Z whenever the keyword NPOINTS is greater than the filter length. FREQRESP_Z chooses a different NPOINTS to calculate the result, but does not go back and recalculate OUTFREQ with the new NPOINTS.

h = firdesign(400, 0.1, /lowpass)

result1 = freqresp_z(h, 1000, outfreq=f1)

result2 = freqresp_z(h, 100, outfreq=f2)

; %%%FREQRESP_Z: Using 400 points.

!P.Multi = [0, 1, 2]

plot, f1, abs(result1), xtitle='Frequency (Hz)', ytitle='Magnitude', xrange=[0,1]

plot, f2, abs(result2), xtitle='Frequency (Hz)', ytitle='Magnitude', xrange=[0,1]

This bug should be fixed, but until then you can supply the /SLOW keyword for a workaround.

There appears to be an error in FREQRESP_Z whenever the keyword NPOINTS is greater than the filter length. FREQRESP_Z chooses a different NPOINTS to calculate the result, but does not go back and recalculate OUTFREQ with the new NPOINTS.

h = firdesign(400, 0.1, /lowpass)

result1 = freqresp_z(h, 1000, outfreq=f1)

result2 = freqresp_z(h, 100, outfreq=f2)

; %%%FREQRESP_Z: Using 400 points.

!P.Multi = [0, 1, 2]

plot, f1, abs(result1), xtitle='Frequency (Hz)', ytitle='Magnitude', xrange=[0,1]

plot, f2, abs(result2), xtitle='Frequency (Hz)', ytitle='Magnitude', xrange=[0,1]

This bug should be fixed, but until then you can supply the /SLOW keyword for a workaround.