SkillAgentSearch skills...

S2kit

Fast Fourier Transforms and Convolutions of functions defined on sphere

Install / Use

npx skills add Bychin/S2kit

Installs into whichever agent you are using.

About this skill

Quality Score

0/100

Supported Platforms

Universal

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_* to test/
    • 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

View on GitHub
GitHub Stars10
CategoryDevelopment
Updated1y ago
Forks3

Languages

C

Security Score

65/100

Audited on Jan 25, 2025

No findings