dist = distancefunc(name="manhattan") windowtype = "itakura" figure_number = 3 window, distance, path = dtwpy.dtw(query, template, dist=dist, windowtype=windowtype, windowsize=50, pattern="symmetric1", normalized=False, dist_only=False, cost=True) pltdtw.plotwithQT(query, template, path, figure_number, title=" Original") query = d1 template = D2 dist = distancefunc(name="manhattan") windowtype = "itakura" figure_number = 4 window, distance, path = dtwpy.dtw(query, template, dist=dist, windowtype=windowtype, windowsize=50,
dist_only=False, cost=True) T = ii - P CC = C[T] L = str(ii) pltt.plotting(query, template, path, figure_number, L, CC) print('Column ' + L + ' plotted') plt.figure(2) plt.plot(D2) ''' d2 = d21[:,80] D2 = d2[423:3543] query = d1 template = D2 dist = distancefunc(name="manhattan") windowtype="itakura" window, distance, path = dtwpy.dtw(query, template, dist=dist, windowtype=windowtype, windowsize=50,pattern="symmetric1", normalized=False,dist_only=False, cost=True) figure_number = 1
max_x1 = xvals[d1.argmax()] max_y2 = max(d2) max_x2 = xvals[d2.argmax()] diff1 = int(max_x2 - max_x1) diff2 = int(max_y1/max_y2) #D2 = d2[diff1:3543] plt.figure(1) plt.plot(d1) plt.figure(2) plt.plot(d2) #plt.plot(D2) query = d1 template = d2 dist = distancefunc(name="manhattan") windowtype="itakura" figure_number = 3 window, distance, path = dtwpy.dtw(query, template, dist=dist, windowtype=windowtype, windowsize=50,pattern="symmetric1", normalized=False,dist_only=False, cost=True) pltdtw.plotwithQT(query, template, path,figure_number,title="")
#windowtype="paliwal" #window, distance, path = dtwpy.dtw(query, template, dist=dist, windowtype=windowtype, windowsize=50,pattern="symmetric1", normalized=False,dist_only=False, cost=True) #pltdtw.plotwithQT(query, template, path,title="") #pltdtw.plotalignment_with_window(window,windowtype,path,title="") #pltdtw.plotalignment(path, title="") #windowtype="scband" #window, distance, path = dtwpy.dtw(query, template, dist=dist, windowtype=windowtype, windowsize=50,pattern="symmetric1", normalized=False,dist_only=False, cost=True) #pltdtw.plotwithQT(query, template, path,title="") #pltdtw.plotalignment_with_window(window,windowtype,path,title="") #pltdtw.plotalignment(path, title="") windowtype="itakura" window, distance, path = dtwpy.dtw(query, template, dist=dist, windowtype=windowtype, windowsize=50,pattern="symmetric1", normalized=False,dist_only=False, cost=True) pltdtw.plotwithQT(query, template, path,1,title="") pltdtw.plotalignment_with_window(window,windowtype,path,title="") #pltdtw.plotalignment(path, title="")