Пример #1
0
def plot231a():
	plt.figure(figsize=(16,12))
	ocd.plot_var(I,U,var,messung231)
        plt.grid(True)
	plt.xlabel("I in A")
	plt.ylabel("U in V")
	plt.title(ur"Kennlinie der Diode")
	plt.show()
Пример #2
0
def plot231b():
	plt.figure(figsize=(16,12))
	ocd.plot_var(I,U,var,messung231)
	plt.xscale("log", nonposx='clip')
        plt.grid(True)
	plt.xlabel("I in A")
	plt.ylabel("U in V")
	plt.title(ur"Kennlinie der Diode (in logarithmischer Darstellung)")
Пример #3
0
def plot232():
	plt.figure(figsize=(16,12))
	ax=ocd.plot_var(I,U,var,messung2321,True)
	ax=ocd.plot_var(I,U,var,messung2322)
	plt.xlabel("I in A")
	plt.ylabel("U in V")
	plt.title("Diode in Sperrrichtung mit den beiden Schaltungen")
	plt.show()
Пример #4
0
def plot1d():
        fig=plt.figure(figsize=(16,12))
        t1=ocd.plot_var(Ieff2,-phi1,var,messung221,False)
        t1=ocd.plot_var(Ieff2,-phi1_theo,var,messung221,False)
        #plt.xscale("log",nonpox="clip")
        #plt.yscale("log",nonpox="clip")
        plt.xlabel(ur"$I_{eff2}$ in A",fontsize=16)
        plt.ylabel(ur"$\phi$",fontsize=16)
        plt.title("Phasenverschiebung")
        plt.grid(True)
        plt.show()
Пример #5
0
def plot21():
	plt.figure(figsize=(16,12))
	(a,b,Sa,Sb,Sy)=ocd.plot_var(I,U,var,messung21,True)
	ocd.plot_var(I,U,var,messung22)
	plt.xlabel("I in A")
	plt.ylabel("U in V")
	plt.title(ur"Ohmscher Widerstand und Glühbirne")
        print "a:",a,"+-",Sa
        print "b:",b,"+-",Sb
	plt.xlim(0,0.3)
	plt.ylim(0,2.1)
	plt.show()
Пример #6
0
def plot2d():
        fig=plt.figure(figsize=(16,12))
        P2= Ueff2*Ieff2
        t1=ocd.plot_var(Ieff2,P,var,messung222,False)
        t1=ocd.plot_var(Ieff2,P2,var,messung222,False)
        #plt.xscale("log",nonpox="clip")
        #plt.yscale("log",nonpox="clip")
        plt.xlabel(ur"$I_eff2$")
        plt.ylabel(ur"$P$")
        plt.title("Messung 222: Vergleich der von $P1$ mit $P2$")
        plt.grid(True)
        plt.show()
Пример #7
0
def plot_ver2():
	fig=plt.figure(figsize=(16,12))
	ocd.plot_var(f,Ua/Ue,var,messung213)
	#ocd.plot_var(f,v1,var,messung213)
	#ocd.plot_var(f,v2,var,messung213)
        plt.plot(f_,v1)
        plt.plot(f_,v2)
        plt.xscale("log",nonpox="clip")
        plt.yscale("log",nonpox="clip")
        plt.grid(True)
	plt.xlabel("f in Hz")
	plt.ylabel(ur"Frequenzabhängiger Verstärker")
	plt.show()
Пример #8
0
def plot_ver():
	fig=plt.figure(figsize=(16,12))
	ocd.plot_var(f,Ua/Ue,var,messung212)
	t=ocd.plot_var(f,Ua/Ue,var,messung211,True)
        (a,b,Sa,Sb,Sy)=t
        textstr=ur"$a= (%.3f\pm %.3f)V$    $b= (%.3f\pm %.3f)\frac{V}{A}$"%(a,Sa,b,Sb)
        props = dict(boxstyle="round", facecolor="wheat", alpha=0.5)
        plt.text(0.05, 0.9, textstr,  fontsize=14, verticalalignment="top", bbox=props)

	plt.ylim(0,100)
	plt.xlabel("f in Hz")
	plt.ylabel(ur"Linearer Verstärker")
	plt.show()
