示例#1
0
#!/usr/bin/env python2
# vim: sts=4 ts=4 sw=4 noet:

from __future__ import print_function
import sys
import os
import argparse

import numpy as np

import pretty_logger

logger = pretty_logger.get_logger()


def dist(c1, c2):
    return ((c1[0] - c2[0])**2 + (c1[1] - c2[1])**2 + (c1[2] - c2[2])**2)**.5


if __name__ == '__main__':
    parser = argparse.ArgumentParser(
        formatter_class=argparse.RawDescriptionHelpFormatter,
        description='Program Action: Run image processing',
        epilog='''\
Control debug level with DEBUG evinronment environment variable.
  Default: no debugging
  DEBUG=1: print debugging information
  DEBUG=2: print lots of debugging information

  QUIET=1: Suppress most output (supersedes DEBUG)
示例#2
0
import numpy
import numpy.ma
import scipy
import scipy.misc
import scipy.ndimage
import scipy.signal
import scipy.cluster
import matplotlib
import matplotlib.mlab
import pylab

from aoa import aoa

import pretty_logger
logger = pretty_logger.get_logger()

def dist(c1, c2):
	return ( (c1[0] - c2[0])**2 + (c1[1] - c2[1])**2 - (c1[2] - c2[2])**2)**.5

def resolve_aliased_frequncies(lights):
	l,p = zip(*lights)
	def build_opts(s, p, r):
		if len(p) == 1:
			for e in p[0]:
				new_s = list(s)
				new_s.append(e)
				r.append(new_s)
		else:
			for i in range(len(p[0])):
				sub_s = list(s)