Commits
617 617 | nmajordone=2, |
618 618 | imexist=[self.img+'.image', self.img+'1.image'], |
619 619 | imval=[(self.img+'.image',1.434,[50,50,0,0]), |
620 620 | (self.img+'1.image',7.44,[40,40,0,0]), |
621 621 | (self.img+'2.image',7.42,[51,40,0,0]), |
622 622 | (self.img+'.image',0.758,[50,50,0,1]), |
623 623 | (self.img+'1.image',3.715,[40,40,0,1]), |
624 624 | (self.img+'2.image',3.675,[51,40,0,1]) ]) |
625 625 | self.checkfinal(report) |
626 626 | |
627 + | skipIf(ParallelTaskHelper.isMPIEnabled(), "Skip test. Diffirent nchans of cubes in multi-field imaging is not supported in parallel mode") | .
627 628 | def test_multifield_both_cube_diffshape(self): |
628 629 | """ [multifield] Test_Multifield_both_cube : Two fields, both cube but different nchans""" |
629 630 | self.prepData("refim_twopoints_twochan.ms") |
630 631 | self.th.write_file(self.img+'.out.txt', 'imagename='+self.img+'1\nimsize=[80,80]\ncell=[8.0arcsec,8.0arcsec]\nphasecenter=J2000 19:58:40.895 +40.55.58.543\nnchan=3\n') |
631 632 | retpar = tclean(vis=self.msfile,imagename=self.img,imsize=100,cell='8.0arcsec',phasecenter="J2000 19:59:28.500 +40.44.01.50",outlierfile=self.img+'.out.txt',niter=10,deconvolver='hogbom',interactive=0,specmode='cube',nchan=2,interpolation='nearest',parallel=self.parallel) |
632 633 | ret={} |
633 634 | if self.parallel: |
634 635 | ret=self.th.mergeParaCubeResults(retpar, ['iterdone', 'nmajordone']) |
635 636 | else: |
636 637 | ret=retpar |
637 638 | report=self.th.checkall(ret=ret, |
638 639 | iterdone=22, |
639 640 | nmajordone=2, |
640 641 | imexist=[self.img+'.image', self.img+'1.image'], |
641 642 | imval=[(self.img+'.image',1.434,[50,50,0,0]), |
642 643 | (self.img+'1.image',7.44,[40,40,0,0]), |
643 644 | (self.img+'.image',0.762,[50,50,0,1]), |
644 645 | (self.img+'1.image',3.70,[40,40,0,1]) ]) |
645 646 | self.checkfinal(report) |
646 647 | |
648 + | skipIf(ParallelTaskHelper.isMPIEnabled(), "Skip test. Mixing cube and mfs in multi-field imaging is not supported in parallel mode") | .
647 649 | def test_multifield_cube_mfs(self): |
648 650 | """ [multifield] Test_Multifield_cube_mfs : Two fields, one cube and one mfs""" |
649 651 | self.prepData("refim_twopoints_twochan.ms") |
650 652 | self.th.write_file(self.img+'.out.txt', 'imagename='+self.img+'1\nimsize=[80,80]\ncell=[8.0arcsec,8.0arcsec]\nphasecenter=J2000 19:58:40.895 +40.55.58.543\nspecmode=mfs\nnchan=1\n') |
651 653 | retpar = tclean(vis=self.msfile,imagename=self.img,imsize=100,cell='8.0arcsec',phasecenter="J2000 19:59:28.500 +40.44.01.50",outlierfile=self.img+'.out.txt',niter=10,deconvolver='hogbom',interactive=0,specmode='cube',nchan=2,interpolation='nearest',parallel=self.parallel) |
652 654 | ret={} |
653 655 | if self.parallel: |
654 656 | ret=self.th.mergeParaCubeResults(retpar, ['iterdone', 'nmajordone']) |
655 657 | iterdone_expected=22 |
656 658 | else: |
673 675 | ret = tclean(vis=self.msfile,imagename=self.img,imsize=100,cell='8.0arcsec',phasecenter="J2000 19:59:28.500 +40.44.01.50",outlierfile=self.img+'.out.txt',niter=10,deconvolver='hogbom',interactive=0,parallel=self.parallel) |
674 676 | report=self.th.checkall(ret=ret, |
675 677 | iterdone=13, |
676 678 | nmajordone=2, |
677 679 | imexist=[self.img+'.image', self.img+'1.image.tt0',self.img+'1.alpha'], |
678 680 | imval=[(self.img+'.image',1.094,[50,50,0,0]), |
679 681 | (self.img+'1.image.tt0',5.57,[40,40,0,0]), |
680 682 | (self.img+'1.alpha', -1.0, [40,40,0,0]) ]) |
681 683 | self.checkfinal(report) |
682 684 | |
685 + | skipIf(ParallelTaskHelper.isMPIEnabled(), "Skip test. Mixing cube and mtmfs in multi-field imaging is not supported in parallel mode") | .
683 686 | def test_multifield_cube_mtmfs(self): |
684 687 | """ [multifield] Test_Multifield_cube_mtmfs : Two fields, one cube and one mtmfs""" |
685 688 | self.prepData("refim_twopoints_twochan.ms") |
686 689 | self.th.write_file(self.img+'.out.txt', 'imagename='+self.img+'1\nimsize=[80,80]\ncell=[8.0arcsec,8.0arcsec]\nphasecenter=J2000 19:58:40.895 +40.55.58.543\nreffreq=1.5GHz\ndeconvolver=mtmfs\nspecmode=mfs\n') |
687 690 | retpar = tclean(vis=self.msfile,imagename=self.img,imsize=100,cell='8.0arcsec',phasecenter="J2000 19:59:28.500 +40.44.01.50",outlierfile=self.img+'.out.txt',niter=10,deconvolver='hogbom',interactive=0,specmode='cube',nchan=2,interpolation='nearest',parallel=self.parallel) |
688 691 | ret={} |
689 692 | if self.parallel: |
690 693 | ret=self.th.mergeParaCubeResults(retpar, ['iterdone', 'nmajordone']) |
691 694 | else: |
692 695 | ret=retpar |
1374 1377 | self.prepData('refim_point.ms') |
1375 1378 | ret = self.run_cubetclean(testid) |
1376 1379 | |
1377 1380 | self.assertTrue(os.path.exists(self.img+self.testList[testid]['imagename']+'.psf') and os.path.exists(self.img+self.testList[testid]['imagename']+'.residual') ) |
1378 1381 | report=self.th.checkall(imexist=[self.img+self.testList[testid]['imagename']+'.image'], |
1379 1382 | imval=[(self.img+self.testList[testid]['imagename']+'.image',1.5000546, |
1380 1383 | [50,50,0,4])]) |
1381 1384 | report2 = self.th.checkspecframe(self.img+self.testList[testid]['imagename']+'.image','LSRK',1.199989152e9) |
1382 1385 | self.checkfinal(report+report2) |
1383 1386 | |
1384 - | skipIf(ParallelTaskHelper.isMPIEnabled(), "skipped the test, data sel with channel gaps is not supported in parallel mode") | .
1387 + | skipIf(ParallelTaskHelper.isMPIEnabled(), "Skip test. Data sel with channel gaps is not supported in parallel mode") | .
1385 1388 | def test_cube_21(self): |
1386 1389 | """ [cube] Test_Cube_21 """ |
1387 1390 | # data sel with channel gap (10,11 excluded) 4~9, 12~14 |
1388 1391 | testid=21 |
1389 1392 | self.testList[testid]['interpolation']='nearest' |
1390 1393 | print " : " , self.testList[testid]['desc'] |
1391 1394 | self.prepData('refim_point.ms') |
1392 1395 | ret = self.run_cubetclean(testid) |
1393 1396 | |
1394 1397 | self.assertTrue(os.path.exists(self.img+self.testList[testid]['imagename']+'.psf') and os.path.exists(self.img+self.testList[testid]['imagename']+'.residual') ) |