Exemplo n.º 1
0
 def test6(self):
     '''Listvis 6: MS with good scan (CAS-2112)'''
     output = out+'6'
     comp = 'compare.6'
     reference = reffile+'6'
     listvis(vis=msfile3,spw='4:1~2',selectdata=True,antenna='8',scan='3',listfile=output)
     self.assertTrue(lt.runTests(output,reference,'1.000',comp),
                     'New and reference files are different. %s != %s. '
                     'See the diff file.'%(output,reference))
Exemplo n.º 2
0
 def test3(self):
     '''Listvis 3: Float data column (CAS-2138)'''
     output = out+'3'
     comp = 'compare.3'
     reference = reffile+'3'
     listvis(vis=msfile2,datacolumn='float_data',listfile=output,
             spw='0:2001~2003')
     self.assertTrue(lt.runTests(output,reference,'1.000',comp),
                     'New and reference files are different. %s != %s. '
                     'See the diff file.'%(output,reference))
Exemplo n.º 3
0
 def test2(self):
     '''Listvis 2: Data column with different selections'''
     output = out+'2'
     comp = 'compare.2'
     reference = reffile+'2'        
     listvis(vis=msfile1,field='0',spw='0:1~2',selectdata=True, antenna='2&11',
             listfile=output)
     self.assertTrue(lt.runTests(output,reference,'1.000',comp),
                     'New and reference files are different. %s != %s. '
                     'See the diff file'%(output,reference))
Exemplo n.º 4
0
 def test5(self):
     '''Listvis 5: MS with blanked scan (CAS-2112)'''
     output = out+'5'
     comp = 'compare.5'
     reference = reffile+'5'
     listvis(vis=msfile3,datacolumn='data',listfile=output,spw='0:1~2',
             selectdata=True,antenna='1',scan='1')
     self.assertTrue(lt.runTests(output,reference,'1.000',comp),
                     'New and reference files are different. %s != %s. '
                     'See the diff file.'%(output,reference))
Exemplo n.º 5
0
 def test4(self):
     '''Listvis 4: Data with auto-correlation'''
     output = out+'4'
     comp = 'compare.4'
     reference = reffile+'4'
     listvis(vis=msfile1,datacolumn='data',listfile=output,
             spw='0:1',field='1',selectdata=True,antenna='2&&2')
     self.assertTrue(lt.runTests(output,reference,'1.000',comp),
                     'New and reference files are different. %s != %s. '
                     'See the diff file.'%(output,reference))
Exemplo n.º 6
0
    def test1(self):
        '''Listvis 1: Data column'''
        output = out+'1'
        comp = 'compare.1'
        reference = reffile+'1'
        listvis(vis=msfile1,datacolumn='data',listfile=output,
                field='2',spw='0:4~5',selectdata=True,antenna='8&9')

        self.assertTrue(lt.runTests(output,reference,'1.000',comp),
                        'New and reference files are different. %s != %s. '
                        'See the diff file'%(output,reference))
Exemplo n.º 7
0
 def test3(self):
     '''Listvis 3: Float data column (CAS-2138)'''
     output = out + '3'
     comp = 'compare.3'
     reference = reffile + '3'
     listvis(vis=msfile2,
             datacolumn='float_data',
             listfile=output,
             spw='0:2001~2003')
     self.assertTrue(
         lt.runTests(output, reference, '1.000', comp),
         'New and reference files are different. %s != %s. '
         'See the diff file.' % (output, reference))
Exemplo n.º 8
0
 def test2(self):
     '''Listvis 2: Data column with different selections'''
     output = out + '2'
     comp = 'compare.2'
     reference = reffile + '2'
     listvis(vis=msfile1,
             field='0',
             spw='0:1~2',
             selectdata=True,
             antenna='2&11',
             listfile=output)
     self.assertTrue(
         lt.runTests(output, reference, '1.000', comp),
         'New and reference files are different. %s != %s. '
         'See the diff file' % (output, reference))
Exemplo n.º 9
0
 def test6(self):
     '''Listvis 6: MS with good scan (CAS-2112)'''
     output = out + '6'
     comp = 'compare.6'
     reference = reffile + '6'
     listvis(vis=msfile3,
             spw='4:1~2',
             selectdata=True,
             antenna='8',
             scan='3',
             listfile=output)
     self.assertTrue(
         lt.runTests(output, reference, '1.000', comp),
         'New and reference files are different. %s != %s. '
         'See the diff file.' % (output, reference))
Exemplo n.º 10
0
 def test5(self):
     '''Listvis 5: MS with blanked scan (CAS-2112)'''
     output = out + '5'
     comp = 'compare.5'
     reference = reffile + '5'
     listvis(vis=msfile3,
             datacolumn='data',
             listfile=output,
             spw='0:1~2',
             selectdata=True,
             antenna='1',
             scan='1')
     self.assertTrue(
         lt.runTests(output, reference, '1.000', comp),
         'New and reference files are different. %s != %s. '
         'See the diff file.' % (output, reference))
Exemplo n.º 11
0
 def test4(self):
     '''Listvis 4: Data with auto-correlation'''
     output = out + '4'
     comp = 'compare.4'
     reference = reffile + '4'
     listvis(vis=msfile1,
             datacolumn='data',
             listfile=output,
             spw='0:1',
             field='1',
             selectdata=True,
             antenna='2&&2')
     self.assertTrue(
         lt.runTests(output, reference, '1.000', comp),
         'New and reference files are different. %s != %s. '
         'See the diff file.' % (output, reference))
Exemplo n.º 12
0
    def test1(self):
        '''Listvis 1: Data column'''
        output = out + '1'
        comp = 'compare.1'
        reference = reffile + '1'
        listvis(vis=msfile1,
                datacolumn='data',
                listfile=output,
                field='2',
                spw='0:4~5',
                selectdata=True,
                antenna='8&9')

        self.assertTrue(
            lt.runTests(output, reference, '1.000', comp),
            'New and reference files are different. %s != %s. '
            'See the diff file' % (output, reference))
Exemplo n.º 13
0
default(listcal)
vis                 =     msname        #  Name of input visibility file
caltable            = caltableName      #  Input calibration table to list
field               =         ''        #  Field name or index; ''==>all
antenna             =         ''        #  Antenna name or index; ''==>all; antenna='3'
spw                 =         ''        #  Spectral window and channel: ''==>all;
                                        #   spw='5:0~10'
listfile            = outputFilename    #  Disk file to write output: ''==>to terminal
pagerows            =         50        #  Rows per page
go(listcal)

# Remove first line of listcal output (contains hard-coded path)
lt.listcalFix(outputFilename)

compareFilename = prefix + 'compare'
if (lt.runTests(outputFilename,standardFileName,'1.000',compareFilename)): 
    print "Passed listcal output test"
    testPassed +=1
else:       
    print "FAILED listcal output test"
    testFailed +=1

##########################################################################                                                                        
# TEST - NGC4826 
# Using ngc4826 data from above.
#
testNum += 1
print ""
print "* TEST " + str(testNum) + ": using ngc4826 tutorial data and calibration."
print """
- Using same data as above