示例#1
0
 def test_stagger(self):
     """position in a radial-stagger are correct"""
     pos = radial_stagger(-N.pi/4, N.pi/4 + 0.0001, N.pi/2, 5, 10, 1)
     
     N.testing.assert_array_almost_equal(
         N.sqrt(N.sum(pos**2, axis=1)), 
         N.r_[5, 5, 7, 7, 9, 9, 6, 8])
示例#2
0
    def gen_plant(self):
        xy = radial_stagger(-N.pi/4, N.pi/4 + 0.0001, self.ang_res, 5, 20, self.radial_res)
        self.pos = N.hstack((xy, N.zeros((xy.shape[0], 1))))
        self.field = HeliostatField(self.pos, 0.5, 0.5, 0, 10)

        self.rec, recobj = one_sided_receiver(1., 1.)
        rec_trans = roty(N.pi/2)
        rec_trans[2,3] = 10
        recobj.set_transform(rec_trans)

        self.plant = Assembly(objects=[recobj], subassemblies=[self.field])
示例#3
0
    def test_stagger(self):
        """position in a radial-stagger are correct"""
        pos = radial_stagger(-N.pi / 4, N.pi / 4 + 0.0001, N.pi / 2, 5, 10, 1)

        N.testing.assert_array_almost_equal(N.sqrt(N.sum(pos**2, axis=1)),
                                            N.r_[5, 5, 7, 7, 9, 9, 6, 8])