Re: Effective epsilon used for each polarization
"Steven G. Johnson" <[email protected]>
| Newsgroups | gmane.comp.science.photonic-bands |
|---|---|
| Message-ID | <[email protected]> |
On Sat, 14 Oct 2006, Minghui Han wrote: > Thanks. I now figured out what the bug is. It is due to some subtle > difference in the storage of Fourier components between MPB and Matlab. > In MPB, the sequence is from -N/2+1 to N/2 (assume N is an even number). But > in Matlab, the original sequence is from 0 to N-1. After using the command > "fftshift", the sequence is then from -N/2 to N/2-1. So in order to > correctly reproducing curl operation in Matlab, a one-step circular shift > is needed. I thought this might be the problem, which is why I mentioned that you should have equal numbers of +G and -G Fourier components. Note that it's not a difference in the "storage" of the Fourier components, merely a difference in the interpretation (you don't actually need to rearrange the data). The ambiguity in the interpretation is called "aliasing", and the -N/2 to N/2-1 choice of aliases is the optimal and standard one when doing Fourier differentiation. (This is related to choosing the aliasing that gives a trigonometric interpolation polynomial of minimal mean-square slope, and which interpolates real data to real data.) Regards, Steven G. Johnson