@@ -247,8 +247,8 @@ cdef class alm_info:
247247 sharp_destroy_alm_info(self .ainfo)
248248 self .ainfo = NULL
249249
250- def almxfl (self , np.ndarray[double , ndim = 3 , mode = ' c' ] alm, np.ndarray[double , mode = ' c' ] fl, int rank ):
251- """ Multiply Alms by a Ell based array
250+ def almxfl (self , np.ndarray[double , ndim = 3 , mode = ' c' ] alm, np.ndarray[double , ndim = 2 , mode = ' c' ] fl, int rank ):
251+ """ Multiply Alm by a Ell based array
252252
253253
254254 Parameters
@@ -264,19 +264,21 @@ cdef class alm_info:
264264
265265 """
266266 mvstart = 0
267+ has_multiple_beams = alm.shape[2 ] > 1 and fl.shape[1 ] > 1
267268 for m in self .mval():
268269 f = 1 if (m== 0 ) else 2
269270 num_ells = self .ainfo.lmax + 1 - m
270271
271- has_multiple_beams = alm.shape[2 ] > 1 and fl.ndim > 1
272272 if not has_multiple_beams:
273273 for i_l in range (num_ells):
274274 l = m + i_l
275275 alm[:,:,mvstart + f* i_l:mvstart + f* i_l + f] *= fl[l]
276276 else :
277- for i_l in range (num_ells):
278- l = m + i_l
279- alm[:,:,mvstart + f* i_l:mvstart + f* i_l + f] *= fl[:alm.shape[2 ],l]
277+ for i_signal in range (alm.shape[0 ]):
278+ for i_pol in range (alm.shape[1 ]):
279+ for i_l in range (num_ells):
280+ l = m + i_l
281+ alm[i_signal, i_pol, mvstart + f* i_l:mvstart + f* i_l + f] *= fl[l, i_pol]
280282 mvstart += f * num_ells
281283
282284cdef class triangular_order(alm_info):
0 commit comments