Exemple #1
0
 def setUp(self):
     Xin, Yin = numpy.indices((500, 500))
     self.peak = 10
     self.xbar = 250
     self.ybar = 250
     self.semimajor = 40
     self.semiminor = 20
     self.theta = 0
     self.mygauss = numpy.ma.array(
         gaussian(self.peak, self.xbar, self.ybar, self.semimajor,
                  self.semiminor, self.theta)(Xin, Yin))
     self.moments = moments(self.mygauss, beam, 0)
Exemple #2
0
 def setUp(self):
     Xin, Yin = numpy.indices((500, 500))
     self.height = 10
     self.x = 250
     self.y = 250
     self.maj = 40
     self.min = 40
     self.theta = 0
     self.mygauss = numpy.ma.array(
         gaussian(self.height, self.x, self.y, self.maj, self.min,
                  self.theta)(Xin, Yin))
     self.moments = moments(self.mygauss, beam, 0)
     self.fit = fitgaussian(self.mygauss, self.moments)
Exemple #3
0
 def testMoments(self):
     try:
         moments(self.mygauss, beam, 0)
     except:
         self.fail('Moments method failed to run.')