[SciPy-User] Question on spectral derivative
جاك الفضة
jacksilver045 at gmail.com
Thu Apr 10 16:53:46 EDT 2014
I have data that form a scalar field on a 2D grid, evenly spaced. The grid
has a finite size. There is no particular periodicity patern in my data.
I want to calculate the value of the gradient at each grid point with a
spectral method. Using simple FFT does not seem to work, especially near
the borders (probably because the data are not periodic). I have ears about
DCT, but I am not sure.
I think that I could extend my grid with one row/column at each of the 4
boundaries, duplicate the real boundary on these new boundary points to get
a zero derivative boundary for the DCT algorithm. However, I am not sure
how to get it working. Another possibility would be to extend my grid in
some way that FFT will not create spurious oscillation near the boundaries,
but again, I my attempts failed so far.
I would appreciate advice on the best way to do this.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.scipy.org/pipermail/scipy-user/attachments/20140410/bd702c3c/attachment.html>
More information about the SciPy-User
mailing list