[Scilab-users] FFT - upward continuation of a 2D grid
arctica1963
arctica1963 at gmail.com
Sat Jul 28 14:22:30 CEST 2018
Hi Rafael,
Thanks for the pointers. Still having some issues getting it to work on real
data. Upward continuation, should act like a low-pass and give a smoother
view of the data.
dimx=size(xt);
dimy=size(yt);
nx=dimx(1);
ny=dimy(1);
dxy = 0.016666666;
dkx=1/(nx*dxy);
dky=1/(ny*dxy);
kx=dkx*(-(nx/2)+1:nx/2);
ky=dky*(-(ny/2)+1:ny/2);
[KX,KY]=meshgrid(kx,ky);
k=sqrt(KX.^2 + KY.^2);
uc=4000; // continue up 4000m
//fft_Boug_corr=fft2(Boug_corr);
//shift_f=fftshift(fft_Boug_corr);
//fft_clean=clean(shift_f);
fft_clean=clean(fftshift(fft2(Boug_corr))); // merge commands
Fup=fft_clean.*exp(-k*uc);
F_real=real(ifft(Fup));
It does generate output, but certainly not as expected for upward
continuation of data. Not sure what I'm missing, assuming I have done the
wavenumber thing correct. Normally I would do this via GMT, but want to get
it going under Scilab for convenience.
Clearly, before doing a proper fft, we need to pad the data to expand the
dimensions over which the fft is done to avoid edge effects. Just running it
with the grid dimensions should still produce a recognisable result.
Matbe testing with a synthetic grid would help.
Cheers
Lester
--
Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html
More information about the users
mailing list