S2kit, version 1.1, is a library of C functions which compute forward and inverse discrete Fourier transforms, convolutions of functions defined on the sphere .
This is an updated version of the library S2kit 1.0, that was initially published there www.cs.dartmouth.edu/~geelong/sphere.
S2kit is free software and is distributed under the terms of the GNU General Public License.
Paper for S2kit 1.0 can be found here. I suggest you to read it first. More theoretical exposition can be found in the article "Computing Fourier Transforms and Convolutions on the 2-Sphere" by Driscoll J.R. and Healy D.M.
Full documentation of the library can be found here.
The list of core functions:
Name | Description |
---|---|
DLTNaive() |
Legendre transform using naive algorithm |
InvDLTNaive() |
Inverse Legendre transform using naive algorithm |
DLTSemi() |
Legendre transform using seminaive algorithm |
InvDLTSemi() |
Inverse Legendre transform using seminaive algorithm |
FSTSemiMemo() |
Spherical harmonic transform |
InvFSTSemiMemo() |
Inverse spherical harmonic transform |
FZTSemiMemo() |
Zonal harmonic transform |
ConvOn2SphereSemiMemo() |
Convolution of two functions defined on the 2-sphere |
FSTSemiFly() |
Spherical harmonic transform |
InvFSTSemiFly() |
Inverse spherical harmonic transform |
FZTSemiFly() |
Zonal harmonic transform |
ConvOn2SphereSemiFly() |
Convolution of two functions defined on the 2-sphere |
In most cases you should prefer to use -Semi()
and -Memo()
variants of the functions, since they are faster and accept reusing passed arguments (see more info in documentation).
Complete examples can be found in documentation in test
directory. It contains examples of call and use functions mentioned above.
- All files were formatted via clang-formatter
- Library's file structure was updated
test_*
totest/
- headers to
include/
- sources to
src/
- data for tests to
data/
- All math consts and functions are imported from
<math.h>
- All source and test files were refactored in prior to C11 standart and code style
- Due to huge amount of refactoring there were many optimization fixes
// TODO create md file with history of renaming and moving files/functions