911 911 | self.prepData('refim_twopoints_twochan.ms') |
912 912 | tclean(vis=self.msfile,imagename=self.img,imsize=512,cell='8.0arcsec',specmode='mfs',deconvolver='hogbom',niter=2,parallel=self.parallel) |
913 913 | os.system('rm -rf '+self.img+'.mask') |
914 914 | |
915 915 | |
916 916 | mask_around_dim_source='circle[[256pix,256pix],30pix]' |
917 917 | makemask(inpimage=self.img+'.residual', inpmask=mask_around_dim_source, output=self.img+'.mask.dim.source',overwrite=True,mode='copy') |
918 918 | mask_around_dim_source=self.img+'.mask.dim.source' |
919 919 | |
920 920 | |
931 - | report=self.th.checkall(ret=ret,imgexist=[self.img+'.psf', self.img+'.residual'], firstcyclethresh=0.14600408) |
931 + | report=self.th.checkall(ret=ret,imgexist=[self.img+'.psf', self.img+'.residual'], imgval=[(self.img+'.model',0.200,[256,256,0,0])], firstcyclethresh=0.14600408) |
932 + | |
933 + | self.assertTrue(self.check_final(report)) |
934 + | |
935 + | def test_iterbot_cube_restart_updatedmask(self): |
936 + | """ [iterbot] Test_cube_restart_updatedmask : restart cube with an updated mask (CAS-13508 fix verification) """ |
937 + | self.prepData('refim_twopoints_twochan.ms') |
938 + | tclean(vis=self.msfile,imagename=self.img,imsize=512,cell='8.0arcsec',specmode='cube',deconvolver='hogbom',niter=4,parallel=self.parallel) |
939 + | os.system('rm -rf '+self.img+'.mask') |
940 + | |
941 + | |
942 + | mask_around_dim_source='circle[[256pix,256pix],30pix]' |
943 + | makemask(inpimage=self.img+'.residual', inpmask=mask_around_dim_source, output=self.img+'.mask.dim.source',overwrite=True,mode='copy') |
944 + | mask_around_dim_source=self.img+'.mask.dim.source' |
945 + | |
946 + | |
947 + | retpar=tclean(vis=self.msfile, imagename=self.img,imsize=512,cell='8.0arcsec',specmode='cube',niter=10,calcres=False, calcpsf=False, restart=True, mask=mask_around_dim_source, interactive=0,parallel=self.parallel) |
948 + | |
949 + | ret={} |
950 + | if self.parallel: |
951 + | ret=self.th.mergeParaCubeResults(retpar, ['iterdone', 'nmajordone', 'stopcode']) |
952 + | else: |
953 + | ret=retpar |
954 + | |
955 + | |
956 + | |
957 + | |
958 + | report=self.th.checkall(ret=ret,imgexist=[self.img+'.psf', self.img+'.residual'], imgval=[(self.img+'.model',0.83,[256,256,0,0]),(self.img+'.model', 0.27, [256,256,0,1])], firstcyclethresh=0.68944335) |
942 - | retpar=tclean(vis=self.msfile, imagename=self.img,imsize=512,cell='8.0arcsec',specmode='mfs',niter=1,calcres=False, calcpsf=False, restart=True, usemask='pb', pbmask=0.7, interactive=0,parallel=self.parallel) |
970 + | retpar=tclean(vis=self.msfile, imagename=self.img,imsize=512,cell='8.0arcsec',specmode='mfs',niter=1,calcres=False, calcpsf=False, restart=True, usemask='pb', pbmask=0.8, interactive=0,parallel=self.parallel) |
952 - | report=self.th.checkall(ret=ret,imgexist=[self.img+'.psf', self.img+'.residual'], firstcyclethresh=0.1460498) |
980 + | report=self.th.checkall(ret=ret,imgexist=[self.img+'.psf', self.img+'.residual'], imgval=[(self.img+'.model',0.20,[256,256,0,0])], firstcyclethresh=0.1460498) |
981 + | |
982 + | self.assertTrue(self.check_final(report)) |
983 + | |
984 + | def test_iterbot_cube_restart_pbmask(self): |
985 + | """ [iterbot] Test_cube_restart_updatedmask : restart cube with pbmask (CAS-13508 fix verification) """ |
986 + | self.prepData('refim_twopoints_twochan.ms') |
987 + | tclean(vis=self.msfile,imagename=self.img,imsize=512,cell='8.0arcsec',specmode='cube',deconvolver='hogbom',niter=4,parallel=self.parallel) |
988 + | os.system('rm -rf '+self.img+'.mask') |
989 + | |
990 + | |
991 + | retpar=tclean(vis=self.msfile, imagename=self.img,imsize=512,cell='8.0arcsec',specmode='cube',niter=10,calcres=False, calcpsf=False, restart=True, usemask='pb', pbmask=0.8, interactive=0,parallel=self.parallel) |
992 + | |
993 + | ret={} |
994 + | if self.parallel: |
995 + | ret=self.th.mergeParaCubeResults(retpar, ['iterdone', 'nmajordone', 'stopcode']) |
996 + | else: |
997 + | ret=retpar |
998 + | |
999 + | |
1000 + | |
1001 + | report=self.th.checkall(ret=ret,imgexist=[self.img+'.psf', self.img+'.residual'], imgval=[(self.img+'.model',0.37,[256,256,0,0]),(self.img+'.model', 0.15, [256,256,0,1])],firstcyclethresh=0.68944335) |