PrincetonUniversity / SPEC

The Stepped-Pressure Equilibrium Code, an advanced MRxMHD equilibrium solver.
https://princetonuniversity.github.io/SPEC/
GNU General Public License v3.0
25 stars 6 forks source link

Spec fft #190

Closed abaillod closed 1 year ago

abaillod commented 1 year ago

Hi!

This PR includes two additional Python routines to do Fourier transforms and inverse Fourier transforms in SPEC formalism. Using numpy.fft package, we can indeed reconstruct the $\cos(m\theta-n\phi)$ and $\sin(m\theta-n\phi)$ Fourier series after some postprocessing.

I also started including unit tests - which should be extended to all Python routines eventually.