Commits

Bob Garwood authored 53eaccc567f
some test_simobserve.py tests work again in casa6

gcwrap/python/scripts/tests/test_simobserve.py

Modified
533 533
534 534 # copy input components list
535 535 self._copy_input(self.incomp)
536 536
537 537 def tearDown(self):
538 538 if self.teardown and os.path.exists(self.project):
539 539 shutil.rmtree(self.project)
540 540 #pass
541 541
542 542 # Tests of complist simulations
543 - @unittest.skipIf(is_CASA6,"unexpected comp_nchan argument - needs to be fixed")
544 543 def testComp_complist(self):
545 544 """Test complist simulation: only generating input model"""
546 545 complist = self.incomp
547 546 compwidth = self.compwidth
548 547 comp_nchan = self.comp_nchan
549 548 obsmode = ""
550 549 antennalist="alma.out01.cfg" # necessary even if only modifymodel
551 550 sdantlist = ""
552 551 res = simobserve(project=self.project,complist=complist,
553 552 compwidth=compwidth,comp_nchan=comp_nchan,
554 553 setpointings=True,obsmode=obsmode,
555 554 antennalist=antennalist,sdantlist=sdantlist,
556 555 thermalnoise="",graphics=self.graphics)
557 556 self.assertTrue(res)
558 557 # compare compskymodel
559 558 currmodel = self.project + "/" + \
560 559 self._get_data_prefix(antennalist,self.project)+".compskymodel"
561 560 self._check_imstats(currmodel, self.refmodel_int)
562 561
563 - @unittest.skipIf(is_CASA6,"unexpected comp_nchan argument - needs to be fixed")
564 562 def testComp_almaptg(self):
565 563 """Test complist simulation: only setpointing (maptype='ALMA')"""
566 564 complist = self.incomp
567 565 compwidth = self.compwidth
568 566 comp_nchan = self.comp_nchan
569 567 setpointings = True
570 568 maptype = "ALMA"
571 569 obsmode = ""
572 570 antennalist = "alma.out01.cfg"
573 571 sdantlist = ""
577 575 obsmode=obsmode,antennalist=antennalist,
578 576 sdantlist=sdantlist,
579 577 thermalnoise="",graphics=self.graphics)
580 578 self.assertTrue(res)
581 579 # compare pointing files
582 580 currptg = self.project + "/" + \
583 581 self._get_data_prefix(antennalist,self.project)+".ptg.txt"
584 582 refptg = self.refpref + "alma.alma.out01.ptg.txt"
585 583 self._check_ptgfile(currptg, refptg)
586 584
587 - @unittest.skipIf(is_CASA6,"unexpected comp_nchan argument - needs to be fixed")
588 585 def testComp_hexptg(self):
589 586 """Test complist simulation: only setpointing (maptype='hexagonal')"""
590 587 complist = self.incomp
591 588 compwidth = self.compwidth
592 589 comp_nchan = self.comp_nchan
593 590 setpointings = True
594 591 maptype = "hexagonal"
595 592 obsmode = ""
596 593 antennalist = "aca.i.cfg"
597 594 sdantlist = ""
601 598 obsmode=obsmode,antennalist=antennalist,
602 599 sdantlist=sdantlist,
603 600 thermalnoise="",graphics=self.graphics)
604 601 self.assertTrue(res)
605 602 # compare pointing files
606 603 currptg = self.project + "/" + \
607 604 self._get_data_prefix(antennalist,self.project)+".ptg.txt"
608 605 refptg = self.refpref + "hex.aca.i.ptg.txt"
609 606 self._check_ptgfile(currptg, refptg)
610 607
611 - @unittest.skipIf(is_CASA6,"unexpected comp_nchan argument - needs to be fixed")
608 +
612 609 def testComp_sqptg(self):
613 610 """Test complist simulation: only setpointing (maptype='square')"""
614 611 complist = self.incomp
615 612 compwidth = self.compwidth
616 613 comp_nchan = self.comp_nchan
617 614 setpointings = True
618 615 maptype = "square"
619 616 obsmode = ""
620 617 antennalist = ""
621 618 sdantlist = self.sdantlist
743 740 antennalist=antennalist,thermalnoise="",
744 741 graphics=self.graphics)
745 742 self.assertTrue(res)
746 743 # compare outputs
747 744 currpref = self.project + "/" + \
748 745 self._get_data_prefix(antennalist,self.project)
749 746 self._check_imstats(currpref+".compskymodel", self.refmodel_int)
750 747 self._check_ptgfile(currpref+".ptg.txt", self.refpref_int+".ptg.txt")
751 748 self._check_msstats(currpref+".ms",self.refms_int)
752 749
753 - @unittest.skipIf(is_CASA6,"unexpected comp_nchan argument - needs to be fixed")
750 + @unittest.skipIf(is_CASA6,"Failed AlwaysAssert sdirections.nelements() == nptg - needs to be fixed.")
754 751 def testComp_intNchan(self):
755 752 """Test complist simulation: interferometer, but with comp_nchan > 1"""
756 753 complist = self.incomp
757 754 compwidth = self.compwidth
758 755 comp_nchan = 8
759 756 integration = "4s"
760 757 direction = self.direction
761 758 mapsize = ['20arcsec', '20arcsec']
762 759 maptype = "ALMA"
763 760 obsmode = 'int'
828 825 self.refms_int = self.refpref_int+".ms"
829 826 # copy input data
830 827 self._copy_input([self.incomp, self.inmodel])
831 828
832 829 def tearDown(self):
833 830 if self.teardown and os.path.exists(self.project):
834 831 shutil.rmtree(self.project)
835 832 #pass
836 833
837 834 # Tests of skymodel + components list simulations
838 - @unittest.skipIf(is_CASA6,"unexpected comp_nchan keyword. - needs to be fixed")
839 835 def testSC_skymodel(self):
840 836 """Test skymodel + complist simulation: only modify model"""
841 837 skymodel = self.inmodel
842 838 complist = self.incomp
843 839 compwidth = self.compwidth
844 840 comp_nchan = self.comp_nchan
845 841 #setpointings = False
846 842 #ptgfile = # necessary even if only modifymodel
847 843 obsmode = ""
848 844 antennalist="alma.out01.cfg" # necessary even if only modifymodel
853 849 setpointings=True,obsmode=obsmode,
854 850 antennalist=antennalist,sdantlist=sdantlist,
855 851 thermalnoise="",graphics=self.graphics)
856 852 self.assertTrue(res)
857 853 # compare skymodel
858 854 currmodel = self.project + "/" + \
859 855 self._get_data_prefix(antennalist,self.project)+".skymodel.flat"
860 856 #self._get_data_prefix(antennalist,self.project)+".skymodel"
861 857 self._check_imstats(currmodel, self.refmodel)
862 858
863 - @unittest.skipIf(is_CASA6,"unexpected comp_nchan keyword. - needs to be fixed")
864 859 def testSC_almaptg(self):
865 860 """Test skymodel + complist simulation: only setpointing (maptype='ALMA')"""
866 861 skymodel = self.inmodel
867 862 complist = self.incomp
868 863 compwidth = self.compwidth
869 864 comp_nchan = self.comp_nchan
870 865 setpointings = True
871 866 maptype = "ALMA"
872 867 obsmode = ""
873 868 antennalist = "alma.out01.cfg"
879 874 obsmode=obsmode,antennalist=antennalist,
880 875 sdantlist=sdantlist,
881 876 thermalnoise="",graphics=self.graphics)
882 877 self.assertTrue(res)
883 878 # compare pointing files
884 879 currptg = self.project + "/" + \
885 880 self._get_data_prefix(antennalist,self.project)+".ptg.txt"
886 881 refptg = self.refpref + "alma.alma.out01.ptg.txt"
887 882 self._check_ptgfile(currptg, refptg)
888 883
889 - @unittest.skipIf(is_CASA6,"unexpected comp_nchan keyword. - needs to be fixed")
890 884 def testSC_hexptg(self):
891 885 """Test skymodel + complist simulation: only setpointing (maptype='hexagonal')"""
892 886 skymodel = self.inmodel
893 887 complist = self.incomp
894 888 compwidth = self.compwidth
895 889 comp_nchan = self.comp_nchan
896 890 setpointings = True
897 891 maptype = "hexagonal"
898 892 obsmode = ""
899 893 antennalist = "aca.i.cfg"
905 899 obsmode=obsmode,antennalist=antennalist,
906 900 sdantlist=sdantlist,
907 901 thermalnoise="",graphics=self.graphics)
908 902 self.assertTrue(res)
909 903 # compare pointing files
910 904 currptg = self.project + "/" + \
911 905 self._get_data_prefix(antennalist,self.project)+".ptg.txt"
912 906 refptg = self.refpref + "hex.aca.i.ptg.txt"
913 907 self._check_ptgfile(currptg, refptg)
914 908
915 - @unittest.skipIf(is_CASA6,"unexpected comp_nchan keyword. - needs to be fixed")
916 909 def testSC_sqptg(self):
917 910 """Test skymodel + complist simulation: only setpointing (maptype='square')"""
918 911 skymodel = self.inmodel
919 912 complist = self.incomp
920 913 compwidth = self.compwidth
921 914 comp_nchan = self.comp_nchan
922 915 setpointings = True
923 916 maptype = "square"
924 917 obsmode = ""
925 918 antennalist = ""

Everything looks good. We'll let you know here if there's anything you should know about.

Add shortcut