idl variable naming [message #48713] |
Wed, 17 May 2006 03:02 |
gareth.j.roberts@kcl.
Messages: 2 Registered: May 2006
|
Junior Member |
|
|
Hi,
The background to the problem I am having is that I need to calculate
the median value from several hundred images. However, the number of
values with which to calculate the median
for any given pixel may vary between 5 and 50. Also, many pixels don't
have any values at all. Unfortunately, my computer doesn't have enough
memory to read in all the images and then calculate the median.
The way I thought around this is to create a 1d array for each pixel
which has a value and as a new value is encountered for that pixel,
append it to the 1d array. This would result many 1000's of small 1d
arrays. However, I'm not sure if this is possible or how to create this
many arrays with respect to identifying (naming) them - eg something
like
for j=0, nrows-1 do begin
for k=0, ncols-1 do begin
array_k_j=fltarr(1)
endfor
endfor
So far the only way I have thought of doing something similar is to
create a text file for each pixel and open, append, close each time a
new value for a given pixel is encountered. Not ideal I know.
If anyone has any ideas on a potential solution that would be great.
cheers,
gareth
|
|
|