Пример #9
0
def plot_Ue_Ua():
        fig=plt.figure(figsize=(16,12))
        t=ocd.plot_var(Ue,Ua,var,messung231,True,choices=range(10,16)+range(3,8))
        ocd.plot_var(Ue,Ua,var,messung231,False)
        (a,b,Sa,Sb,Sy)=t
        textstr=ur"$a= (%.3f\pm %.3f)V$    $b= (%.3f\pm %.3f)\frac{V}{A}$"%(a,Sa,b,Sb)
        props = dict(boxstyle="round", facecolor="wheat", alpha=0.5)
        plt.text(0.05, 0.9, textstr,  fontsize=14, verticalalignment="top", bbox=props)


        plt.grid(True)
        plt.xlabel("Ue in V")
        plt.ylabel(ur"Ua in V")
        plt.show()
Пример #10
0
def plot241a():
	plt.figure(figsize=(16,12))
	ax=ocd.plot_var(UBE,IB,var,messung241)
	plt.ylabel("IB in A")
	plt.xlabel("UBE in V")
	plt.title("Transistor")
        plt.grid(True)
	plt.show()
Пример #11
0
def plot1a():
        fig=plt.figure(figsize=(16,12))
        t1=ocd.plot_var(Ieff2,Ueff2/Ueff1,var,messung221,True)
        #plt.xscale("log",nonpox="clip")
        #plt.yscale("log",nonpox="clip")
        plt.xlabel(ur"$I_eff2$")
        plt.ylabel(ur"$\frac{Ueff2}{Ueff1}$")
        plt.title(ur"Spannungsverhältnis $\frac{Ueff2}{Ueff1}$")
Пример #12
0
def plot251_leistung():
	plt.figure()
	p=ocd.plot_var(I,U*I,var,messung251,True,2)
        print p	
	plt.xlabel("I in A")
	plt.ylabel("P in W")
	plt.title(ur"Leistungsanpassung")
	plt.show()
Пример #13
0
def plot251():
	plt.figure()
	(a,b,Sa,Sb,Sy)=ocd.plot_var(I,U,var,messung251,True)
	plt.xlabel("I in A")
	plt.ylabel("U in V")
	plt.title(ur"Netzgerät mit mittlerem Innenwiderstand")
	print "a:",a,"+-",Sa
	print "b:",b,"+-",Sb
	plt.show()
Пример #14
0
def plot252():
	plt.figure()
	(a,b,Sa,Sb,Sy)=ocd.plot_var(I,U,var,messung252,True)
	plt.xlabel("I in A")
	plt.ylabel("U in V")
	plt.title(ur"Bleiakku")
	print "a:",a,"+-",Sa
	print "b:",b,"+-",Sb
	plt.show()
Пример #15
0
def plot1c():
        fig=plt.figure(figsize=(16,12))
        t1=ocd.plot_var(Ieff2,eta,var,messung221,False)
        #plt.xscale("log",nonpox="clip")
        #plt.yscale("log",nonpox="clip")
        plt.xlabel(ur"$I_{eff2}$ in A",fontsize=16)
        plt.ylabel(ur"$\eta$",fontsize=16)
        plt.title("Wirkungsgrad")
        plt.grid(True)
        plt.show()
Пример #16
0
def plot253():
	plt.figure()
	(a,b,Sa,Sb,Sy)=ocd.plot_var(I,U,var,messung232,True)
	plt.xlabel("I in A")
	plt.ylabel("U in V")
	plt.title(ur"Spannungsstabilisiertes Netzgerät")
	print "a:",a,"+-",Sa
	print "b:",b,"+-",Sb
	plt.xlim(0,1.4)
	plt.show()
