Esempio n. 1
0
 def test_circular_aperture(self):
     """Rays that intersect a paraboloid above the cut plane handled correctly"""
     gm = ParabolicDishGM(diameter=10., focal_length=12.)
     prm = gm.find_intersections(N.eye(4), self.bund)
     
     N.testing.assert_array_almost_equal(prm[:3], self.correct)
     self.failUnless(prm[3] == N.inf)
Esempio n. 2
0
    def test_mesh(self):
        """Parabolic dish mesh looks OK"""
        p = ParabolicDishGM(5, 3)
        x, y, z = p.mesh(5)

        N.testing.assert_array_almost_equal(z, p.a * (x**2 + y**2))
        self.failIf(N.any(x**2 + y**2 > 6.25))
Esempio n. 3
0
 def test_mesh(self):
     """Parabolic dish mesh looks OK"""
     p = ParabolicDishGM(5, 3)
     x, y, z = p.mesh(5)
     
     N.testing.assert_array_almost_equal(z, p.a*(x**2 + y**2))
     self.failIf(N.any(x**2 + y**2 > 6.25))
Esempio n. 4
0
 def test_circular_aperture(self):
     """Rays that intersect a paraboloid above the cut plane handled correctly"""
     gm = ParabolicDishGM(diameter=10., focal_length=12.)
     prm = gm.find_intersections(N.eye(4), self.bund)
     
     N.testing.assert_array_almost_equal(prm[:3], self.correct)
     self.failUnless(prm[3] == N.inf)
Esempio n. 5
0
 def test_mesh(self):
     """Parabolic dish mesh looks OK"""
     p = ParabolicDishGM(5, 3)
     x, y, z = p.mesh(5)
     
     N.testing.assert_array_almost_equal(z, p.a*(x**2 + y**2))
     self.failIf(~N.any(x**2 + y**2 <= 6.25)) # Somehow thsi got over a strange floating point error...
Esempio n. 6
0
    def test_mesh(self):
        """Parabolic dish mesh looks OK"""
        p = ParabolicDishGM(5, 3)
        x, y, z = p.mesh(5)

        N.testing.assert_array_almost_equal(z, p.a * (x**2 + y**2))
        self.failIf(
            ~N.any(x**2 + y**2 <= 6.25)
        )  # Somehow thsi got over a strange floating point error...
Esempio n. 7
0
    def setUp(self):
        pos = N.zeros((3, 4))
        pos[0] = N.r_[0, 0.5, 2, -2]
        pos[2] = 2.
        dir = N.tile(N.c_[[0, 0, -1]], (1, 4))

        self.bund = RayBundle()
        self.bund.set_vertices(pos)
        self.bund.set_directions(dir)

        self.surf = Surface(ParabolicDishGM(2., 1.), opt.perfect_mirror)