;+ ; NAME: ; ex12_fft ; ; PURPOSE: ; formation IDL du 20-Mar-2000 ; FFT, Power Spectrum ; ; PROCEDURE: ; ; ; EXAMPLE: ; ; ; MODIFICATION HISTORY: ; 17-Mar-2000 Written H. Dole, Herve.Dole@ias.fr ;- PRO ex12_fft LOADCT_PLOT ; 1 DIMENSION ;------------ ; CREATE DATA ;------------ @sigprc01 t = delt * FINDGEN(N) PLOT, t, u, title='u as a function of time', xtit='s' ; FREQUENCIES ;------------ M = INDGEN(N) - (N/2 -1) freq = M / (N * delt) ; COMPUTE FFT ;------------ fft_y = SHIFT(FFT(u), n/2 -1) PLOT, freq, ABS(fft_y), xtit='Frequency Hz', title='ABS FFT' ; POWER SPECTRUM ;--------------- powspec_1d = ABS(fft_y)^2. PLOT, freq, powspec_1d PLOT, freq, powspec_1d, xr=[0., 12.], xtitle='freq', title='Power Spectrum' ; 2 DIMENSIONS ;------------- ; RESTORE ISO DATA ;----------------- RESTORE, !FIRBACK_DATA_DIR + 'map_piav722/map_ELAIS_N1_10.00.save', /ver image = map/weightno0 winidl, image>stat(0), ct=5, ws=2 square = 300 sub_image = image(330:330+square,200:200+square) winidl, sub_image>stat(0), ct=5, ws=1 fft_sub = SHIFT(FFT(sub_image), square/2,square/2) winidl, alog10(ABS(fft_sub)), ct=5 END