Пример #17
0
def plot254():
	plt.figure()
	(a,b,Sa,Sb,Sy)=ocd.plot_var(U,I,var,messung254,True)
	plt.xlabel("U in V")
	plt.ylabel("I in A")
	plt.title(ur"Stromstabilisiertes Netzgerät")
	print "a:",a,"+-",Sa
	print "b:",b,"+-",Sb

	plt.show()
Пример #18
0
def plot241b():
	plt.figure(figsize=(16,12))
	(a,b,Sa,Sb,Sy)=ocd.plot_var(IB,IC,var,messung241,True)
	plt.ylabel("IC in A")
	plt.xlabel("IB in A")
	plt.title("Transistor")
        print "a:",a,"+-",Sa
        print "b:",b,"+-",Sb

        plt.grid(True)
	plt.show()
Пример #19
0
def plot1c():
        fig=plt.figure(figsize=(16,12))
        P2= Ueff2*Ieff2
        eta= P2 / P
        t1=ocd.plot_var(Ieff2,eta,var,messung221,False)
        #plt.xscale("log",nonpox="clip")
        #plt.yscale("log",nonpox="clip")
        plt.xlabel(ur"$I_eff2$")
        plt.ylabel(ur"$\eta$")
        plt.title("Wirkungsgrad")
        plt.grid(True)
        plt.show()
Пример #20
0
def plot_sekundaer():
        fig=plt.figure(figsize=(16,12))
        t=ocd.plot_var(I2,U2,var,messung211,True)
        (a,b,Sa,Sb,Sy)=t
        textstr=ur"$a= (%.3f\pm %.3f)V$    $b= (%.3f\pm %.3f)\frac{V}{A}$"%(a,Sa,b,Sb)
        plt.title(ur"Bestimmung des ohmschen Widerstandes der Sekundärspule",fontsize=16, family= "monospace")
        props = dict(boxstyle="round", facecolor="wheat", alpha=0.5)
        plt.text(0.05, 0.9, textstr,  fontsize=14, verticalalignment="top", bbox=props)
        plt.xlabel(ur"I in A")
        plt.ylabel(ur"U in V")
        plt.grid(True)
        plt.show()
Пример #21
0
def bremsstrahlung():
	fig=plt.figure(figsize=(16,12))
        t=ocd.plot_var(sy.sin(alpha),N,var,messung22,False)
        #(a,b,Sa,Sb,Sy)=t
        #textstr=ur"$a= (%.3f\pm %.3f)V$    $b= (%.3f\pm %.3f)\frac{V}{A}$"%(a,Sa,b,Sb)
        #plt.title(ur"Bestimmung des ohmschen Widerstandes der Primärspule",fontsize=16, family= "monospace")
        #props = dict(boxstyle="round", facecolor="wheat", alpha=0.5)
        #plt.text(0.05, 0.9, textstr,  fontsize=14, verticalalignment="top", bbox=props)
        plt.xlabel(ur"$sin(\alpha)$")
        plt.ylabel(ur"N")
	plt.title(ur"Messung 2.2 Röntgenemissionsspektrum")
        plt.grid(True)
        plt.show()
Пример #22
0
def plot21():
        fig=plt.figure(figsize=(16,12))
        t=ocd.plot_var(Uz,N,var,messung21,False)
        #(a,b,Sa,Sb,Sy)=t
        #textstr=ur"$a= (%.3f\pm %.3f)V$    $b= (%.3f\pm %.3f)\frac{V}{A}$"%(a,Sa,b,Sb)
        #plt.title(ur"Bestimmung des ohmschen Widerstandes der Primärspule",fontsize=16, family= "monospace")
        #props = dict(boxstyle="round", facecolor="wheat", alpha=0.5)
        #plt.text(0.05, 0.9, textstr,  fontsize=14, verticalalignment="top", bbox=props)
        plt.xlabel(ur"Uz in V")
        plt.ylabel(ur"N") 
	plt.title(ur"Messung 2.1 Zählrohrcharakteristik")
        plt.grid(True)
        plt.show()
