def test_griddata_predict_awterm(self): self.actualSetUp(zerow=False) make_pb = functools.partial(create_pb_generic, diameter=35.0, blockage=0.0, use_local=False) pb = make_pb(self.model) if self.persist: export_image_to_fits(pb, "%s/test_gridding_awterm_pb.fits" % self.dir) gcf, cf = create_awterm_convolutionfunction(self.model, make_pb=make_pb, nw=100, wstep=8.0, oversampling=16, support=32, use_aaf=True) griddata = create_griddata_from_image(self.model, nw=100, wstep=8.0) griddata = fft_image_to_griddata(self.model, griddata, gcf) newvis = degrid_visibility_from_griddata(self.vis, griddata=griddata, cf=cf) qa = qa_visibility(newvis) assert qa.data['rms'] < 120.0, str(qa) self.plot_vis(newvis, 'awterm')
def test_griddata_predict_box(self): self.actualSetUp(zerow=True) gcf, cf = create_box_convolutionfunction(self.model) griddata = create_griddata_from_image(self.model) griddata = fft_image_to_griddata(self.model, griddata, gcf) newvis = degrid_visibility_from_griddata(self.vis, griddata=griddata, cf=cf) newvis.data['vis'][...] -= self.vis.data['vis'][...] qa = qa_visibility(newvis) assert qa.data['rms'] < 46.0, str(qa)
def test_griddata_predict_pswf(self): self.actualSetUp(zerow=True) gcf, cf = create_pswf_convolutionfunction(self.model, support=6, oversampling=256) griddata = create_griddata_from_image(self.model) griddata = fft_image_to_griddata(self.model, griddata, gcf) newvis = degrid_visibility_from_griddata(self.vis, griddata=griddata, cf=cf) newvis.data['vis'][...] -= self.vis.data['vis'][...] qa = qa_visibility(newvis) assert qa.data['rms'] < 0.7, str(qa)
def test_griddata_predict_wterm(self): self.actualSetUp(zerow=False) gcf, cf = create_awterm_convolutionfunction(self.model, nw=100, wstep=10.0, oversampling=8, support=30, use_aaf=True) griddata = create_griddata_from_image(self.model, nw=100, wstep=10.0) griddata = fft_image_to_griddata(self.model, griddata, gcf) newvis = degrid_visibility_from_griddata(self.vis, griddata=griddata, cf=cf) newvis.data['vis'][...] -= self.vis.data['vis'][...] qa = qa_visibility(newvis) self.plot_vis(newvis, 'wterm') assert qa.data['rms'] < 11.0, str(qa)
def test_griddata_predict_aterm(self): self.actualSetUp(zerow=True) make_pb = functools.partial(create_pb_generic, diameter=35.0, blockage=0.0) griddata = create_griddata_from_image(self.model) gcf, cf = create_awterm_convolutionfunction(self.model, make_pb=make_pb, nw=1, oversampling=16, support=16, use_aaf=True) griddata = fft_image_to_griddata(self.model, griddata, gcf) newvis = degrid_visibility_from_griddata(self.vis, griddata=griddata, cf=cf) qa = qa_visibility(newvis) assert qa.data['rms'] < 120.0, str(qa)