ax0.scatter (x, y, c=idmatrix[:,keytime], marker='h', cmap=plt.cm.jet) # or plasma
        ax0.set_xlim([-0.65,0.65])
        ax0.set_ylim([-0.6,0.6])
        # Plot centroids:
        #ax0.plot (domcentres[keytime][:,0], domcentres[keytime][:,1], 'o', color='blue')
        #print ('ddoms shape: {0}'.format(np.shape(ddoms)))
        #ddoms_sz = np.shape(ddoms)[1]
        #for i in range(0,ddoms_sz):
        #    if ddoms[keytime][i,0] != 0 and ddoms[keytime][i,1] != 0:
        #        ax0.plot (ddoms[keytime][i,0], ddoms[keytime][i,1], 'o', color='red')
        ax0.set_aspect('equal')


    vert = True
    horz = False
    gfit_v, s_resid_v = dc.domcentres_analyse (domcentres, vert)
    gfit_h, s_resid_h = dc.domcentres_analyse (domcentres, horz)

    pf = h5py.File(logdirname+'/positions.h5', 'r')
    totalarea = np.array(pf['area']);

    # Insert data for time=keytime into overall containers
    hondadeltas.append(hondadelta[keytime])
    s_resids_v.append(s_resid_v[keytime])
    s_resids_h.append(s_resid_h[keytime])
    gfits_v.append(gfit_v[keytime])
    gfits_h.append(gfit_h[keytime])
    uds.append(ud)
    lrs.append(1-ud)

# And plot this longhand here:
예제 #2
0
# The ID colour maps
do_maps = 0
if do_maps:
    # Read the data
    (x, y, t, cmatrix, amatrix, nmatrix, idmatrix,
     tarea) = ld.readSimDataFiles(logdirname)
    for tg in range(0, 23, 4):
        idstring = 'id{0}'.format(tg * 1000)
        f1 = pt.surface(idmatrix[:, tg], x, y, 0, idstring)
        # Plot centroids:
        f1.plot(domcentres[tg][:, 0], domcentres[tg][:, 1], 'o')

vert = True
horz = False
gfits, s_resid = dc.domcentres_analyse(domcentres, vert)
gfits_h, s_resid_h = dc.domcentres_analyse(domcentres, horz)

pf = h5py.File(logdirname + '/positions.h5', 'r')
totalarea = np.array(pf['area'])
print('total area: {0}'.format(totalarea))

# And plot this longhand here:
F1 = plt.figure(figsize=(8, 8))

ax1 = F1.add_subplot(1, 1, 1)
l1, = ax1.plot(t1, hondadelta, 'o', label='Honda Delta')
l2, = ax1.plot(t1, edgedev, 'o', label='Edge deviation')
l3, = ax1.plot(t1,
               domarea / totalarea[0],
               'go',