1 import matplotlib.pyplot as plt
2 from matplotlib import cm
10 d, _, _ = gridf.job_br1(task)
14 d, _, _ = gridf.job_br2(task)
17 def error_surface(k, im_l, v1, v2, h1, h2, dv, dh, x_v, y_v, x_h, y_h, size):
23 pool = multiprocessing.Pool(None)
25 for y in xrange(-k, k):
26 tasks = [(im_l, v1, v2, h1, h2, x, y, dv, dh, size) for x in xrange(-k, k)]
27 Z1.append(pool.map(dist1, tasks, 8))
28 Z2.append(pool.map(dist2, tasks, 8))
31 s1 = fig.add_subplot(121)
32 s2 = fig.add_subplot(122)
34 s1.imshow(Z1, cmap=cm.jet, interpolation='bicubic',
35 extent=(-k, k, -k, k), aspect='equal')
36 s1.plot([x_v], [-y_v], 'o')
39 s2.imshow(Z2, cmap=cm.jet, interpolation='bicubic',
40 extent=(-k, k, -k, k), aspect='equal')
41 s2.plot([x_h], [-y_h], 'o')