Esempio n. 1
0
 def test_correct_pairing(self):
     left  = self.tmp.write(self.dir + 'P01_E2_left.txt', b'')
     right = self.tmp.write(self.dir + 'P01_E2_right.txt', b'')
     crawler = Crawler()
     crawler.crawl(self.dir)
     crawler.pair()
     self.assertEquals(crawler.pairedFiles[0][0].filename, 'P01_E2_left.txt')
     self.assertEquals(crawler.pairedFiles[0][1].filename, 'P01_E2_right.txt')
Esempio n. 2
0
 def test_one_partner_missing_pairing(self):
     left = self.tmp.write(self.dir + 'P01_E2_left.txt', b'')
     crawler = Crawler()
     crawler.crawl(self.dir)
     try:
         crawler.pair()
     except ValueError:
         pass
     self.assertEquals(crawler.pairedFiles[0][0].filename, 
             crawler.pairedFiles[0][1].filename)
Esempio n. 3
0
File: main.py Progetto: nce/sedater
if __name__ == "__main__":
    cli = CLIParser()
    if not cli.parseForSedater(sys.argv[1:]):
        sys.exit(2)

    importer = Crawler()
    for source in cli.args.inputSource:
        # Data Export preparations
        if cli.args.output_dir:
            outputDir = cli.args.output_dir + '/'
        else:
            outputDir = os.path.dirname(source) + '/'

        # Data Import
        importer.crawl(source)

        # All input sources are crawled
        # now pair all files together
        importer.pair()

    # Raw Data Conversion and Normalization
    sensLeft = UninitializedSensor._make([
              Orientation.left
            , cli.args.left_calibration
            ])
    sensRight = UninitializedSensor._make([
              Orientation.right
            , cli.args.right_calibration
            ])
    for pair in importer.pairedFiles: