Example #1
0
    def setUp(self):
        # Input names
        self.prefix = 'ngc5921'
        self.msfile = self.prefix + '.ms'
#        if testmms:
#            self.msfile = self.prefix + '.mms'
                        
        self.gtable = self.prefix + '.ref1a.gcal'
        self.reffile = self.prefix + '.def.fcal'
        self.reffile2 = self.prefix + '.def.inc.fcal'
        self.tearDown()
        
        fpath = os.path.join(datapath,self.msfile)
        if os.path.lexists(fpath):        
            shutil.copytree(fpath, self.msfile, symlinks=True)
            fpath = os.path.join(datapath,self.gtable)
            shutil.copytree(fpath, self.gtable, symlinks=True)
            fpath = os.path.join(datapath,self.reffile)
            shutil.copytree(fpath, self.reffile, symlinks=True)
            fpath = os.path.join(datapath,self.reffile2)
            shutil.copytree(fpath, self.reffile2, symlinks=True)
        else:
            self.fail('Data does not exist -> '+fpath)

        default('fluxscale')
Example #2
0
    def setUp(self):
        self.res=None
        if os.path.exists(self.rawfile):
            shutil.rmtree(self.rawfile)
        shutil.copytree(self.datapath+self.rawfile, self.rawfile)

        default(sdimprocess)
Example #3
0
    def setUp(self):
        self.res=None
        for name in self.rawfiles:
            if (not os.path.exists(name)):
                shutil.copytree(self.datapath+name, name)

        default(sdimprocess)
Example #4
0
    def setUp_flags(self):
        res = None
        myasdmname = 'test_uid___A002_X997a62_X8c-short' # Flag.xml is modified

        datapath=os.environ.get('CASAPATH').split()[0]+'/data/regression/unittest/importasdm/'
        os.system('ln -sf '+datapath+myasdmname)
        default(importasdm)
Example #5
0
    def setUp(self):
        # Input names
        # ngc2403.tutorial.ms reduced in size
        prefix = 'n2403.short'
        self.prefix = prefix
        self.msfile = prefix + '.ms'
#        if testmms:
#            self.msfile = prefix + '.mms'

        self.gtable = prefix + '.flagFld1.gcal'
        self.reffile = prefix + '.flagFld1.ref.fcal'
        self.gtable2 = prefix + '.flagPartFld3.gcal'
        self.reffile2 = prefix + '.flagPartFld3.ref.fcal'

        fpath = os.path.join(datapath,self.msfile)
        if os.path.lexists(fpath):
            shutil.copytree(fpath, self.msfile, symlinks=True)
            fpath = os.path.join(datapath,self.gtable)
            shutil.copytree(fpath, self.gtable, symlinks=True)
            fpath = os.path.join(datapath,self.reffile)
            shutil.copytree(fpath, self.reffile, symlinks=True)
            fpath = os.path.join(datapath,self.gtable2)
            shutil.copytree(fpath, self.gtable2, symlinks=True)
            fpath = os.path.join(datapath,self.reffile2)
            shutil.copytree(fpath, self.reffile2, symlinks=True)
        else:
            self.fail('Data does not exist -> '+fpath)

        default('fluxscale')
Example #6
0
 def setUp_xosro(self):
     self.asdm = 'X_osro_013.55979.93803716435'
     datapath=os.environ.get('CASAPATH').split()[0]+'/data/regression/unittest/flagdata/'
     if(not os.path.lexists(self.asdm)):
         os.system('ln -s '+datapath+self.asdm +' '+self.asdm)
         
     default(importasdm)
Example #7
0
 def setUp_autocorr(self):
     self.asdm = 'AutocorrASDM'
     datapath=os.environ.get('CASAPATH').split()[0]+'/data/regression/unittest/importasdm/'
     if(not os.path.lexists(self.asdm)):
         os.system('ln -s '+datapath+self.asdm +' '+self.asdm)
         
     default(importasdm)
