def check_germs(germs, xlo, ylo, sizex, sizey): for G in germs: if G[0] < xlo or G[1] < ylo or G[0] > xlo + sizex or G[1] > ylo + sizey: print >>sys.stderr, 'germ found outside bounding box: %f %f' \ % (G[0], G[1]) if not ('--ignore-germs-outside-bbox' in sys.argv): die('germs found outside boundary box. aborting.')
def add(x, y): assert len(x) == len(y) if len(x) == 2: return (x[0] + y[0], x[1] + y[1]) else: die("NYI")
def check_germs(germs, xlo, ylo, sizex, sizey): for G in germs: if G[0] < xlo or G[1] < ylo or G[0] > xlo + sizex or G[1] > ylo + sizey: print >>sys.stderr, "germ found outside bounding box: %f %f" % (G[0], G[1]) if not ("--ignore-germs-outside-bbox" in sys.argv): die("germs found outside boundary box. aborting.")