Пример #23
0
def plot_Ia_Ua():
        fig=plt.figure(figsize=(16,12))
        t=ocd.plot_var(Ia,Ua,var,messung232a,True,choices=[2,5,9])

        t2=ocd.plot_var(Ia,Ua,var,messung232b,True,choices=[0,4,11])

        (a,b,Sa,Sb,Sy)=t
        textstr=ur"$a= (%.3f\pm %.3f)V$    $b= (%.1f\pm %.1f)\frac{V}{A}$"%(a,Sa,b,Sb)
        props = dict(boxstyle="round", facecolor="wheat", alpha=0.5)
        plt.text(0.002, 12.2, textstr,  fontsize=14, verticalalignment="top", bbox=props)

        (a,b,Sa,Sb,Sy)=t2
        textstr=ur"$a= (%.3f\pm %.3f)V$    $b= (%.1f\pm %.1f)\frac{V}{A}$"%(a,Sa,b,Sb)
        props = dict(boxstyle="round", facecolor="wheat", alpha=0.5)
        plt.text(0.008, 13, textstr,  fontsize=14, verticalalignment="top", bbox=props)

 
        plt.grid(True)
        plt.xlabel("Ia in A")
        plt.title(ur"Sättigungsspannung in Abhängigkeit des Stromes")
        plt.ylabel(ur"Us in V")
        plt.show()
Пример #24
0
def plot1a_kleine_stroeme():
        fig=plt.figure(figsize=(16,12))
        t1=ocd.plot_var(Ieff2,Ueff2/Ueff1,var,messung221,True,choices = np.arange(7,21,1))
        (a,b,Sa,Sb,Sy)=t1

        textstr=ur"$a= (%.3f\pm %.3f)V$    $b= (%.3f\pm %.3f)\frac{V}{A}$"%(a,Sa,b,Sb)
        print textstr
        props = dict(boxstyle="round", facecolor="wheat", alpha=0.5)

        #plt.xscale("log",nonpox="clip")
        #plt.yscale("log",nonpox="clip")
        plt.xlabel(ur"$I_{eff2}$ in A",fontsize=16)
        plt.ylabel(ur"$\frac{Ueff2}{Ueff1}$",fontsize=16)
        plt.title(ur"Spannungsverhältnis" )
        plt.text(0.05, 0.95, textstr,  fontsize=14, verticalalignment="top", bbox=props)
Пример #25
0
def plot243a():
	plt.figure(figsize=(16,12))
	ocd.plot_var(UCE,IC,var,messung243,choices=range(0,21))
	ocd.plot_var(UCE,IC,var,messung243,choices=range(21,43))
	ocd.plot_var(UCE,IC,var,messung243,choices=range(43,58))
	plt.ylabel("IC in A")
	plt.xlabel("UCE in V")
	plt.title("Transistor")
        plt.grid(True)
	plt.show()
Пример #26
0
def plot_Ue_Ua():
        fig=plt.figure(figsize=(16,12))
        ocd.plot_var(Ue,Ua,var,messung232b,choices=range(4))
        ocd.plot_var(Ue,Ua,var,messung232b,choices=range(4,8))
        ocd.plot_var(Ue,Ua,var,messung232b,choices=range(8,12))
        plt.grid(True)
        plt.xlabel("Ue in V")
        plt.ylabel(ur"Ua in V")
        plt.title(ur"Sättigungsverhalten ohne Ausgangswiderstand")
        plt.show()