Example #8
0
    def setUp_12mex(self):
        res = None
        myasdmname = 'uid___A002_X71e4ae_X317_short' # 12m example ASDM with mixed pol/channelisation

        datapath=os.environ.get('CASAPATH').split()[0]+'/data/regression/asdm-import/input/'
        os.system('ln -sf '+datapath+myasdmname)
        default(importasdm)
Example #9
0
    def setUp(self):
        for infile in self.infiles:
            if os.path.exists(infile):
                shutil.rmtree(infile)
            shutil.copytree(self.datapath+infile, infile)

        default(sdlist)
Example #10
0
 def setUp(self):
     self.res = None
     default(smoothcal)
     datapath = os.environ.get('CASAPATH').split()[0] + '/data/regression/unittest/smoothcal/'
     shutil.copytree(datapath+self.msfile, self.msfile)
     shutil.copytree(datapath+self.gcal, self.gcal)
     shutil.copytree(datapath+self.ref, self.ref)
Example #11
0
    def _setUp(self, files, task):
        for f in files:
            if os.path.exists(f):
                shutil.rmtree(f)
            copytree_ignore_subversion(self.datapath, f)

        default(task)
Example #12
0
 def setUp(self):    
     self.rval = False
     #if(not os.path.exists(vis_a)):
     #    importuvfits(fitsfile=os.environ['CASADATA']+'/regression/ngc4826/fitsfiles/ngc4826.ll.fits5', vis=vis_a)
     if(not os.path.exists(self.vis_b)):
         os.system('cp -R '+os.environ['CASAPATH'].split()[0]+'/data/regression/fits-import-export/input/test.ms .')
     if(not os.path.exists(self.vis_c)):
         os.system('cp -R '+os.environ['CASAPATH'].split()[0]+'/data/regression/exportasdm/input/M100-X220-shortened.ms .')
     if(not os.path.exists(self.vis_d)):
         importuvfits(fitsfile=os.environ['CASAPATH'].split()[0]+'/data/regression/ngc4826/fitsfiles/ngc4826.ll.fits5', 
                      vis=self.vis_d)
     if(not os.path.exists(self.vis_e)):
         os.system('cp -R '+os.environ['CASAPATH'].split()[0]+'/data/regression/cvel/input/g19_d2usb_targets_line-shortened.ms .')
     if(not os.path.exists(self.vis_f)):
         os.system('cp -R '+os.environ['CASAPATH'].split()[0]+'/data/regression/exportasdm/input/Itziar.ms .')            
     if(not os.path.exists(self.vis_g)):
         os.system('cp -R '+os.environ['CASAPATH'].split()[0]+'/data/regression/exportasdm/input/M51.ms .')
     if(not os.path.exists(self.vis_h)):
         os.system('ln -sf '+os.environ['CASAPATH'].split()[0]+'/data/regression/unittest/importevla/X_osro_013.55979.93803716435')
         importevla('X_osro_013.55979.93803716435', vis = 'xosro2ref.ms', online=False, scans='0:2')
     if(not os.path.exists(self.vis_i)):
         os.system('ln -sf '+os.environ['CASAPATH'].split()[0]+'/data/regression/asdm-import/input/uid___A002_X72bc38_X000')
         importasdm('uid___A002_X72bc38_X000', vis = 'asdm.ms', scans='0:2')
         
     default(exportasdm)
Example #13
0
    def setUp(self):
        self.msfile = "ngc5921_add_corect_model.ms"
        self.msfile2 ="OrionS_rawACSmod_calave.ms"
        self.msfile2_asap="OrionS_rawACSmod_calave.asap"
        self.msfile3="OrionS_rawACSmod_calave_intent_on1_off3.ms"
        self.msfile4="OrionS_rawACSmod_calave_intent_on1.ms"
        self.msfile5="OrionS_rawACSmod_calave_intent_on3_off1.ms"
        self.msfile6="OrionS_rawACSmod_calave_intent_off1.ms"
        self.msfile7="visstat2_test6_scan.txt"
        self.msfile8="visstat2_test6_amp.txt"
        self.msfile9="visstat2_test5.txt"
        self.msfile10="visstat2_test7.txt"
        self.msfile11="visstat2_test8.txt"
        self.msfile13='visstat2_test10_check_on.txt'
        self.msfile14='visstat2_test10_check_off.txt'

        shutil.copytree(datapath+self.msfile, self.msfile)
        shutil.copytree(datapath+self.msfile2, self.msfile2)
        shutil.copytree(datapath+self.msfile2_asap, self.msfile2_asap)
        shutil.copytree(datapath+self.msfile3, self.msfile3)
        shutil.copytree(datapath+self.msfile4, self.msfile4)
        shutil.copytree(datapath+self.msfile5, self.msfile5)
        shutil.copytree(datapath+self.msfile6, self.msfile6)
        shutil.copyfile(datapath+self.msfile7, self.msfile7)
        shutil.copyfile(datapath+self.msfile8, self.msfile8)
        shutil.copyfile(datapath+self.msfile9, self.msfile9)
        shutil.copyfile(datapath+self.msfile10, self.msfile10)
        shutil.copyfile(datapath+self.msfile11, self.msfile11)
        shutil.copyfile(datapath+self.msfile13, self.msfile13)
        shutil.copyfile(datapath+self.msfile14, self.msfile14)

        default('visstat2')
Example #14
0
    def setUp(self):    
        self.rval = False

        if(not os.path.exists(self.vis_f)):
            rval = os.system('cp -R '+os.environ['CASAPATH'].split()[0]+'/data/regression/unittest/wvrgcal/input/multisource_unittest.ms .')
            if rval!=0:
                raise Exception, "Error copying input data"
        if(not os.path.exists(self.vis_g)):
            rval = os.system('cp -R '+os.environ['CASAPATH'].split()[0]+'/data/regression/unittest/wvrgcal/input/wvrgcal4quasar_10s.ms .')
            if rval!=0:
                raise Exception, "Error copying input data"
        if(not os.path.exists(self.vis_h)):
            rval = os.system('cp -R '+os.environ['CASAPATH'].split()[0]+'/data/regression/unittest/wvrgcal/input/uid___A002_X8ca70c_X5_shortened.ms .')
            if rval!=0:
                raise Exception, "Error copying input data"
        for i in range(0,len(self.ref)):
            if(not os.path.exists(self.ref[i])):
                rval = os.system('cp -R '+os.environ['CASAPATH'].split()[0]+'/data/regression/unittest/wvrgcal/input/'+self.ref[i]+' .')
                if rval!=0:
                    raise Exception, "Error copying input data"

        if self.makeref:
            print "Will create copies of generated caltables in directory \"newref\""
            os.system('mkdir -p newref')

        default(wvrgcal)
Example #15
0
    def setUp(self):
        for infile in self.infiles:
            if os.path.exists(infile):
                shutil.rmtree(infile)
            shutil.copytree(self.datapath + infile, infile)

        default(sdlistold)
Example #16
0
    def setUp(self):
        self.__copy_from_datapath(self.infile)
        
        if hasattr(self, 'reffile'):
            self.__copy_from_datapath(self.reffile)

        default(sdgaincal)
Example #17
0
    def _setUp(self, files, task):
        for f in files:
            if os.path.exists(f):
                shutil.rmtree(f)
            copytree_ignore_subversion(self.datapath, f)

        default(task)
Example #18
0
    def setUp_eph(self):
        res = None
        myasdmname = 'uid___A002_X997a62_X8c-short' # 12m example ASDM with ephemerides

        datapath=os.environ.get('CASAPATH').split()[0]+'/data/regression/asdm-import/input/'
        os.system('ln -sf '+datapath+myasdmname)
        default(importasdm)
Example #19
0
 def setUp(self):
     res = None
     shutil.rmtree(outms, ignore_errors=True)
     shutil.copytree(datapath + inpms, outms)
     shutil.rmtree(outms2, ignore_errors=True)
     os.system('cp -R '+datapath+inpms2 + ' ' + outms2) 
     #shutil.copytree(datapath + inpms2, outms2)
     default(fixplanets)
Example #20
0
 def setUp(self):
     default(initweights)
     for name in self.templist:
         # remove old ones (if exists)
         if (os.path.exists(name)):
             shutil.rmtree(name)
         # copy a new ones
         shutil.copytree(self.datapath+name, name)
Example #21
0
 def setUp(self):
     # MS in repository was flagged with the following command:
     # flagdata(vis=self.msfile, antenna='17', flagbackup=False)
     self.msfile = "ngc5921.ms"
     if(not os.path.exists(self.msfile)):
         shutil.copytree(datapath+self.msfile, self.msfile)
         
     default('visstat')
Example #22
0
    def setUp(self):
        self.res = None
        default(clean)
        if (os.path.exists(self.msfile)):
            os.system('rm -rf ' + self.msfile)

        datapath = os.environ.get('CASAPATH').split()[0] + '/data/regression/unittest/clean/'
        shutil.copytree(datapath+self.msfile, self.msfile)
Example #23
0
    def setUp_CAS_6941(self):

        self.vis = 'CAS-6941.ms'
        if os.path.exists(self.vis):
           self.cleanup()
            
        os.system('cp -RL '+datapath + self.vis +' '+ self.vis)
        default(mstransform) 
Example #24
0
    def setUp_autocorr(self):
        self.asdm = 'AutocorrASDM'
        datapath = os.environ.get(
            'CASAPATH').split()[0] + '/data/regression/unittest/importasdm/'
        if (not os.path.lexists(self.asdm)):
            os.system('ln -s ' + datapath + self.asdm + ' ' + self.asdm)

        default(importasdm)
Example #25
0
    def setUp(self):
        if os.path.exists(self.infile):
            shutil.rmtree(self.infile)
        shutil.copytree(self.datapath+self.infile, self.infile)
        if os.path.exists(self.vdir):
            shutil.rmtree(self.vdir)

        default(sdflagmanagerold)
Example #26
0
    def setUp_flags(self):
        res = None
        myasdmname = 'test_uid___A002_X997a62_X8c-short'  # Flag.xml is modified

        datapath = os.environ.get(
            'CASAPATH').split()[0] + '/data/regression/unittest/importasdm/'
        os.system('ln -sf ' + datapath + myasdmname)
        default(importasdm)
Example #27
0
    def setUp_eph(self):
        res = None
        myasdmname = 'uid___A002_X997a62_X8c-short'  # 12m example ASDM with ephemerides

        datapath = os.environ.get(
            'CASAPATH').split()[0] + '/data/regression/asdm-import/input/'
        os.system('ln -sf ' + datapath + myasdmname)
        default(importasdm)
Example #28
0
    def setUp_12mex(self):
        res = None
        myasdmname = 'uid___A002_X71e4ae_X317_short'  # 12m example ASDM with mixed pol/channelisation

        datapath = os.environ.get(
            'CASAPATH').split()[0] + '/data/regression/asdm-import/input/'
        os.system('ln -sf ' + datapath + myasdmname)
        default(importasdm)
Example #29
0
    def setUp(self):
        self.res=None
        if (not os.path.exists(self.infile)):
            shutil.copytree(self.datapath+self.infile, self.infile)
        if (not os.path.exists(self.refimage)):
            shutil.copytree(self.datapath+self.refimage, self.refimage)

        default(sdtpimaging)
Example #30
0
    def setUp_xosro(self):
        self.asdm = 'X_osro_013.55979.93803716435'
        datapath = os.environ.get(
            'CASAPATH').split()[0] + '/data/regression/unittest/flagdata/'
        if (not os.path.lexists(self.asdm)):
            os.system('ln -s ' + datapath + self.asdm + ' ' + self.asdm)

        default(importasdm)
