Пример #1
0
 def test_griddata_weight(self):
     self.actualSetUp(zerow=True)
     gcf, cf = create_box_convolutionfunction(self.model)
     gd = create_griddata_from_image(self.model)
     gd_list = [
         grid_weight_to_griddata(self.vis, gd, cf) for i in range(10)
     ]
     gd, sumwt = griddata_merge_weights(gd_list, algorithm='uniform')
     self.vis = griddata_reweight(self.vis, gd, cf)
     gd, sumwt = grid_visibility_to_griddata(self.vis, griddata=gd, cf=cf)
     im = fft_griddata_to_image(gd, gcf)
     im = normalize_sumwt(im, sumwt)
     if self.persist:
         export_image_to_fits(
             im, '%s/test_gridding_dirty_2d_uniform.fits' % self.dir)
     self.check_peaks(im, 99.40822097133994)
Пример #2
0
 def test_griddata_visibility_weight_IQ(self):
     self.actualSetUp(zerow=True, image_pol=PolarisationFrame("stokesIQUV"))
     gcf, cf = create_pswf_convolutionfunction(self.model)
     gd = create_griddata_from_image(self.model, self.vis)
     gd_list = [
         grid_visibility_weight_to_griddata(self.vis, gd, cf)
         for i in range(10)
     ]
     gd, sumwt = griddata_merge_weights(gd_list, algorithm='uniform')
     self.vis = griddata_visibility_reweight(self.vis, gd, cf)
     gd, sumwt = grid_visibility_to_griddata(self.vis, griddata=gd, cf=cf)
     cim = fft_griddata_to_image(gd, gcf)
     cim = normalize_sumwt(cim, sumwt)
     im = convert_polimage_to_stokes(cim)
     if self.persist:
         export_image_to_fits(
             im, '%s/test_gridding_dirty_2d_IQ_uniform.fits' % self.dir)
     self.check_peaks(im, 99.40822097133994)
Пример #3
0
 def test_griddata_blockvisibility_weight(self):
     self.actualSetUp(zerow=True,
                      block=True,
                      image_pol=PolarisationFrame("stokesIQUV"))
     gcf, cf = create_pswf_convolutionfunction(self.model)
     gd = create_griddata_from_image(self.model, self.vis)
     gd_list = [
         grid_blockvisibility_weight_to_griddata(self.vis, gd, cf)
         for i in range(10)
     ]
     assert numpy.max(numpy.abs(gd_list[0][0].data)) > 10.0
     gd, sumwt = griddata_merge_weights(gd_list, algorithm='uniform')
     self.vis = griddata_blockvisibility_reweight(self.vis, gd, cf)
     gd, sumwt = grid_blockvisibility_to_griddata(self.vis,
                                                  griddata=gd,
                                                  cf=cf)
     cim = fft_griddata_to_image(gd, gcf)
     cim = normalize_sumwt(cim, sumwt)
     im = convert_polimage_to_stokes(cim)
     if self.persist:
         export_image_to_fits(
             im, '%s/test_gridding_dirty_2d_uniform_block.fits' % self.dir)
     self.check_peaks(im, 100.13540418821904)