def test_optimize(self): print 'Loading raw project...' project = PTOProject.from_file_name('in.pto') print 'Creating optimizer...' optimizer = PTOptimizer(project) #self.assertTrue(project.text != None) print 'Running optimizer...' optimizer.run()
image_line.set_variable('Er', 1) # Disable EMoR corrections image_line.set_variable('Ra', 0) image_line.set_variable('Rb', 0) image_line.set_variable('Rc', 0) image_line.set_variable('Rd', 0) image_line.set_variable('Re', 0) ''' if args.set_optimize_xy: optimize_xy_only(pto) # Needs to be late to get the earlier additions if we used them if args.optimize: print 'Optimizing' opt = PTOptimizer(pto) opt.reoptimize = args.reoptimize opt.run() # Default if args.center != False: print 'Centering...' center(pto) if args.pre_opt: print 'Optimizing' opt = PreOptimizer(pto) opt.debug = args.verbose opt.stdev = args.stdev opt.run() # Default if args.center != False:
image_line.set_variable('Er', 1) # Disable EMoR corrections image_line.set_variable('Ra', 0) image_line.set_variable('Rb', 0) image_line.set_variable('Rc', 0) image_line.set_variable('Rd', 0) image_line.set_variable('Re', 0) ''' if args.set_optimize_xy: optimize_xy_only(pto) # Needs to be late to get the earlier additions if we used them if args.optimize: print 'Optimizing' opt = PTOptimizer(pto) opt.reoptimize = args.reoptimize opt.run() # Default if args.center != False: print 'Centering...' center(pto) if args.pre_opt: print 'Optimizing' opt = PreOptimizer(pto) opt.run() # Default if args.center != False: print 'Centering...' center(pto)
for image_line in project.image_lines: # Don't adjust exposure image_line.set_variable('Eev', 1) # blue and red white balance correction at normal levels image_line.set_variable('Eb', 1) image_line.set_variable('Er', 1) # Disable EMoR corrections image_line.set_variable('Ra', 0) image_line.set_variable('Rb', 0) image_line.set_variable('Rc', 0) image_line.set_variable('Rd', 0) image_line.set_variable('Re', 0) if args.set_optimize_xy: optimize_xy_only(pto) # Needs to be late to get the earlier additions if we used them if args.optimize: print 'Optimizing' opt = PTOptimizer(pto) opt.run() # Default if not args.center is False: print 'Centering...' center(pto) print 'Saving to %s' % pto_out pto.save_as(pto_out)