S2kit  1.1
Toolkit for working with functions defined on the sphere
util.h File Reference

Go to the source code of this file.

Enumerations

enum  DataFormat { COMPLEX = 0, REAL }
 Result data format for FST functions. More...
 

Functions

int IndexOfHarmonicCoeff (const int, const int, const int)
 Gives the position of the coefficient f-hat(m,l) in the one-row array. More...
 
void TransMult (double *, double *, double *, double *, double *, double *, const int)
 Multiplies harmonic coefficients of a function and a filter. More...
 

Enumeration Type Documentation

◆ DataFormat

enum DataFormat

Result data format for FST functions.

DataFormat is used in FST functions (e.g. FSTSemiMemo()) to determine samples' data format.

Enumerator
COMPLEX 

Data is complex.

REAL 

Data is real.

Definition at line 10 of file util.h.

Function Documentation

◆ IndexOfHarmonicCoeff()

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:

f-hat(l,-m) = (-1)^m * conjugate( f-hat(l,m) )
Parameters
morder
ldegree
bwbandwidth

Definition at line 42 of file util.c.

◆ TransMult()

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.

Parameters
rdatacoeffsreal data coefficients
idatacoeffsimaginary data coefficients
rfiltercoeffsreal filter coefficients
ifiltercoeffsimaginary filter coefficients
rresarray of real result
iresarray of imaginary result
bwbandwidth of problem
Note
datacoeffs should be output of an SHT (e.g. FSTSemiMemo())
filtercoeffs should be output of an SHT (e.g. FZTSemiMemo())
All arrays must be of length bw*bw

Definition at line 68 of file util.c.