|
S2kit
1.1
Toolkit for working with functions defined on the sphere
|
Utility functions needed for transforms. More...
Go to the source code of this file.
Functions | |
| void | ComplexMult (const double x, const double y, const double u, const double v, double *real_result, double *imag_result) |
| Multiplies two complex numbers. More... | |
| int | IndexOfHarmonicCoeff (const int m, const int l, const int bw) |
Gives the position of the coefficient f-hat(m,l) in the one-row array. More... | |
| void | TransMult (double *rdatacoeffs, double *idatacoeffs, double *rfiltercoeffs, double *ifiltercoeffs, double *rres, double *ires, const int bw) |
| Multiplies harmonic coefficients of a function and a filter. More... | |
Utility functions needed for transforms.
Definition in file util.c.
|
inline |
Multiplies two complex numbers.
The result is stored separately for real and imaginary part.
| x | real part of the first number |
| y | imaginary part of the first number |
| u | real part of the second number |
| v | imaginary part of the second number |
| real_result | real part of the result |
| imag_result | imaginary part of the result |
| int IndexOfHarmonicCoeff | ( | const int | m, |
| const int | l, | ||
| const int | bw | ||
| ) |
Gives the position of the coefficient f-hat(m,l) in the one-row array.
Returns the position of the coefficient f-hat(m,l) in the one-row array with the spherical coefficients. It helps to preserve the symmetry that the coefficients have:
| m | order |
| l | degree |
| bw | bandwidth |
| void TransMult | ( | double * | rdatacoeffs, |
| double * | idatacoeffs, | ||
| double * | rfiltercoeffs, | ||
| double * | ifiltercoeffs, | ||
| double * | rres, | ||
| double * | ires, | ||
| const int | bw | ||
| ) |
Multiplies harmonic coefficients of a function and a filter.
See convolution theorem of Driscoll and Healy for details.
| rdatacoeffs | real data coefficients |
| idatacoeffs | imaginary data coefficients |
| rfiltercoeffs | real filter coefficients |
| ifiltercoeffs | imaginary filter coefficients |
| rres | array of real result |
| ires | array of imaginary result |
| bw | bandwidth of problem |
datacoeffs should be output of an SHT (e.g. FSTSemiMemo()) filtercoeffs should be output of an SHT (e.g. FZTSemiMemo()) bw*bw