Ejemplo n.º 1
0
    def test_from_pos(self):
        ''' Check that the DiSkO calculated from ant_pos only agrees with that from the 
            calibrated vis
        '''
        dut = DiSkO.from_ant_pos(self.ant_pos, frequency=constants.L1_FREQ)
        self.assertTrue(dut.n_v == self.disko.n_v)
        self.assertTrue(np.allclose(dut.u_arr, self.disko.u_arr))

        harmonics = self.disko.get_harmonics(self.sphere)
        harmonics1 = dut.get_harmonics(self.sphere)
        for a, b in zip(harmonics, harmonics1):
            self.assertTrue(np.allclose(a, b))
Ejemplo n.º 2
0
 def test_gamma_size(self):
     dut = DiSkO.from_ant_pos(self.ant_pos, frequency=constants.L1_FREQ)
     gamma = dut.make_gamma(self.sphere)
     gamma_sub = dut.make_gamma(self.subsphere)
     self.assertEqual(gamma.shape[1], self.sphere.npix)
     self.assertEqual(gamma_sub.shape[1], self.subsphere.npix)