casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables
test_importfitsidi.py
Go to the documentation of this file.
00001 #############################################################################
00002 # $Id:$
00003 # Test Name:                                                                #
00004 #    Regression Test Script for the FITS-IDI import to MS                   #
00005 #    
00006 #                                                                           #
00007 # Rationale for Inclusion:                                                  #
00008 #    The conversion of FITS-IDI to MS needs to be verified.                 #
00009 #                                                                           # 
00010 # Features tested:                                                          #
00011 #    1) Is the import performed without raising exceptions                  #
00012 #    2) Do all expected tables exist                                        #
00013 #    3) Can the MS be opened                                                #
00014 #    4) Do the tables contain expected values                               #
00015 #    5) Can several FITS-IDI files be read into one MS                      #
00016 #                                                                           #
00017 # Input data:                                                               #
00018 #                                                                           #
00019 #############################################################################
00020 import os
00021 import sys
00022 import shutil
00023 from __main__ import default
00024 from tasks import *
00025 from taskinit import *
00026 import unittest
00027 
00028 myname = 'importfitsidi-unit-test'
00029 
00030 # default dataset name
00031 my_dataset_names = ['n09q2_1_1-shortened.IDI1',
00032                     'n09q2_1_1-shortened-part1.IDI1',
00033                     'n09q2_1_1-shortened-part2.IDI1',
00034                     'emerlin_multiuv.IDI1']
00035 
00036 # name of the resulting MS
00037 msname = my_dataset_names[0]+'.ms'
00038 
00039 def checktable(thename, theexpectation):
00040     global msname, myname
00041     tb.open(msname+"/"+thename)
00042     if thename == "":
00043         thename = "MAIN"
00044     for mycell in theexpectation:
00045         print myname, ": comparing ", mycell
00046         value = tb.getcell(mycell[0], mycell[1])
00047         # see if value is array
00048         try:
00049             isarray = value.__len__
00050         except:
00051             # it's not an array
00052             # zero tolerance?
00053             if mycell[3] == 0:
00054                 in_agreement = (value == mycell[2])
00055             else:
00056                 in_agreement = ( abs(value - mycell[2]) < mycell[3]) 
00057         else:
00058             if isinstance(value, basestring):
00059                 in_agreement = value == mycell[2]
00060             else:
00061                 # it's an array
00062                 # zero tolerance?
00063                 if mycell[3] == 0:
00064                     in_agreement =  (value == mycell[2]).all() 
00065                 else:
00066                     try:
00067                         in_agreement = (abs(value - mycell[2]) < mycell[3]).all()
00068                     except:
00069                         in_agreement = False
00070         if not in_agreement:
00071             print myname, ":  Error in MS subtable", thename, ":"
00072             print "     column ", mycell[0], " row ", mycell[1], " contains ", value
00073             print "     expected value is ", mycell[2]
00074             tb.close()
00075             return False
00076     tb.close()
00077     print myname, ": table ", thename, " as expected."
00078     return True
00079 
00080 
00081 ###########################
00082 # beginning of actual test 
00083 
00084 class test_importfitsidi(unittest.TestCase):
00085     
00086     def setUp(self):
00087         res = None
00088 
00089         datapath=os.environ.get('CASAPATH').split()[0]+'/data/regression/fitsidi_import/input/'
00090         for fname in my_dataset_names:
00091             if(os.path.exists(fname)):
00092                 os.remove(fname)
00093             shutil.copy(datapath + fname, fname)
00094         default(importfitsidi)
00095         
00096     def tearDown(self):
00097         for fname in my_dataset_names:
00098             os.remove(fname)
00099         shutil.rmtree(msname,ignore_errors=True)
00100         shutil.rmtree(msname+'.flagversions',ignore_errors=True)
00101         
00102     def test1(self):
00103         '''fitsidi-import: Test good input'''
00104         retValue = {'success': True, 'msgs': "", 'error_msgs': '' }    
00105 
00106         self.res = importfitsidi(my_dataset_names[0], msname)
00107         print myname, ": Success! Now checking output ..."
00108         mscomponents = set(["table.dat",
00109 #                            "table.f0",
00110                             "table.f1",
00111                             "table.f2",
00112                             "table.f3",
00113                             "table.f4",
00114                             "table.f5",
00115                             "table.f6",
00116                             "table.f7",
00117                             "table.f8",
00118                             "ANTENNA/table.dat",
00119                             "DATA_DESCRIPTION/table.dat",
00120                             "FEED/table.dat",
00121                             "FIELD/table.dat",
00122                             "FLAG_CMD/table.dat",
00123                             "HISTORY/table.dat",
00124                             "OBSERVATION/table.dat",
00125                             "POINTING/table.dat",
00126                             "POLARIZATION/table.dat",
00127                             "PROCESSOR/table.dat",
00128                             "SOURCE/table.dat",
00129                             "SPECTRAL_WINDOW/table.dat",
00130                             "STATE/table.dat",
00131                             "ANTENNA/table.f0",
00132                             "DATA_DESCRIPTION/table.f0",
00133                             "FEED/table.f0",
00134                             "FIELD/table.f0",
00135                             "FLAG_CMD/table.f0",
00136                             "HISTORY/table.f0",
00137                             "OBSERVATION/table.f0",
00138                             "POINTING/table.f0",
00139                             "POLARIZATION/table.f0",
00140                             "PROCESSOR/table.f0",
00141                             "SOURCE/table.f0",
00142                             "SPECTRAL_WINDOW/table.f0",
00143                             "STATE/table.f0"
00144                             ])
00145         for name in mscomponents:
00146             if not os.access(msname+"/"+name, os.F_OK):
00147                 print myname, ": Error  ", msname+"/"+name, "doesn't exist ..."
00148                 retValue['success']=False
00149                 retValue['error_msgs']=retValue['error_msgs']+msname+'/'+name+' does not exist'
00150             else:
00151                 print myname, ": ", name, "present."
00152         print myname, ": MS exists. All tables present. Try opening as MS ..."
00153         try:
00154             ms.open(msname)
00155         except:
00156             print myname, ": Error  Cannot open MS table", tablename
00157             retValue['success']=False
00158             retValue['error_msgs']=retValue['error_msgs']+'Cannot open MS table '+tablename
00159         else:
00160             ms.close()
00161             print myname, ": OK. Checking tables in detail ..."
00162             retValue['success']=True
00163     
00164             # check main table first
00165             name = ""
00166             #             col name, row number, expected value, tolerance
00167             expected = [
00168                          ['UVW',       42, [ 0., 0., 0. ], 1E-8],
00169                          ['EXPOSURE',  42, 2.0, 1E-8],
00170                          ['DATA',      42,[[ 1.06945515 +7.91624188e-09j,
00171                                              0.98315531 +9.31322575e-10j,
00172                                              1.05244470 +5.77396486e-09j,
00173                                              0.90496856 -0.00000000e+00j,
00174                                              0.93005872 -6.71682887e-09j,
00175                                              0.80769897 -0.00000000e+00j,
00176                                              0.93059886 -6.97121116e-09j,
00177                                              0.77081358 -0.00000000e+00j,
00178                                              0.93020338 -7.45058060e-09j,
00179                                              0.83353537 -0.00000000e+00j,
00180                                              0.91982168 -5.54113422e-09j,
00181                                              0.88411278 -4.65661287e-10j,
00182                                              1.02857709 +5.78550630e-09j,
00183                                              0.93398595 -0.00000000e+00j,
00184                                              1.13884020 +1.01289768e-08j,
00185                                              2.49237108 -0.00000000e+00j ]], 1E-8]
00186                          ]
00187             results = checktable(name, expected)
00188             if not results:
00189                 retValue['success']=False
00190                 retValue['error_msgs']=retValue['error_msgs']+'Check of table '+name+' failed'
00191     
00192             expected = [
00193                          ['UVW',       638, [171529.37575288, -786712.70341456, 210321.20978818], 1E-8],
00194                          ['EXPOSURE',  638,  2.0, 1E-8],
00195                          ['DATA',      638, [[-0.00224198+0.00067056j,
00196                                               -0.00475123+0.0024323j,
00197                                               -0.00416393+0.00212671j,
00198                                               -0.00565350+0.00340364j,
00199                                               -0.00527357+0.00011977j,
00200                                               -0.00292699+0.00131954j,
00201                                               -0.00429945+0.00035823j,
00202                                               -0.00545671-0.00033945j,
00203                                               -0.00646004+0.00037293j,
00204                                               -0.00419376-0.00115011j,
00205                                               -0.00508117+0.00045939j,
00206                                               -0.00501660-0.00047975j,
00207                                               -0.00444734-0.00101535j,
00208                                               -0.00384988-0.00102731j,
00209                                               -0.00551326+0.00101364j,
00210                                               -0.00337701+0.00080481j]], 1E-8]
00211                          ]
00212             results = checktable(name, expected)
00213             if not results:
00214                 retValue['success']=False
00215                 retValue['error_msgs']=retValue['error_msgs']+'Check of table '+name+' failed'
00216             
00217             name = "ANTENNA"
00218             expected = [ ['OFFSET',       1, [ 0.,  0.,  0.], 0],
00219                          ['POSITION',     1, [ 3370605.8469,  711917.6732,  5349830.8438], 0.0001],
00220                          ['DISH_DIAMETER',1, 0.0, 0.0] # the EVN default value
00221                          ]
00222             results = checktable(name, expected)
00223             if not results:
00224                 retValue['success']=False
00225                 retValue['error_msgs']=retValue['error_msgs']+'Check of table '+name+' failed'
00226             
00227             name = "SPECTRAL_WINDOW"
00228             expected = [ ['NUM_CHAN',        7, 16, 0],
00229                          ['TOTAL_BANDWIDTH', 7, 8E6, 0],
00230                          ['CHAN_WIDTH',      7, [ 500000.,  500000.,  500000.,  500000.,  500000.,  500000.,
00231                                                   500000.,  500000.,  500000.,  500000.,  500000.,  500000.,
00232                                                   500000.,  500000.,  500000.,  500000.], 1E-8],
00233                          ['CHAN_FREQ',       7, [  4.32184900e+10,   4.32189900e+10,   4.32194900e+10,   4.32199900e+10,
00234                                                    4.32204900e+10,   4.32209900e+10,   4.32214900e+10,   4.32219900e+10,
00235                                                    4.32224900e+10,   4.32229900e+10,   4.32234900e+10,   4.32239900e+10,
00236                                                    4.32244900e+10,   4.32249900e+10,   4.32254900e+10,   4.32259900e+10], 1E-8]
00237                          ]
00238             results = checktable(name, expected)
00239             if not results:
00240                 retValue['success']=False
00241                 retValue['error_msgs']=retValue['error_msgs']+'Check of table '+name+' failed'
00242                 
00243         self.assertTrue(retValue['success'])
00244 
00245     def test2(self):
00246         '''fitsidi-import: Test good input, list of two input files'''
00247         retValue = {'success': True, 'msgs': "", 'error_msgs': '' }    
00248 
00249         self.res = importfitsidi([my_dataset_names[1],my_dataset_names[2]], msname)
00250         print myname, ": Success! Now checking output ..."
00251         mscomponents = set(["table.dat",
00252 #                            "table.f0",
00253                             "table.f1",
00254                             "table.f2",
00255                             "table.f3",
00256                             "table.f4",
00257                             "table.f5",
00258                             "table.f6",
00259                             "table.f7",
00260                             "table.f8",
00261                             "ANTENNA/table.dat",
00262                             "DATA_DESCRIPTION/table.dat",
00263                             "FEED/table.dat",
00264                             "FIELD/table.dat",
00265                             "FLAG_CMD/table.dat",
00266                             "HISTORY/table.dat",
00267                             "OBSERVATION/table.dat",
00268                             "POINTING/table.dat",
00269                             "POLARIZATION/table.dat",
00270                             "PROCESSOR/table.dat",
00271                             "SOURCE/table.dat",
00272                             "SPECTRAL_WINDOW/table.dat",
00273                             "STATE/table.dat",
00274                             "ANTENNA/table.f0",
00275                             "DATA_DESCRIPTION/table.f0",
00276                             "FEED/table.f0",
00277                             "FIELD/table.f0",
00278                             "FLAG_CMD/table.f0",
00279                             "HISTORY/table.f0",
00280                             "OBSERVATION/table.f0",
00281                             "POINTING/table.f0",
00282                             "POLARIZATION/table.f0",
00283                             "PROCESSOR/table.f0",
00284                             "SOURCE/table.f0",
00285                             "SPECTRAL_WINDOW/table.f0",
00286                             "STATE/table.f0"
00287                             ])
00288         for name in mscomponents:
00289             if not os.access(msname+"/"+name, os.F_OK):
00290                 print myname, ": Error  ", msname+"/"+name, "doesn't exist ..."
00291                 retValue['success']=False
00292                 retValue['error_msgs']=retValue['error_msgs']+msname+'/'+name+' does not exist'
00293             else:
00294                 print myname, ": ", name, "present."
00295         print myname, ": MS exists. All tables present. Try opening as MS ..."
00296         try:
00297             ms.open(msname)
00298         except:
00299             print myname, ": Error  Cannot open MS table", tablename
00300             retValue['success']=False
00301             retValue['error_msgs']=retValue['error_msgs']+'Cannot open MS table '+tablename
00302         else:
00303             ms.close()
00304             print myname, ": OK. Checking tables in detail ..."
00305             retValue['success']=True
00306     
00307             # check main table first
00308             name = ""
00309             #             col name, row number, expected value, tolerance
00310             expected = [
00311                          ['UVW',       42, [ 0., 0., 0. ], 1E-8],
00312                          ['EXPOSURE',  42, 2.0, 1E-8],
00313                          ['DATA',      42,[[ 1.06945515 +7.91624188e-09j,
00314                                              0.98315531 +9.31322575e-10j,
00315                                              1.05244470 +5.77396486e-09j,
00316                                              0.90496856 -0.00000000e+00j,
00317                                              0.93005872 -6.71682887e-09j,
00318                                              0.80769897 -0.00000000e+00j,
00319                                              0.93059886 -6.97121116e-09j,
00320                                              0.77081358 -0.00000000e+00j,
00321                                              0.93020338 -7.45058060e-09j,
00322                                              0.83353537 -0.00000000e+00j,
00323                                              0.91982168 -5.54113422e-09j,
00324                                              0.88411278 -4.65661287e-10j,
00325                                              1.02857709 +5.78550630e-09j,
00326                                              0.93398595 -0.00000000e+00j,
00327                                              1.13884020 +1.01289768e-08j,
00328                                              2.49237108 -0.00000000e+00j ]], 1E-8]
00329                          ]
00330             results = checktable(name, expected)
00331             if not results:
00332                 retValue['success']=False
00333                 retValue['error_msgs']=retValue['error_msgs']+'Check of table '+name+' failed'
00334     
00335             expected = [
00336                          ['UVW',       638, [171529.37575288, -786712.70341456, 210321.20978818], 1E-8],
00337                          ['EXPOSURE',  638,  2.0, 1E-8],
00338                          ['DATA',      638, [[-0.00224198+0.00067056j,
00339                                               -0.00475123+0.0024323j,
00340                                               -0.00416393+0.00212671j,
00341                                               -0.00565350+0.00340364j,
00342                                               -0.00527357+0.00011977j,
00343                                               -0.00292699+0.00131954j,
00344                                               -0.00429945+0.00035823j,
00345                                               -0.00545671-0.00033945j,
00346                                               -0.00646004+0.00037293j,
00347                                               -0.00419376-0.00115011j,
00348                                               -0.00508117+0.00045939j,
00349                                               -0.00501660-0.00047975j,
00350                                               -0.00444734-0.00101535j,
00351                                               -0.00384988-0.00102731j,
00352                                               -0.00551326+0.00101364j,
00353                                               -0.00337701+0.00080481j]], 1E-8]
00354                          ]
00355             results = checktable(name, expected)
00356             if not results:
00357                 retValue['success']=False
00358                 retValue['error_msgs']=retValue['error_msgs']+'Check of table '+name+' failed'
00359             
00360             name = "ANTENNA"
00361             expected = [ ['OFFSET',       1, [ 0.,  0.,  0.], 0],
00362                          ['POSITION',     1, [ 3370605.8469,  711917.6732,  5349830.8438], 0.0001],
00363                          ['DISH_DIAMETER',1, 0.0, 0.0] # the EVN default value
00364                          ]
00365             results = checktable(name, expected)
00366             if not results:
00367                 retValue['success']=False
00368                 retValue['error_msgs']=retValue['error_msgs']+'Check of table '+name+' failed'
00369             
00370             name = "SPECTRAL_WINDOW"
00371             expected = [ ['NUM_CHAN',        7, 16, 0],
00372                          ['TOTAL_BANDWIDTH', 7, 8E6, 0],
00373                          ['CHAN_WIDTH',      7, [ 500000.,  500000.,  500000.,  500000.,  500000.,  500000.,
00374                                                   500000.,  500000.,  500000.,  500000.,  500000.,  500000.,
00375                                                   500000.,  500000.,  500000.,  500000.], 1E-8],
00376                          ['CHAN_FREQ',       7, [  4.32184900e+10,   4.32189900e+10,   4.32194900e+10,   4.32199900e+10,
00377                                                    4.32204900e+10,   4.32209900e+10,   4.32214900e+10,   4.32219900e+10,
00378                                                    4.32224900e+10,   4.32229900e+10,   4.32234900e+10,   4.32239900e+10,
00379                                                    4.32244900e+10,   4.32249900e+10,   4.32254900e+10,   4.32259900e+10], 1E-8]
00380                          ]
00381             results = checktable(name, expected)
00382             if not results:
00383                 retValue['success']=False
00384                 retValue['error_msgs']=retValue['error_msgs']+'Check of table '+name+' failed'
00385                 
00386         self.assertTrue(retValue['success'])
00387 
00388     def test3(self):
00389         '''fitsidi-import: Test antenna name and multi uvtable'''
00390         retValue = {'success': True, 'msgs': "", 'error_msgs': '' }    
00391 
00392         self.res = importfitsidi(my_dataset_names[3], msname)
00393         print myname, ": Success! Now checking output ..."
00394         mscomponents = set(["table.dat",
00395 #                            "table.f0",
00396                             "table.f1",
00397                             "table.f2",
00398                             "table.f3",
00399                             "table.f4",
00400                             "table.f5",
00401                             "table.f6",
00402                             "table.f7",
00403                             "table.f8",
00404                             "ANTENNA/table.dat",
00405                             "DATA_DESCRIPTION/table.dat",
00406                             "FEED/table.dat",
00407                             "FIELD/table.dat",
00408                             "FLAG_CMD/table.dat",
00409                             "HISTORY/table.dat",
00410                             "OBSERVATION/table.dat",
00411                             "POINTING/table.dat",
00412                             "POLARIZATION/table.dat",
00413                             "PROCESSOR/table.dat",
00414                             "SOURCE/table.dat",
00415                             "SPECTRAL_WINDOW/table.dat",
00416                             "STATE/table.dat",
00417                             "ANTENNA/table.f0",
00418                             "DATA_DESCRIPTION/table.f0",
00419                             "FEED/table.f0",
00420                             "FIELD/table.f0",
00421                             "FLAG_CMD/table.f0",
00422                             "HISTORY/table.f0",
00423                             "OBSERVATION/table.f0",
00424                             "POINTING/table.f0",
00425                             "POLARIZATION/table.f0",
00426                             "PROCESSOR/table.f0",
00427                             "SOURCE/table.f0",
00428                             "SPECTRAL_WINDOW/table.f0",
00429                             "STATE/table.f0"
00430                             ])
00431         for name in mscomponents:
00432             if not os.access(msname+"/"+name, os.F_OK):
00433                 print myname, ": Error  ", msname+"/"+name, "doesn't exist ..."
00434                 retValue['success']=False
00435                 retValue['error_msgs']=retValue['error_msgs']+msname+'/'+name+' does not exist'
00436             else:
00437                 print myname, ": ", name, "present."
00438         print myname, ": MS exists. All tables present. Try opening as MS ..."
00439         try:
00440             ms.open(msname)
00441         except:
00442             print myname, ": Error  Cannot open MS table", tablename
00443             retValue['success']=False
00444             retValue['error_msgs']=retValue['error_msgs']+'Cannot open MS table '+tablename
00445         else:
00446             ms.close()
00447             print myname, ": OK. Checking tables in detail ..."
00448             retValue['success']=True
00449     
00450             # check main table first
00451             name = ""
00452             
00453             #             col name, row number, expected value, tolerance
00454             # this is the first row of the second uv table
00455             expected = [
00456                          ['UVW',       253, [ 209524.112917,-52443.4688607,-25501.833085 ], 1E-6],
00457                          ['EXPOSURE',  253, 1.0, 1E-8],
00458                          ['WEIGHT',    253, 1.0, 1E-8]
00459                          ]
00460             results = checktable(name, expected)
00461             if not results:
00462                 retValue['success']=False
00463                 retValue['error_msgs']=retValue['error_msgs']+'Check of table '+name+' failed'
00464     
00465             
00466             name = "ANTENNA"
00467             expected = [ ['OFFSET',       1, [ 0.,  0.,  0.], 0],
00468                          ['POSITION',     1, [ 3859711.503, -201995.077, 5056134.251], 0.001],
00469                          ['DISH_DIAMETER',1, 15.0, 0.001],
00470                          ['NAME',         1, 'Kn', 0]
00471                          ]
00472             results = checktable(name, expected)
00473             if not results:
00474                 retValue['success']=False
00475                 retValue['error_msgs']=retValue['error_msgs']+'Check of table '+name+' failed'
00476             
00477             name = "SPECTRAL_WINDOW"
00478             expected = [ ['NUM_CHAN',        3, 512, 0],
00479                          ['TOTAL_BANDWIDTH', 3, 128e+6, 0],
00480                          ['CHAN_WIDTH',      3, [250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,
00481   250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,
00482   250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,
00483   250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,
00484   250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,
00485   250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,
00486   250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,
00487   250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,
00488   250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,
00489   250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,
00490   250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,
00491   250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,
00492   250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,
00493   250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,
00494   250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,
00495   250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,
00496   250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,
00497   250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,
00498   250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,
00499   250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,
00500   250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,
00501   250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,
00502   250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,
00503   250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,
00504   250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,
00505   250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,
00506   250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,
00507   250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,
00508   250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,
00509   250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,
00510   250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,
00511   250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,
00512   250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,
00513   250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,
00514   250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,
00515   250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,
00516   250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,
00517   250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,
00518   250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,
00519   250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,
00520   250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,
00521   250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,
00522   250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,
00523   250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,
00524   250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,
00525   250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,
00526   250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,
00527   250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,
00528   250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,
00529   250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,
00530   250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,
00531   250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,
00532   250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,
00533   250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,
00534   250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,
00535   250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,
00536   250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,
00537   250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,
00538   250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,
00539   250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,
00540   250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,
00541   250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,
00542   250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,
00543   250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000.,  250000. ], 1E-8],
00544                          ['CHAN_FREQ',       3, [   5.87200000e+09,   5.87225000e+09,   5.87250000e+09,   5.87275000e+09,
00545    5.87300000e+09,   5.87325000e+09,   5.87350000e+09,   5.87375000e+09,
00546    5.87400000e+09,   5.87425000e+09,   5.87450000e+09,   5.87475000e+09,
00547    5.87500000e+09,   5.87525000e+09,   5.87550000e+09,   5.87575000e+09,
00548    5.87600000e+09,   5.87625000e+09,   5.87650000e+09,   5.87675000e+09,
00549    5.87700000e+09,   5.87725000e+09,   5.87750000e+09,   5.87775000e+09,
00550    5.87800000e+09,   5.87825000e+09,   5.87850000e+09,   5.87875000e+09,
00551    5.87900000e+09,   5.87925000e+09,   5.87950000e+09,   5.87975000e+09,
00552    5.88000000e+09,   5.88025000e+09,   5.88050000e+09,   5.88075000e+09,
00553    5.88100000e+09,   5.88125000e+09,   5.88150000e+09,   5.88175000e+09,
00554    5.88200000e+09,   5.88225000e+09,   5.88250000e+09,   5.88275000e+09,
00555    5.88300000e+09,   5.88325000e+09,   5.88350000e+09,   5.88375000e+09,
00556    5.88400000e+09,   5.88425000e+09,   5.88450000e+09,   5.88475000e+09,
00557    5.88500000e+09,   5.88525000e+09,   5.88550000e+09,   5.88575000e+09,
00558    5.88600000e+09,   5.88625000e+09,   5.88650000e+09,   5.88675000e+09,
00559    5.88700000e+09,   5.88725000e+09,   5.88750000e+09,   5.88775000e+09,
00560    5.88800000e+09,   5.88825000e+09,   5.88850000e+09,   5.88875000e+09,
00561    5.88900000e+09,   5.88925000e+09,   5.88950000e+09,   5.88975000e+09,
00562    5.89000000e+09,   5.89025000e+09,   5.89050000e+09,   5.89075000e+09,
00563    5.89100000e+09,   5.89125000e+09,   5.89150000e+09,   5.89175000e+09,
00564    5.89200000e+09,   5.89225000e+09,   5.89250000e+09,   5.89275000e+09,
00565    5.89300000e+09,   5.89325000e+09,   5.89350000e+09,   5.89375000e+09,
00566    5.89400000e+09,   5.89425000e+09,   5.89450000e+09,   5.89475000e+09,
00567    5.89500000e+09,   5.89525000e+09,   5.89550000e+09,   5.89575000e+09,
00568    5.89600000e+09,   5.89625000e+09,   5.89650000e+09,   5.89675000e+09,
00569    5.89700000e+09,   5.89725000e+09,   5.89750000e+09,   5.89775000e+09,
00570    5.89800000e+09,   5.89825000e+09,   5.89850000e+09,   5.89875000e+09,
00571    5.89900000e+09,   5.89925000e+09,   5.89950000e+09,   5.89975000e+09,
00572    5.90000000e+09,   5.90025000e+09,   5.90050000e+09,   5.90075000e+09,
00573    5.90100000e+09,   5.90125000e+09,   5.90150000e+09,   5.90175000e+09,
00574    5.90200000e+09,   5.90225000e+09,   5.90250000e+09,   5.90275000e+09,
00575    5.90300000e+09,   5.90325000e+09,   5.90350000e+09,   5.90375000e+09,
00576    5.90400000e+09,   5.90425000e+09,   5.90450000e+09,   5.90475000e+09,
00577    5.90500000e+09,   5.90525000e+09,   5.90550000e+09,   5.90575000e+09,
00578    5.90600000e+09,   5.90625000e+09,   5.90650000e+09,   5.90675000e+09,
00579    5.90700000e+09,   5.90725000e+09,   5.90750000e+09,   5.90775000e+09,
00580    5.90800000e+09,   5.90825000e+09,   5.90850000e+09,   5.90875000e+09,
00581    5.90900000e+09,   5.90925000e+09,   5.90950000e+09,   5.90975000e+09,
00582    5.91000000e+09,   5.91025000e+09,   5.91050000e+09,   5.91075000e+09,
00583    5.91100000e+09,   5.91125000e+09,   5.91150000e+09,   5.91175000e+09,
00584    5.91200000e+09,   5.91225000e+09,   5.91250000e+09,   5.91275000e+09,
00585    5.91300000e+09,   5.91325000e+09,   5.91350000e+09,   5.91375000e+09,
00586    5.91400000e+09,   5.91425000e+09,   5.91450000e+09,   5.91475000e+09,
00587    5.91500000e+09,   5.91525000e+09,   5.91550000e+09,   5.91575000e+09,
00588    5.91600000e+09,   5.91625000e+09,   5.91650000e+09,   5.91675000e+09,
00589    5.91700000e+09,   5.91725000e+09,   5.91750000e+09,   5.91775000e+09,
00590    5.91800000e+09,   5.91825000e+09,   5.91850000e+09,   5.91875000e+09,
00591    5.91900000e+09,   5.91925000e+09,   5.91950000e+09,   5.91975000e+09,
00592    5.92000000e+09,   5.92025000e+09,   5.92050000e+09,   5.92075000e+09,
00593    5.92100000e+09,   5.92125000e+09,   5.92150000e+09,   5.92175000e+09,
00594    5.92200000e+09,   5.92225000e+09,   5.92250000e+09,   5.92275000e+09,
00595    5.92300000e+09,   5.92325000e+09,   5.92350000e+09,   5.92375000e+09,
00596    5.92400000e+09,   5.92425000e+09,   5.92450000e+09,   5.92475000e+09,
00597    5.92500000e+09,   5.92525000e+09,   5.92550000e+09,   5.92575000e+09,
00598    5.92600000e+09,   5.92625000e+09,   5.92650000e+09,   5.92675000e+09,
00599    5.92700000e+09,   5.92725000e+09,   5.92750000e+09,   5.92775000e+09,
00600    5.92800000e+09,   5.92825000e+09,   5.92850000e+09,   5.92875000e+09,
00601    5.92900000e+09,   5.92925000e+09,   5.92950000e+09,   5.92975000e+09,
00602    5.93000000e+09,   5.93025000e+09,   5.93050000e+09,   5.93075000e+09,
00603    5.93100000e+09,   5.93125000e+09,   5.93150000e+09,   5.93175000e+09,
00604    5.93200000e+09,   5.93225000e+09,   5.93250000e+09,   5.93275000e+09,
00605    5.93300000e+09,   5.93325000e+09,   5.93350000e+09,   5.93375000e+09,
00606    5.93400000e+09,   5.93425000e+09,   5.93450000e+09,   5.93475000e+09,
00607    5.93500000e+09,   5.93525000e+09,   5.93550000e+09,   5.93575000e+09,
00608    5.93600000e+09,   5.93625000e+09,   5.93650000e+09,   5.93675000e+09,
00609    5.93700000e+09,   5.93725000e+09,   5.93750000e+09,   5.93775000e+09,
00610    5.93800000e+09,   5.93825000e+09,   5.93850000e+09,   5.93875000e+09,
00611    5.93900000e+09,   5.93925000e+09,   5.93950000e+09,   5.93975000e+09,
00612    5.94000000e+09,   5.94025000e+09,   5.94050000e+09,   5.94075000e+09,
00613    5.94100000e+09,   5.94125000e+09,   5.94150000e+09,   5.94175000e+09,
00614    5.94200000e+09,   5.94225000e+09,   5.94250000e+09,   5.94275000e+09,
00615    5.94300000e+09,   5.94325000e+09,   5.94350000e+09,   5.94375000e+09,
00616    5.94400000e+09,   5.94425000e+09,   5.94450000e+09,   5.94475000e+09,
00617    5.94500000e+09,   5.94525000e+09,   5.94550000e+09,   5.94575000e+09,
00618    5.94600000e+09,   5.94625000e+09,   5.94650000e+09,   5.94675000e+09,
00619    5.94700000e+09,   5.94725000e+09,   5.94750000e+09,   5.94775000e+09,
00620    5.94800000e+09,   5.94825000e+09,   5.94850000e+09,   5.94875000e+09,
00621    5.94900000e+09,   5.94925000e+09,   5.94950000e+09,   5.94975000e+09,
00622    5.95000000e+09,   5.95025000e+09,   5.95050000e+09,   5.95075000e+09,
00623    5.95100000e+09,   5.95125000e+09,   5.95150000e+09,   5.95175000e+09,
00624    5.95200000e+09,   5.95225000e+09,   5.95250000e+09,   5.95275000e+09,
00625    5.95300000e+09,   5.95325000e+09,   5.95350000e+09,   5.95375000e+09,
00626    5.95400000e+09,   5.95425000e+09,   5.95450000e+09,   5.95475000e+09,
00627    5.95500000e+09,   5.95525000e+09,   5.95550000e+09,   5.95575000e+09,
00628    5.95600000e+09,   5.95625000e+09,   5.95650000e+09,   5.95675000e+09,
00629    5.95700000e+09,   5.95725000e+09,   5.95750000e+09,   5.95775000e+09,
00630    5.95800000e+09,   5.95825000e+09,   5.95850000e+09,   5.95875000e+09,
00631    5.95900000e+09,   5.95925000e+09,   5.95950000e+09,   5.95975000e+09,
00632    5.96000000e+09,   5.96025000e+09,   5.96050000e+09,   5.96075000e+09,
00633    5.96100000e+09,   5.96125000e+09,   5.96150000e+09,   5.96175000e+09,
00634    5.96200000e+09,   5.96225000e+09,   5.96250000e+09,   5.96275000e+09,
00635    5.96300000e+09,   5.96325000e+09,   5.96350000e+09,   5.96375000e+09,
00636    5.96400000e+09,   5.96425000e+09,   5.96450000e+09,   5.96475000e+09,
00637    5.96500000e+09,   5.96525000e+09,   5.96550000e+09,   5.96575000e+09,
00638    5.96600000e+09,   5.96625000e+09,   5.96650000e+09,   5.96675000e+09,
00639    5.96700000e+09,   5.96725000e+09,   5.96750000e+09,   5.96775000e+09,
00640    5.96800000e+09,   5.96825000e+09,   5.96850000e+09,   5.96875000e+09,
00641    5.96900000e+09,   5.96925000e+09,   5.96950000e+09,   5.96975000e+09,
00642    5.97000000e+09,   5.97025000e+09,   5.97050000e+09,   5.97075000e+09,
00643    5.97100000e+09,   5.97125000e+09,   5.97150000e+09,   5.97175000e+09,
00644    5.97200000e+09,   5.97225000e+09,   5.97250000e+09,   5.97275000e+09,
00645    5.97300000e+09,   5.97325000e+09,   5.97350000e+09,   5.97375000e+09,
00646    5.97400000e+09,   5.97425000e+09,   5.97450000e+09,   5.97475000e+09,
00647    5.97500000e+09,   5.97525000e+09,   5.97550000e+09,   5.97575000e+09,
00648    5.97600000e+09,   5.97625000e+09,   5.97650000e+09,   5.97675000e+09,
00649    5.97700000e+09,   5.97725000e+09,   5.97750000e+09,   5.97775000e+09,
00650    5.97800000e+09,   5.97825000e+09,   5.97850000e+09,   5.97875000e+09,
00651    5.97900000e+09,   5.97925000e+09,   5.97950000e+09,   5.97975000e+09,
00652    5.98000000e+09,   5.98025000e+09,   5.98050000e+09,   5.98075000e+09,
00653    5.98100000e+09,   5.98125000e+09,   5.98150000e+09,   5.98175000e+09,
00654    5.98200000e+09,   5.98225000e+09,   5.98250000e+09,   5.98275000e+09,
00655    5.98300000e+09,   5.98325000e+09,   5.98350000e+09,   5.98375000e+09,
00656    5.98400000e+09,   5.98425000e+09,   5.98450000e+09,   5.98475000e+09,
00657    5.98500000e+09,   5.98525000e+09,   5.98550000e+09,   5.98575000e+09,
00658    5.98600000e+09,   5.98625000e+09,   5.98650000e+09,   5.98675000e+09,
00659    5.98700000e+09,   5.98725000e+09,   5.98750000e+09,   5.98775000e+09,
00660    5.98800000e+09,   5.98825000e+09,   5.98850000e+09,   5.98875000e+09,
00661    5.98900000e+09,   5.98925000e+09,   5.98950000e+09,   5.98975000e+09,
00662    5.99000000e+09,   5.99025000e+09,   5.99050000e+09,   5.99075000e+09,
00663    5.99100000e+09,   5.99125000e+09,   5.99150000e+09,   5.99175000e+09,
00664    5.99200000e+09,   5.99225000e+09,   5.99250000e+09,   5.99275000e+09,
00665    5.99300000e+09,   5.99325000e+09,   5.99350000e+09,   5.99375000e+09,
00666    5.99400000e+09,   5.99425000e+09,   5.99450000e+09,   5.99475000e+09,
00667    5.99500000e+09,   5.99525000e+09,   5.99550000e+09,   5.99575000e+09,
00668    5.99600000e+09,   5.99625000e+09,   5.99650000e+09,   5.99675000e+09,
00669    5.99700000e+09,   5.99725000e+09,   5.99750000e+09,   5.99775000e+09,
00670    5.99800000e+09,   5.99825000e+09,   5.99850000e+09,   5.99875000e+09,
00671    5.99900000e+09,   5.99925000e+09,   5.99950000e+09,   5.99975000e+09,], 1E-8]
00672                          ]
00673             results = checktable(name, expected)
00674             if not results:
00675                 retValue['success']=False
00676                 retValue['error_msgs']=retValue['error_msgs']+'Check of table '+name+' failed'
00677                 
00678         self.assertTrue(retValue['success'])
00679 
00680                 
00681     
00682 def suite():
00683     return [test_importfitsidi]