Efficiently Compute Inverse Fourier Transform
The following code was suggested in the very nice answer to this question here. My question about it is: If I was just to compute the derivative in Fourier space as done in this co
Solution 1:
Here one only needs to define the linear operator for the inverse transformation. Following the structure from the posted code it would be
expinv = np.outer( 1j * 2 * np.pi * xl, kl )
AInv = np.exp( expinv ) / np.sqrt( N )
The Fourier transform of the derivative was
dfF = np.dot( B, yl )
such that the derivative in real space would be
dfR = np.dot( AInv, dfF )
Eventually, this means that the "derivative"-operator is
np.dot( AInv, B )
which is for small N
( except for the edges ) a tridiagonal matrix with entries (-1,0,1)
, i.e. a classical symmetric numerical derivative.
Increasing N
it first changes to 1,-2,0,2,1
i.e. a higher order approximation of the derivative.
Eventually, one gets an alternating weighted derivative of type (..., d,-c, b,-a,0,a,-b, c,-d, ...)
Post a Comment for "Efficiently Compute Inverse Fourier Transform"