1D array problem for butterworth.pro [message #92534] |
Tue, 05 January 2016 23:18  |
kagoldberg
Messages: 26 Registered: November 2012
|
Junior Member |
|
|
I stumbled across a major problem with calculating 1D butter worth filters in IDL 8.5. (This bug was not in IDL 8.3. I don't know about 8.4.)
When you ask for 1D output, butterworth.pro extracts a 1D vector from the dist(x) function, which is a 2 dimensional, square array. As you might guess, as the array size gets large, IDL has to calculate a 2D dist() result with N^2 points! IDL 8.3 did not do this.
It brought my computer to its knees a few times before I was able to isolate it, and replace the built-in butterworth.pro with my own kludge.
Instead of (dist(x))[*,0], they should have used dist(x,1) and... problem solved.
|
|
|
Re: 1D array problem for butterworth.pro [message #92536 is a reply to message #92534] |
Wed, 06 January 2016 09:42   |
chris_torrence@NOSPAM
Messages: 528 Registered: March 2007
|
Senior Member |
|
|
On Wednesday, January 6, 2016 at 12:18:17 AM UTC-7, kagol...@lbl.gov wrote:
> I stumbled across a major problem with calculating 1D butter worth filters in IDL 8.5. (This bug was not in IDL 8.3. I don't know about 8.4.)
>
> When you ask for 1D output, butterworth.pro extracts a 1D vector from the dist(x) function, which is a 2 dimensional, square array. As you might guess, as the array size gets large, IDL has to calculate a 2D dist() result with N^2 points! IDL 8.3 did not do this.
>
> It brought my computer to its knees a few times before I was able to isolate it, and replace the built-in butterworth.pro with my own kludge.
>
> Instead of (dist(x))[*,0], they should have used dist(x,1) and... problem solved.
Thanks for reporting this! I've gone ahead and fixed the code and it should be in the next release.
Cheers,
Chris
|
|
|
|