예제 #1
0
    def value(self, acquisition_direction):
        accum = complex(0, 0)

        for l in range(self.order + 1):
            if l%2 == 0:
                for m in range(-l, l + 1):
                    accum += self.__coefficients[self.__index(l,m), 0]*sph_harm(l, m, acquisition_direction)

        return accum
예제 #2
0
    def __x(self, acquisition_directions, order):
        rows = []
        for acquisition_direction in acquisition_directions:
            row = []
            for l in range(order + 1):
                for m in range(-l, (l + 1)):
                    row.append(sph_harm(l,m,acquisition_direction))
            rows.append(row)

        return np.matrix(rows)