def __init__(self, nodes, elements, flow=2 * numpy.pi * 0.0521 | units.rad / units.s, fhigh=2 * numpy.pi | units.rad / units.s, msc=32, mdc=36): pyplot.ion() fig = pyplot.figure(figsize=(18, 5)) self.fig = fig pyplot.show() x = nodes.lon.number y = nodes.lat.number n1 = elements.n1 n2 = elements.n2 n3 = elements.n3 self.elements = elements self.nodes = nodes elements = numpy.column_stack((n1, n2, n3)) self.triangulation = tri.Triangulation(x, y, elements) thetas = numpy.arange(mdc) * 2 * numpy.pi / mdc fac = (fhigh / flow)**(1. / (msc - 1)) fs = flow * fac**numpy.arange(msc) fs = VectorQuantity.new_from_array(fs) f, theta = numpy.meshgrid(fs, thetas) self.f = VectorQuantity.new_from_array(f) self.dlf = numpy.log(fac) self.dtheta = 2 * numpy.pi / mdc