Пример #27
0
def plot_gbe(ex,f_re):
	plt.figure()
	beta_r=np.linspace(0.2,5,1000)
	g_f=beta_r+1
	b_f=(beta_r+1)/beta_r
	plt.loglog(beta_r,g_f)
	plt.loglog(beta_r,b_f)
	plt.loglog(beta_r,g_f+b_f)
	ocd.plot_var(beta,e/f_re,var,ex+offsets)
	ocd.plot_var(beta,b/f_re,var,ex+offsets)
	ocd.plot_var(beta,g/f_re,var,ex+offsets)
	plt.xlabel(ur"$\beta$")
	plt.ylabel(ur"Theoretischer und gemessener Wert von $\frac{b}{f}$,$\frac{g}{f}$ und $\frac{e}{f}$")
	plt.title(ur"Verlauf der Bildweite $b$, Gegenstandsweite $g$ und Gesamtabstand $e$ bei Gesamtbrennweite $f="+str(f_re)+"m$")	
	plt.show()
Пример #28
0
def plot_all_c():
        fig=plt.figure(figsize=(16,12))
        plt.grid(True)
        R_ = 6*10**np.linspace(1,6,1000)

        v_ = L * w0 / R_
        f2 = np.sqrt(w0**2 - R_**2 / (2*L**2))/(2*np.pi)
        plt.plot(f2,v_,"-")
        ocd.plot_var(f,Uc0/Ua0,var,messung21)
        ocd.plot_var(f,Uc0/Ua0,var,messung22)
        ocd.plot_var(f,Uc0/Ua0,var,messung23)
        plt.plot(f_,get_v(14.39),"r--")
        plt.plot(f_,get_v(3.33),"r--")
        plt.plot(f_,get_v(6.57),"r--")
        plt.title(ur"getriebener, gedämpfter Oszillator")
        plt.xlabel("Frequenz in Hz")
        plt.ylabel(ur"$U_{c0}/U_{a0}$")

        plt.xlim(0,3.1E5)
        plt.show()
Пример #29
0
def plot_dt():
        fig=plt.figure(figsize=(16,12))
        plt.grid(True)
        T = 1 / f
        phi = 2*sy.pi * dt / T 
        
        ocd.plot_var(f,phi,var,messung21)
        ocd.plot_var(f,phi,var,messung22)
        ocd.plot_var(f,phi,var,messung23)
        f_ = np.linspace(0,300000,1000)
        plt.plot(f_,theo_delta(f_,14.39))
        plt.plot(f_,theo_delta(f_,3.33))
        plt.plot(f_,theo_delta(f_,6.57))
         
        
        plt.ylim(0,np.pi)
        plt.xlim(-0.1E5,3.1E5)
        plt.title(ur"Phasenverschiebung des getriebenen, gedämpften Oszillators")
        plt.xlabel("Frequenz in Hz")
        plt.ylabel("Phasenverschiebung in Radianten")

        plt.show()
Пример #30
0
def plot_all_b():
        fig=plt.figure(figsize=(16,12))
        plt.grid(True)
        R_ = 6*10**np.linspace(1,6,1000)

        v_ = L * w0 / R_
        f2 = np.sqrt(w0**2 - R_**2 / (2*L**2))/(2*np.pi)
        #plt.plot(f2,v_,"-")
        C_ = ocd.Groesse("C","F",np.array([1.18922759294E-9]),np.array([7.604340813225311e-12]))
        C = sy.Symbol("C")
        ocd.plot_var(f,C*w*Uc0/Ua0,var+[C],messung21+[C_])
        ocd.plot_var(f,C*w*Uc0/Ua0,var+[C],messung22+[C_])
        ocd.plot_var(f,C*w*Uc0/Ua0,var+[C],messung23+[C_])
        
        plt.title(ur"getriebener, gedämpfter Oszillator")
        plt.xlabel("Frequenz in Hz")
        plt.ylabel(ur"$I_{0}/U_{a0}$ in A/V")

        plt.plot(f_,get_a(14.39),"r--")
        plt.plot(f_,get_a(3.33),"r--")
        plt.plot(f_,get_a(6.57),"r--")

        plt.xlim(0,3.1E5)
        plt.show()