comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » FFT on time series NDVI image
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
FFT on time series NDVI image [message #89821] Fri, 05 December 2014 01:22
prasenjit acharya is currently offline  prasenjit acharya
Messages: 2
Registered: December 2014
Junior Member
Hi all,
is anybody knows about the Fast Fourier Transformation (FFT) on multiband (stacked) time series NDVI image? I am a new user of IDL. I have borrowed some code over internet. but it returns some unusual results.
;start envi session
envi
;get the image
envi_select, title='Choose multispectral image', $
fid=fid, dims=dims,pos=pos

num_cols = dims[2]-dims[1]+1
num_rows = dims[4]-dims[3]+1
num_bands = n_elements(pos)

; BIL array
image = fltarr(num_bands,num_cols,num_rows)

for i=0,num_bands-1 do image[i,*,*] = $
envi_get_data(fid=fid,dims=dims,pos=pos[i])

;create empty data matrix to store the transformed image
image2 = fltarr(num_bands,num_cols,num_rows)

;fft on image
for S=0,num_bands-1 do image2[*,S] = FFT(image[*,S])
real = FLOAT(image2)
imagin = ATAN(IMAGINARY(image2), FLOAT(image2))

; the data back in BSQ format
image3 = fltarr(num_bands,num_cols,num_rows)
for i = 0, num_bands-1 do image3[*,*,i] = $
reform(real[i,*],num_cols,num_rows)

; get the map info of the original data
map_info = ENVI_GET_MAP_INFO(fid=fid)

;set output directory
output_dir = 'H:\'
filename = output_dir+'FFTR1'+'.tif'
;write file
ENVI_WRITE_ENVI_FILE, real, out_name=filename,map_info=map_info

end

any suggestion to modify the code is welcome.
thank you
Prasenjit
[Message index]
 
Read Message
Previous Topic: Plotting lookback time (in Gyrs) and redshift on two x axis in IDL
Next Topic: Dot miscentered in \sun symbol of cgsymbol?

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 16:33:46 PDT 2025

Total time taken to generate the page: 0.00251 seconds