Coverage for python/lsst/shapelet/generator.py : 44%

Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
""" Base class for shapelet index generators. """
def make(self, order, basisType): if basisType == HERMITE: return HermiteIndexGenerator(order) elif basisType == LAGUERRE: return LaguerreIndexGenerator(order)
return self.size
""" Iterable that generates tuples of (i, nx, ny) in which: - 'i' is the overall coefficient index for a 2-d shapelet expansion (just counts from zero) - 'nx' is the order of the x expansion - 'ny' is the order of the y expansion """
""" Iterable that generates tuples of (i, p, q, re) in which: - 'i' is the overall coefficient index for a 2-d shapelet expansion (just counts from zero) - 'p' and 'q' are the indices of the polar shapelet expansion (see BasisTypeEnum). - 're' is True if this the real part of the coefficient """
i = 0 for n in range(0, self.order+1): p = n q = 0 while p > q: yield (i, p, q, True) i += 1 yield (i, p, q, False) i += 1 p -= 1 q += 1 if p == q: yield (i, p, q, True) i += 1 |