Example #1
0
    def test_datatype_selector(self):
        from gnss import datafile
        from gnss.base import Blocks, BlocksRegistry, DATATYPES
        from products.terrestrial import DayFinalSinex

        with datafile(self.testfile) as sinex:
            self.assertTrue(sinex.__class__.__name__ is 'DayFinalSinex')
Example #2
0
 def test_tropo(self):
     from gnss import datafile
     testfile = '/home/den/project/geophys/gnss/datafiles/1426/asi14260.tro'
     # from gnss.base import ParseHeaders
     # h = ParseHeaders()
     # h.parse(iter(['*INDEX TYPE__ CODE PT SOLN REF_EPOCH___ UNIT S __ESTIMATED_VALUE____ _STD_DEV___','']))
     # print (h)
     with datafile(testfile) as tropo:
         '%s'%tropo.reference
         '%s'%tropo.description
         '%s'%tropo.coordinates
         '%s'%tropo.solutions
Example #3
0
 def test_dict_transparent_parsing(self):
     from gnss import datafile
     with datafile(self.testfile) as sinex:
         self.assertTrue(len(sinex.reference)==6)
         self.assertTrue(sinex.reference['DESCRIPTION'] == 'ASI -  TELESPAZIO S.p.A.')            
Example #4
0
 def test_dict_parser(self):
     from gnss import datafile
     with datafile(self.testfile) as sinex:
         # sinex.reference.parse()
         self.assertTrue(sinex.reference == {'DESCRIPTION': 'ASI -  TELESPAZIO S.p.A.', 'HARDWARE': 'HP9000/785', 'CONTACT': '*****@*****.**', 'INPUT': 'stacov format', 'OUTPUT': 'sinex format', 'SOFTWARE': 'MicroCosm 2005.0'})
Example #5
0
 def test_textblock(self):
     from gnss import datafile
     with datafile(self.testfile) as sinex:
         self.assertTrue(len(list(sinex.textblock('FILE/REFERENCE'))))
Example #6
0
 def test_datafile_func(self):
     from gnss import datafile
     with datafile(self.testfile) as sinex:
         self.assertTrue(sinex.src == self.testfile)
