for i, l in enumerate(range(self.lmax + 1)):
for j, m in enumerate(range(-l, l + 1)):
self.ylm.reset()
self.ylm.set_coeff(l, m, 1)
self.ylm.axis = self.axis
flux = self.ylm.evaluate(theta=theta,
x=self.X, y=self.Y)
self.img[n].set_data(flux)
After Change
for i, l in enumerate(range(self.lmax + 1)):
for j, m in enumerate(range(-l, l + 1)):
self.map.reset()
self.map[l, m] = 1
self.map.axis = self.axis
flux = self.map(theta=theta, x=self.X, y=self.Y)
self.img[n].set_data(flux)
n += 1