S2kit
Fast Fourier Transforms and Convolutions of functions defined on sphere
Install / Use
npx skills add Bychin/S2kitInstalls into whichever agent you are using.
README
S2kit - FFT and Convolution on Sphere
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 <img src="https://latex.codecogs.com/svg.latex?\Large&space;S^2" title="S^2"/>.
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.
Documentation
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).
Examples
Complete examples can be found in documentation in test directory. It contains examples of call and use functions mentioned above.
Changelog (from version 1.0)
- 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
Backward compatibility
// TODO create md file with history of renaming and moving files/functions
Related Skills
node-connect
385.5kDiagnose OpenClaw Android, iOS, or macOS node pairing, QR/setup code, route, auth, and connection failures.
blender-python-addon
40.5kBlender Python add-on rules for operators, panels, properties, registration, testing, and API-safe scripting
flutter-development-guidelines-cursorrules-prompt-file
40.5kCursor rules for Flutter development with MVVM architecture, Riverpod state management, Material widgets, and Dart style guidelines.
commit-push-pr
140.7kCommit, push, and open a PR