Example #7
0
 def test_parser_cleaner(self):
     from gnss import datafile
     with datafile(self.testfile) as sinex:
         # sinex.gps_phase_centers.parse()
         self.assertTrue(sinex.phase_centers==[{'AZ_EL': '------', 'DESCRIPTION': 'LEIAT504GG      NONE', 'L2->ARP(m) EAST': -0.0001, 'L1->ARP(m) UP': 0.0903, 'L1->ARP(m) EAST': 0.0009, 'L1->ARP(m) NORTH': 0.0008, 'L2->ARP(m) NORTH': -0.0001, 'L2->ARP(m) UP': 0.1191, 'S/N': '00029'}, {'AZ_EL': '------', 'DESCRIPTION': 'TPSCR3_GGD      NONE', 'L2->ARP(m) EAST': 0.0002, 'L1->ARP(m) UP': 0.0617, 'L1->ARP(m) EAST': -0.0005, 'L1->ARP(m) NORTH': 0.0007, 'L2->ARP(m) NORTH': 0.0006, 'L2->ARP(m) UP': 0.0956, 'S/N': '-----'}, {'AZ_EL': '------', 'DESCRIPTION': 'TRM29659.00     NONE', 'L2->ARP(m) EAST': 0.0002, 'L1->ARP(m) UP': 0.092, 'L1->ARP(m) EAST': -0.0009, 'L1->ARP(m) NORTH': -0.0001, 'L2->ARP(m) NORTH': -0.0002, 'L2->ARP(m) UP': 0.1205, 'S/N': '-----'}, {'AZ_EL': '------', 'DESCRIPTION': 'TRM29659.00     NONE', 'L2->ARP(m) EAST': 0.0002, 'L1->ARP(m) UP': 0.092, 'L1->ARP(m) EAST': -0.0009, 'L1->ARP(m) NORTH': -0.0001, 'L2->ARP(m) NORTH': -0.0002, 'L2->ARP(m) UP': 0.1205, 'S/N': '-----'}, {'AZ_EL': '------', 'DESCRIPTION': 'TRM29659.00     NONE', 'L2->ARP(m) EAST': 0.0002, 'L1->ARP(m) UP': 0.092, 'L1->ARP(m) EAST': -0.0009, 'L1->ARP(m) NORTH': -0.0001, 'L2->ARP(m) NORTH': -0.0002, 'L2->ARP(m) UP': 0.1205, 'S/N': '-----'}, {'AZ_EL': '------', 'DESCRIPTION': 'TRM29659.00     NONE', 'L2->ARP(m) EAST': 0.0002, 'L1->ARP(m) UP': 0.092, 'L1->ARP(m) EAST': -0.0009, 'L1->ARP(m) NORTH': -0.0001, 'L2->ARP(m) NORTH': -0.0002, 'L2->ARP(m) UP': 0.1205, 'S/N': '-----'}, {'AZ_EL': '------', 'DESCRIPTION': 'TRM29659.00     NONE', 'L2->ARP(m) EAST': 0.0002, 'L1->ARP(m) UP': 0.092, 'L1->ARP(m) EAST': -0.0009, 'L1->ARP(m) NORTH': -0.0001, 'L2->ARP(m) NORTH': -0.0002, 'L2->ARP(m) UP': 0.1205, 'S/N': '73803'}, {'AZ_EL': '------', 'DESCRIPTION': 'AOAD/M_T        NONE', 'L2->ARP(m) EAST': -0.0006, 'L1->ARP(m) UP': 0.0912, 'L1->ARP(m) EAST': -0.0005, 'L1->ARP(m) NORTH': 0.0006, 'L2->ARP(m) NORTH': -0.0001, 'L2->ARP(m) UP': 0.1201, 'S/N': '00404'}, {'AZ_EL': '------', 'DESCRIPTION': 'TPSCR3_GGD      CONE', 'L2->ARP(m) EAST': 0.0, 'L1->ARP(m) UP': 0.0615, 'L1->ARP(m) EAST': -0.0004, 'L1->ARP(m) NORTH': 0.0008, 'L2->ARP(m) NORTH': 0.0003, 'L2->ARP(m) UP': 0.0948, 'S/N': '-----'}, {'AZ_EL': '------', 'DESCRIPTION': 'TRM29659.00     NONE', 'L2->ARP(m) EAST': 0.0002, 'L1->ARP(m) UP': 0.092, 'L1->ARP(m) EAST': -0.0009, 'L1->ARP(m) NORTH': -0.0001, 'L2->ARP(m) NORTH': -0.0002, 'L2->ARP(m) UP': 0.1205, 'S/N': '-----'}, {'AZ_EL': '------', 'DESCRIPTION': 'AOAD/M_T        NONE', 'L2->ARP(m) EAST': -0.0006, 'L1->ARP(m) UP': 0.0912, 'L1->ARP(m) EAST': -0.0005, 'L1->ARP(m) NORTH': 0.0006, 'L2->ARP(m) NORTH': -0.0001, 'L2->ARP(m) UP': 0.1201, 'S/N': '200'}, {'AZ_EL': '------', 'DESCRIPTION': 'TRM29659.00     NONE', 'L2->ARP(m) EAST': 0.0002, 'L1->ARP(m) UP': 0.092, 'L1->ARP(m) EAST': -0.0009, 'L1->ARP(m) NORTH': -0.0001, 'L2->ARP(m) NORTH': -0.0002, 'L2->ARP(m) UP': 0.1205, 'S/N': '-----'}, {'AZ_EL': '------', 'DESCRIPTION': 'TRM29659.00     NONE', 'L2->ARP(m) EAST': 0.0002, 'L1->ARP(m) UP': 0.092, 'L1->ARP(m) EAST': -0.0009, 'L1->ARP(m) NORTH': -0.0001, 'L2->ARP(m) NORTH': -0.0002, 'L2->ARP(m) UP': 0.1205, 'S/N': '-----'}, {'AZ_EL': '------', 'DESCRIPTION': 'TRM29659.00     NONE', 'L2->ARP(m) EAST': 0.0002, 'L1->ARP(m) UP': 0.092, 'L1->ARP(m) EAST': -0.0009, 'L1->ARP(m) NORTH': -0.0001, 'L2->ARP(m) NORTH': -0.0002, 'L2->ARP(m) UP': 0.1205, 'S/N': '-----'}, {'AZ_EL': '------', 'DESCRIPTION': 'TRM29659.00     NONE', 'L2->ARP(m) EAST': 0.0002, 'L1->ARP(m) UP': 0.092, 'L1->ARP(m) EAST': -0.0009, 'L1->ARP(m) NORTH': -0.0001, 'L2->ARP(m) NORTH': -0.0002, 'L2->ARP(m) UP': 0.1205, 'S/N': '-----'}, {'AZ_EL': '------', 'DESCRIPTION': 'TRM29659.00     NONE', 'L2->ARP(m) EAST': 0.0002, 'L1->ARP(m) UP': 0.092, 'L1->ARP(m) EAST': -0.0009, 'L1->ARP(m) NORTH': -0.0001, 'L2->ARP(m) NORTH': -0.0002, 'L2->ARP(m) UP': 0.1205, 'S/N': '-----'}, {'AZ_EL': '------', 'DESCRIPTION': 'TRM29659.00     NONE', 'L2->ARP(m) EAST': 0.0002, 'L1->ARP(m) UP': 0.092, 'L1->ARP(m) EAST': -0.0009, 'L1->ARP(m) NORTH': -0.0001, 'L2->ARP(m) NORTH': -0.0002, 'L2->ARP(m) UP': 0.1205, 'S/N': '-----'}, {'AZ_EL': '------', 'DESCRIPTION': 'TRM29659.00     NONE', 'L2->ARP(m) EAST': 0.0002, 'L1->ARP(m) UP': 0.092, 'L1->ARP(m) EAST': -0.0009, 'L1->ARP(m) NORTH': -0.0001, 'L2->ARP(m) NORTH': -0.0002, 'L2->ARP(m) UP': 0.1205, 'S/N': '-----'}, {'AZ_EL': '------', 'DESCRIPTION': 'TRM29659.00     NONE', 'L2->ARP(m) EAST': 0.0002, 'L1->ARP(m) UP': 0.092, 'L1->ARP(m) EAST': -0.0009, 'L1->ARP(m) NORTH': -0.0001, 'L2->ARP(m) NORTH': -0.0002, 'L2->ARP(m) UP': 0.1205, 'S/N': '-----'}, {'AZ_EL': '------', 'DESCRIPTION': 'TRM29659.00     NONE', 'L2->ARP(m) EAST': 0.0002, 'L1->ARP(m) UP': 0.092, 'L1->ARP(m) EAST': -0.0009, 'L1->ARP(m) NORTH': -0.0001, 'L2->ARP(m) NORTH': -0.0002, 'L2->ARP(m) UP': 0.1205, 'S/N': '-----'}, {'AZ_EL': '------', 'DESCRIPTION': 'TRM29659.00     NONE', 'L2->ARP(m) EAST': 0.0002, 'L1->ARP(m) UP': 0.092, 'L1->ARP(m) EAST': -0.0009, 'L1->ARP(m) NORTH': -0.0001, 'L2->ARP(m) NORTH': -0.0002, 'L2->ARP(m) UP': 0.1205, 'S/N': '-----'}, {'AZ_EL': '------', 'DESCRIPTION': 'JPSREGANT_DD_E  NONE', 'L2->ARP(m) EAST': 0.0002, 'L1->ARP(m) UP': 0.1008, 'L1->ARP(m) EAST': -0.0003, 'L1->ARP(m) NORTH': 0.0001, 'L2->ARP(m) NORTH': 0.0002, 'L2->ARP(m) UP': 0.1165, 'S/N': '-----'}, {'AZ_EL': '------', 'DESCRIPTION': 'ASH701945C_M    SCIT', 'L2->ARP(m) EAST': -0.0004, 'L1->ARP(m) UP': 0.0886, 'L1->ARP(m) EAST': -0.0004, 'L1->ARP(m) NORTH': 0.0007, 'L2->ARP(m) NORTH': -0.0002, 'L2->ARP(m) UP': 0.1176, 'S/N': '-----'}, {'AZ_EL': '------', 'DESCRIPTION': 'ASH701941.B     NONE', 'L2->ARP(m) EAST': -0.0004, 'L1->ARP(m) UP': 0.0892, 'L1->ARP(m) EAST': -0.0004, 'L1->ARP(m) NORTH': 0.0004, 'L2->ARP(m) NORTH': -0.0004, 'L2->ARP(m) UP': 0.1188, 'S/N': '-----'}, {'AZ_EL': '------', 'DESCRIPTION': 'LEIAT504        LEIS', 'L2->ARP(m) EAST': 0.0002, 'L1->ARP(m) UP': 0.0884, 'L1->ARP(m) EAST': -0.0001, 'L1->ARP(m) NORTH': 0.0007, 'L2->ARP(m) NORTH': -0.0003, 'L2->ARP(m) UP': 0.1151, 'S/N': '-----'}, {'AZ_EL': '------', 'DESCRIPTION': 'LEIAT504        LEIS', 'L2->ARP(m) EAST': 0.0002, 'L1->ARP(m) UP': 0.0884, 'L1->ARP(m) EAST': -0.0001, 'L1->ARP(m) NORTH': 0.0007, 'L2->ARP(m) NORTH': -0.0003, 'L2->ARP(m) UP': 0.1151, 'S/N': '-----'}, {'AZ_EL': '------', 'DESCRIPTION': 'LEIAT504        LEIS', 'L2->ARP(m) EAST': 0.0002, 'L1->ARP(m) UP': 0.0884, 'L1->ARP(m) EAST': -0.0001, 'L1->ARP(m) NORTH': 0.0007, 'L2->ARP(m) NORTH': -0.0003, 'L2->ARP(m) UP': 0.1151, 'S/N': '-----'}, {'AZ_EL': '------', 'DESCRIPTION': 'LEIAT504        LEIS', 'L2->ARP(m) EAST': 0.0002, 'L1->ARP(m) UP': 0.0884, 'L1->ARP(m) EAST': -0.0001, 'L1->ARP(m) NORTH': 0.0007, 'L2->ARP(m) NORTH': -0.0003, 'L2->ARP(m) UP': 0.1151, 'S/N': '-----'}, {'AZ_EL': '------', 'DESCRIPTION': 'LEIAT504        NONE', 'L2->ARP(m) EAST': 0.0001, 'L1->ARP(m) UP': 0.0912, 'L1->ARP(m) EAST': -0.0003, 'L1->ARP(m) NORTH': 0.0001, 'L2->ARP(m) NORTH': -0.0001, 'L2->ARP(m) UP': 0.1173, 'S/N': '-----'}, {'AZ_EL': '------', 'DESCRIPTION': 'LEIAT302+GP     NONE', 'L2->ARP(m) EAST': -0.0058, 'L1->ARP(m) UP': 0.0304, 'L1->ARP(m) EAST': 0.0014, 'L1->ARP(m) NORTH': 0.0054, 'L2->ARP(m) NORTH': 0.0033, 'L2->ARP(m) UP': 0.0339, 'S/N': '-----'}, {'AZ_EL': '------', 'DESCRIPTION': 'AOAD/M_T        NONE', 'L2->ARP(m) EAST': -0.0006, 'L1->ARP(m) UP': 0.0912, 'L1->ARP(m) EAST': -0.0005, 'L1->ARP(m) NORTH': 0.0006, 'L2->ARP(m) NORTH': -0.0001, 'L2->ARP(m) UP': 0.1201, 'S/N': '-----'}])
         self.assertTrue('%s'%sinex.site_ids)
Example #8
0
 def test_list_parser_auto_header(self):
     from gnss import datafile
     with datafile(self.testfile) as sinex:
         sinex.phase_centers.parse()
         self.assertTrue(sinex.phase_centers.headers=={'AZ_EL': (70, 80), 'DESCRIPTION': (1, 21), 'L2->ARP(m) EAST': (63, 69), 'L1->ARP(m) UP': (28, 34), 'L1->ARP(m) EAST': (42, 48), 'L1->ARP(m) NORTH': (35, 41), 'L2->ARP(m) NORTH': (56, 62), 'L2->ARP(m) UP': (49, 55), 'S/N': (22, 27)})