Exemplo n.º 1
0
	------------------------------ End integration of strain fieldm start dumping of whatever dict you want to dumplocation as a numpy file.  ----------------------------------------------------------------------------------------
	'''
	'''
	--------------------------------- End dumping, start plotting of results, this section is rather dynamic and changed according to need.  ----------------------------------------------------------------------------------------
	'''		

	#smth.plot_data(allfilesdictconstantx[0][1.0], noisefree[0][1.0], r'G:\no19\test')
	
	smth.Write_Measurement_Dictionary_to_Files(Measurement_Dictionary=noisefree[0],Write_Location=r'G:\no19',Name_Base='test')



	cycles=list(addedcycleswithnoise.keys())
	fig = plt.figure(figsize=plt.figaspect(0.5))
	
	plotdict1=smth.preparedictforplotting(lengthlist=lengthlist,plotvalue=plotvalue,newdict=addedcycleswithnoise)

	X1,Y1=np.meshgrid(cycles,middleengthlist)
	Z1=np.array(plotdict1)
	ax = fig.add_subplot(2, 2, 1, projection='3d')

	ax.plot_wireframe(X1, Y1, Z1, rstride=1, cstride=1)#,cmap=cm.coolwarm,linewidth=0, antialiased=False)		

	plotdict2=smth.preparedictforplotting(lengthlist=lengthlist,plotvalue=plotvalue,newdict=addedcyclesnoisefree)#allfilesdictconstantx)

	X1,Y1=np.meshgrid(cycles,middleengthlist)
	Z1=np.array(plotdict2)
	ax = fig.add_subplot(2, 2, 2, projection='3d')

	ax.plot_surface(X1, Y1, Z1)#,cmap=cm.coolwarm,linewidth=0, antialiased=False)	
	
Exemplo n.º 2
0
                for ref in referencemeta:
                    if Fibernumber == ref[1]:
                        refl = ref[2]
                        reflength = smth.find_nearest(datadict=straindata,
                                                      X_Value_To_Be_Found=refl)
                reflengthdict[measurement][Fibernumber] = straindata[reflength]

    print(reflengthdict)
    print("maxdict", maxdict)
    fig = plt.figure(figsize=plt.figaspect(0.5))

    #self,lengthlist=[],measurements=[],dictionary={},plotvalue=1.8,newdict={}

    plotdict3 = smth.preparedictforplotting(lengthlist=Fibernumbers,
                                            measurements=measurements,
                                            dictionary=maxdict)

    X1, Y1 = np.meshgrid(cycles, RefPos)
    Z1 = np.array(plotdict3)
    ax = fig.add_subplot(2, 1, 1, projection='3d')
    #ax.set_zlim(0, 12000)
    #ax.plot_wireframe(X1, Y1, Z1, rstride=1, cstride=1)

    ax.plot_surface(
        X1, Y1, Z1, cmap=cm.coolwarm, linewidth=0,
        antialiased=False)  #,cmap=cm.coolwarm,linewidth=0, antialiased=False)

    plotdict4 = smth.preparedictforplotting(lengthlist=Fibernumbers,
                                            measurements=measurements,
                                            dictionary=reflengthdict)