sigma = np.array([[[7.72925584e-01, 5.23305564e-02], [5.23305564e-02, 8.89078473e-01]], [[9.84585869e+00, 7.79378820e-01], [7.79378820e-01, 8.84764455e+00]], [[2.02664489e+02, -8.16667434e-01], [-8.16667434e-01, 1.87881670e+02]]]) psf = GaussianMixturePSF(w, mu, sigma) shape = GalaxyShape(10., 0.5, 30.) pos = PixPos(100, 50) bright = Flux(1000.) egal = ExpGalaxy(pos, bright, shape) data = np.zeros((100, 200)) tim = Image(data=data, psf=psf) p0 = egal.getModelPatch(tim) p1 = egal.getModelPatch(tim, 1e-3) bright.setParams([100.]) p2 = egal.getModelPatch(tim, 1e-3) print 'p0', p0.patch.sum() print 'p1', p1.patch.sum() print 'p2', p2.patch.sum() plt.clf() ima = dict(interpolation='nearest', origin='lower')