def test_Gaussian2D():
 model = models.Gaussian2D(4.2, 1.7, 3.1, x_stddev=5.1, y_stddev=3.3, theta=(np.pi / 6.0))
 (y, x) = np.mgrid[0:5, 0:5]
 g = model(x, y)
 g_ref = [[3.01907812, 2.99051889, 2.81271552, 2.5119566, 2.13012709], [3.55982239, 3.6086023, 3.4734158, 3.17454575, 2.75494838], [3.88059142, 4.0257528, 3.96554926, 3.70908389, 3.29410187], [3.91095768, 4.15212857, 4.18567526, 4.00652015, 3.64146544], [3.6440466, 3.95922417, 4.08454159, 4.00113878, 3.72161094]]
 assert_allclose(g, g_ref, rtol=0, atol=1e-06)

def test_Gaussian2D ( ) : model = models . Gaussian2D ( 4.2 , 1.7 , 3.1 , x_stddev = 5.1 , y_stddev = 3.3 , theta = ( np . pi / 6.0 ) ) ( y , x ) = np . mgrid [ 0 : 5 , 0 : 5 ] g = model ( x , y ) g_ref = [ [ 3.01907812 , 2.99051889 , 2.81271552 , 2.5119566 , 2.13012709 ] , [ 3.55982239 , 3.6086023 , 3.4734158 , 3.17454575 , 2.75494838 ] , [ 3.88059142 , 4.0257528 , 3.96554926 , 3.70908389 , 3.29410187 ] , [ 3.91095768 , 4.15212857 , 4.18567526 , 4.00652015 , 3.64146544 ] , [ 3.6440466 , 3.95922417 , 4.08454159 , 4.00113878 , 3.72161094 ] ] assert_allclose ( g , g_ref , rtol = 0 , atol = 1e-06 )
test rotated elliptical gaussian2d model .