Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado
Hello, I have a small question to an array operation. I have a 3-dimensional array. 10x10x100 ... the first 2 dimensions 10x10 are spatial dimensions (so one image with 10 width with and 10 pix height). The third dimension is the time dimension. So every images was acquired 100 times. What I wanted to do is now to compute the the mean of every pixel in time dimension. So for one special pixel (e.g. [3,3]) i would write meanpixel = mean(myarray[3,3,*]) but how is it, if i would like to do this operation for every pixel in the spatial dimensions? I just saw a possibility with a for loop. like FOR j = 0, 9 DO BEGIN FOR k = 0, 9 DO BEGIN meanarray[i,j]=mean(myarray[i,j,*]) ENDFOR ENDFOR This isn't a very fast possibility especially when the array goes big, and i have to do that operation for a full image frame which is 1024x1024 pixel. Is there maybe another way how to act with it? I know that IDL is very strong with array operations, so maybe there is any another solution, which maybe doesn't need the two loops. Thanks a lot for your kind responses. greetings martin