mval and mvstart in python

This commit is contained in:
Andrea Zonca 2017-10-30 12:36:41 -07:00
parent 01fefd0716
commit 6bcd33a6da

View file

@ -1,4 +1,5 @@
import numpy as np
cimport numpy as np
cimport cython
__all__ = ['legendre_transform', 'legendre_roots', 'sht', 'synthesis', 'adjoint_synthesis',
@ -230,6 +231,16 @@ cdef class alm_info:
raise NotInitializedError()
return sharp_alm_count(self.ainfo)
def mval(self):
if self.ainfo == NULL:
raise NotInitializedError()
return np.asarray(<int[:self.ainfo.nm]> self.ainfo.mval)
def mvstart(self):
if self.ainfo == NULL:
raise NotInitializedError()
return np.asarray(<long[:self.ainfo.nm]> self.ainfo.mvstart)
def __dealloc__(self):
if self.ainfo != NULL:
sharp_destroy_alm_info(self.ainfo)