Example #31
0
    def setUp_SD(self):
        res = None
        # Single-dish ASDM, 1 scan, 9 spws, 4 antennas, 10 baselines,  4 auto-corrs + cross
        myasdmname = 'uid___A002_X6218fb_X264'  

        datapath=os.environ.get('CASAPATH').split()[0]+'/data/regression/alma-sd/M100/'
        os.system('ln -sf '+datapath+myasdmname)
        default(importasdm)
Example #32
0
 def setUp(self):
     self.res = None
     default(smoothcal)
     datapath = os.environ.get(
         'CASAPATH').split()[0] + '/data/regression/unittest/smoothcal/'
     shutil.copytree(datapath + self.msfile, self.msfile)
     shutil.copytree(datapath + self.gcal, self.gcal)
     shutil.copytree(datapath + self.ref, self.ref)
Example #33
0
    def setUp_g19(self):
        # data with spw=0~23 128 channel each in LSRK, field=0,1
        self.vis = 'g19_d2usb_targets_line-shortened-thinned.ms'
        if os.path.exists(self.vis):
           self.cleanup()

        os.system('cp -RL '+datapath + self.vis +' '+ self.vis)
        default(mstransform)
Example #34
0
 def setUp(self):
     if hasattr(self, "inputs"):
         for infile in self.inputs:
             # print 'copying %s...'%(infile)
             if os.path.exists(infile):
                 shutil.rmtree(infile)
             shutil.copytree(os.path.join(self.datapath, infile), infile)
     default(sdfit)
Example #35
0
    def setUp_jupiter(self):
        # data col, spw=0,1 1 channel each, TOPO, field=0~12, 93 scans
        self.vis = 'jupiter6cm.demo-thinned.ms'
        if os.path.exists(self.vis):
           self.cleanup()

        os.system('cp -RL '+datapath + self.vis +' '+ self.vis)
        default(mstransform)
Example #36
0
    def setUp_CAS_5013(self):

        self.vis = 'ALMA-data-mst-science-testing-CAS-5013-one-baseline-one-timestamp.ms'
        if os.path.exists(self.vis):
           self.cleanup()

        os.system('cp -RL '+datapath + self.vis +' '+ self.vis)
        default(mstransform)
Example #37
0
    def setUp_SD(self):
        res = None
        # Single-dish ASDM, 1 scan, 9 spws, 4 antennas, 10 baselines,  4 auto-corrs + cross
        myasdmname = 'uid___A002_X6218fb_X264'

        datapath = os.environ.get(
            'CASAPATH').split()[0] + '/data/regression/alma-sd/M100/'
        os.system('ln -sf ' + datapath + myasdmname)
        default(importasdm)
Example #38
0
 def setUp_SD(self):
     res = None
     # Single-dish ASDM with 3 antennas and 6 baselines in total
     self.vis = 'uid___A002_X85c183_X36f_small.ms' 
     datapath=os.environ.get('CASAPATH').split()[0]+'/data/regression/unittest/partition/'
     if not os.path.exists(self.vis):
         os.system('ln -sf ' + datapath + self.vis +' '+ self.vis)
         
     default(partition)
Example #39
0
 def setUp(self):
     res = None
     if not os.path.exists(inpms):
         shutil.copytree(datapath + inpms, inpms)
     if not os.path.exists(inpms2):
         shutil.copytree(datapath2 + inpms2, inpms2)
     default(fixvis)
     shutil.rmtree(outms, ignore_errors=True)
     shutil.rmtree(outms2, ignore_errors=True)
Example #40
0
 def setUp(self):
     self.res = None
     if (os.path.exists(self.fits)):
         os.system('rm -rf '+ self.fits)
         
     datapath = os.environ.get('CASAPATH').split()[0] + '/data/regression/ngc5921/'
     shutil.copyfile(datapath+self.fits, self.fits)
     importuvfits(fitsfile=self.fits, vis=self.msfile)
     default(csvclean)