Esempio n. 1
0
def roundtrip_test():
    imshape = (100,100)
    rmap = r.make_radmap(imshape, (25.0, 51.2), np.arange(0, 100), np.linspace(0, 2*np.pi, 17))
    marr1 = rmap['map']
    inds = r.maparr2indices(marr1)
    marr2 = r.indices2maparr(imshape, inds)
    for i in xrange(np.size(marr1)):
        assert(marr1.flat[i] == marr2.flat[i])
Esempio n. 2
0
def plot_radind(radind):
    """Display a dict containing radial indices.
    """
    marr = r.indices2maparr(radind['imshape'], radind['indices'])
    plt.imshow(marr2rgba(marr))