Implementing a DIMENSION keyword [message #83858] |
Thu, 11 April 2013 15:30  |
Matthew Argall
Messages: 286 Registered: October 2011
|
Senior Member |
|
|
I would like to write a wrapper function for the FFT routine and implement a sliding window. I want to keep the functionality of the DIMENSION keyword to FFT, but am not sure of the best way. I know about Craig Markwardt's CMAPPLY, but was going for something a little more straight-forward.
What I am doing now is transposing the array so that the desired dimension is the leading dimension, then applying the FFT as in the following pseudo-code
array = put_dimension_first(array, dimension)
result = fft(array[start_index:end_index, *, *, *, *, *, *], DIMENSION=1)
result = put_dimension_first(result, dimension, /UNDO)
This works because IDL ignores the extra "*"s for dimensions that do not exist. Not sure if this is a good idea or not...
|
|
|
|