diff --git a/python/cclassy.pxd b/python/cclassy.pxd index f0c905a3e..4fe2aec44 100644 --- a/python/cclassy.pxd +++ b/python/cclassy.pxd @@ -162,6 +162,7 @@ cdef extern from "class.h": int has_tp int has_dd int has_td + int has_pd int has_ll int has_dl int has_tl @@ -216,6 +217,7 @@ cdef extern from "class.h": int has_bb int has_pp int has_tp + int has_pd int has_dd int has_td int has_ll @@ -227,6 +229,7 @@ cdef extern from "class.h": int index_lt_bb int index_lt_pp int index_lt_tp + int index_lt_pd int index_lt_dd int index_lt_td int index_lt_ll @@ -334,4 +337,4 @@ cdef extern from "class.h": void * psp, double R, double z, - double * sigma) \ No newline at end of file + double * sigma) diff --git a/python/classy.pyx b/python/classy.pyx index eefdc2cc0..dc7c71409 100644 --- a/python/classy.pyx +++ b/python/classy.pyx @@ -584,6 +584,7 @@ cdef class Class: (self.sp.has_td, self.sp.index_ct_td, 'td'), (self.sp.has_ll, self.sp.index_ct_ll, 'll'), (self.sp.has_dl, self.sp.index_ct_dl, 'dl'), + (self.sp.has_pd, self.sp.index_ct_pd, 'pd'), (self.sp.has_tl, self.sp.index_ct_tl, 'tl')] spectra = [] @@ -615,7 +616,7 @@ cdef class Class: # computes the size, given the number of correlations needed to be computed size = (self.sp.d_size*(self.sp.d_size+1)-(self.sp.d_size-self.sp.non_diag)* (self.sp.d_size-1-self.sp.non_diag))/2; - for elem in ['dd', 'll', 'dl']: + for elem in ['dd', 'll', 'dl','pd']: if elem in spectra: cl[elem] = {} for index in range(size): @@ -637,6 +638,9 @@ cdef class Class: if 'dl' in spectra: for index in range(size): cl['dl'][index][ell] = dcl[self.sp.index_ct_dl+index] + if 'pd' in spectra: + for index in range(size): + cl['pd'][index][ell] = dcl[self.sp.index_ct_pd+index] if 'td' in spectra: cl['td'][ell] = dcl[self.sp.index_ct_td] if 'tl' in spectra: