SHTns  2.6.5
Functions
Rotation of SH fields.

Rotation around axis other than Z should be considered of beta quality (they have been tested but may still contain bugs). More...

Functions

void SH_Zrotate (shtns_cfg shtns, cplx *Qlm, double alpha, cplx *Rlm)
 Rotate a SH representation Qlm around the z-axis by angle alpha (in radians), which is the same as rotating the reference frame by angle -alpha. More...
 
void SH_Xrotate90 (shtns_cfg shtns, cplx *Qlm, cplx *Rlm)
 rotate Qlm by 90 degrees around X axis and store the result in Rlm. More...
 
void SH_Yrotate90 (shtns_cfg shtns, cplx *Qlm, cplx *Rlm)
 rotate Qlm by 90 degrees around Y axis and store the result in Rlm. More...
 
void SH_Yrotate (shtns_cfg shtns, cplx *Qlm, double alpha, cplx *Rlm)
 rotate Qlm around Y axis by arbitrary angle, using composition of rotations. Store the result in Rlm. More...
 

Detailed Description

Rotation around axis other than Z should be considered of beta quality (they have been tested but may still contain bugs).

They also require mmax = lmax. They use an Algorithm inspired by the pseudospectral rotation described in Gimbutas Z. and Greengard L. 2009 "A fast and stable method for rotating spherical harmonic expansions" Journal of Computational Physics. doi:10.1016/j.jcp.2009.05.014

These functions do only require a call to shtns_create, but not to shtns_set_grid.

Function Documentation

void SH_Xrotate90 ( shtns_cfg  shtns,
cplx *  Qlm,
cplx *  Rlm 
)

rotate Qlm by 90 degrees around X axis and store the result in Rlm.

Rotate SH representation around X axis by 90 degrees.

shtns->mres MUST be 1, and lmax=mmax.

void SH_Yrotate ( shtns_cfg  shtns,
cplx *  Qlm,
double  alpha,
cplx *  Rlm 
)

rotate Qlm around Y axis by arbitrary angle, using composition of rotations. Store the result in Rlm.

Rotate SH representation around Y axis by alpha (in radians).

void SH_Yrotate90 ( shtns_cfg  shtns,
cplx *  Qlm,
cplx *  Rlm 
)

rotate Qlm by 90 degrees around Y axis and store the result in Rlm.

Rotate SH representation around Y axis by 90 degrees.

shtns->mres MUST be 1, and lmax=mmax.

void SH_Zrotate ( shtns_cfg  shtns,
cplx *  Qlm,
double  alpha,
cplx *  Rlm 
)

Rotate a SH representation Qlm around the z-axis by angle alpha (in radians), which is the same as rotating the reference frame by angle -alpha.

Result is stored in Rlm (which can be the same array as Qlm).