Change API to be able to support spin-weighted Legendre functions in the future

This commit is contained in:
Dag Sverre Seljebotn 2017-05-22 11:02:43 +02:00
parent a93db0b1aa
commit da748f619a
4 changed files with 30 additions and 23 deletions

View file

@ -59,8 +59,8 @@ cdef extern from "sharp.h":
sharp_alm_info *alm_info, int ntrans, int flags, double *time,
unsigned long long *opcnt) nogil
void sharp_normalized_associated_legendre_table(int m, int lmax, int ntheta,
double *theta, int ncols, double *out) nogil
void sharp_normalized_associated_legendre_table(int m, int spin, int lmax, int ntheta,
double *theta, int theta_stride, int l_stride, int spin_stride, double *out) nogil
cdef extern from "sharp_geomhelpers.h":

View file

@ -267,5 +267,5 @@ def normalized_associated_legendre_table(int lmax, int m, theta):
if lmax < m:
raise ValueError("lmax < m")
with nogil:
sharp_normalized_associated_legendre_table(m, lmax, theta_.shape[0], &theta_[0], lmax - m + 1, &out_[0,0])
sharp_normalized_associated_legendre_table(m, 0, lmax, theta_.shape[0], &theta_[0], lmax - m + 1, 1, 1, &out_[0,0])
return out