def test__generate2DGaussianDistributions_max_le_1(self): xdim = 73 ydim = 71 dist = PatternedImage._generate2DGaussianDistribution((xdim, ydim)) maxval = max([max(row) for row in dist]) print("maxval = {}".format(maxval)) self.assertTrue(maxval <= 1.0)
def test__generate2DGaussianDistributions_min_ge_0(self): xdim = 67 ydim = 71 dist = PatternedImage._generate2DGaussianDistribution((xdim, ydim)) minval = min([min(row) for row in dist]) print("minval = {}".format(minval)) self.assertTrue(minval >= 0.0)
def test__generate2DGaussianDistributions_size_y(self): xdim = 6 ydim = 7 dist = PatternedImage._generate2DGaussianDistribution((xdim, ydim)) self.assertEqual(ydim, len(dist))
def test__generate2DGaussianDistributions_size_x(self): xdim = 107 ydim = 103 dist = PatternedImage._generate2DGaussianDistribution((xdim, ydim)) self.assertEqual(xdim, len(dist[0]))