def test_get_beam_w_fr(self): interps = fringe.get_beam_w_fr(self.aa, (1, 4), ref_chan=160) t, firs, frbins, frspace = fringe.get_fringe_rate_kernels( interps, 42.9, 401) print n.ones_like(frspace).sum() print n.sum(frspace**2) p.subplot(121) p.plot(t, firs[160]) p.plot(t, n.abs(firs[160])) p.subplot(122) p.plot(frbins, frspace[160]) p.xlim(-.0005, .0020) p.ylim(0.0, 1.0) p.show()
def test_difference(self): h, b, w, hifit = old_fringe.get_optimal_kernel_at_ref(self.aa, 100, (1, 4), binwidth=.00005) interps = old_fringe.get_beam_w_fr(self.aa, (1, 4), ref_chan=100) t, firs, frbins, frspace = old_fringe.get_fringe_rate_kernels( interps, 42.9, 399) print len(frbins), frbins[0], frbins[-1] p.subplot(121) p.plot(t, firs[100], '+') p.plot(t, n.abs(firs[100]), '+') p.subplot(122) p.plot(b, h, 'k+') p.plot(frbins, frspace[100], 'b+', label='old') p.legend()