[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

More For Loops



Hi
I'm looking to get rid of the for loops below.
They make two arrays;
   one containing evey second column and evey second row
   the other containing evey second column and evey alternate row

;------------------------------------------------------------------------------------------------------------
	x_data = 3072
	y_data = 512
	DATA_size = [x_data/2,y_data]
	Data_sets_ev = bytarr(DATA_size[0],DATA_size[1])
	Data_sets_od = bytarr(DATA_size[0],DATA_size[1])

	for i = 0, (DATA_size[0]/2)-1 do begin
		for j = 0, DATA_size[1]-1 do begin		
			Data_sets_ev[i,j] = my_data[(2*i),(2*j)]
			Data_sets_od[i,j] = my_data[(2*i),(2*j+1)]
		endfor
	endfor
;------------------------------------------------------------------------------------------------------------

This is to extract a couple of NOAA14  AVHRR Sea Surface Temperature
measurements. The different spectral bands overlap in the data file,
hence they need to be separated by the above.

Thanks
Leon Majewski

-------------------------
Leon Majewski

Remote Sensing & Satellite Research Group
Curtin University of Technology, Perth, Australia

email: majewski@ses.curtin.edu.au