Exemplo n.º 1
0
        t2 = []
        qfreq = []
        for f in freq:
            X2 = 36 * pi * (f - 4.4e9) / 4.4e9
            wrap = (sin(X2) / X2)**2
            R = absolute(R_full(f))**2
            #qfreq.append(freq[argmax(R)])
            #imax=argmax(R)
            #print imax
            #f1=freq[argmin(absolute(R[:imax]-0.5))]
            #f2=freq[argmin(absolute(R[imax:]-0.5))]
            #t2.append(f2-f1)
            temp.append(R)

        #b.line_plot("coup", freq, t2)
        #b.line_plot("R", freq, absolute(R_full(freq))**2)
        b.colormesh("R_full", freq, freq, temp)
        #R_full(4.2500001e9)
        #R_full(4.3000001e9)
        #R_full(4.3500001e9)
        #fq=linspace(4e9, 5e9, 1000)
        #X=Np*pi*(fq-f0)/f0
        #Ga=(sin(X)/X)**2.0
        #Ba=(sin(2.0*X)-2.0*X)/(2.0*X**2.0)
        #b.line_plot("Ga", fq, Ga)
        #b.line_plot("Ba", fq, Ba)
        #sqrt(1/(C))/2*p
        #b.line_plot("semiclassical", fq, absolute(R)/amax(absolute(R)))
    b.show()
    qdt.show()
Exemplo n.º 2
0
                 #f0q=5.45e9
                 #def coup(fq):
                 #    X=Npq*pi*(f-f0q)/f0q
                 #    return 1.0e9*(sin(X)/X)**2
                 #return [1.0/(1.0+((f-fc)/coup(fc))**2) for fc in c.flux_parabola] #1.0j*w*Ct+1.0/(1.0j*w*l)))**2 for l in L]

                 #return [1.0/(1.0+((f*Ba/+f-fc)/coup(fc))**2) for fc in c.flux_parabola] #1.0j*w*Ct+1.0/(1.0j*w*l)))**2 for l in L]

                 #return [absolute(Ga/(Ga+1.0j*w*Ct+1.0/(1.0j*w*l)))**2 for l in L]
                 #return [absolute(Ga/(Ga+1.0j*Ba+1.0j*w*Ct+1.0/(1.0j*w*l)))**2 for l in L]#+1.0j*(VcdivV)*w*Cc)
                 #return [c.flux_parabola[argmax(absolute(Ga/(Ga+1.0j*Ba+1.0j*w*Ct+1.0/(1.0j*w*l))), axis=0)] for l in L]#+1.0j*(VcdivV)*w*Cc)
    d=Fitter2()

    #b.scatter_plot("fluxtry", a.frequency, c.flux_parabola[argmax(array(d.R).transpose(), axis=1)])
    #b.colormesh("fluxtry", a.yoko, a.frequency, array(d.R[0]).transpose()+array(d.R[1]).transpose())
    b.colormesh("fluxtry2", a.yoko, a.frequency, array(d.R[0]).transpose())

    #b.line_plot("fluxtry",  a.frequency, d.R)#.transpose())
    #b.line_plot("fluxtry",  a.frequency, d.R[1])#.transpose())

    if 0:
        from numpy import exp, pi, sqrt, sin, log10, log

        b.line_plot("off res", a.frequency, 10.0*log10(absolute(a.Magcom[:, 300])), linewidth=0.5)

        f=linspace(4.0e9, 5.0e9, 5000)

        class Fitter2(Operative):
            base_name="fitter"
            vf=FloatRange(3000.0, 4000.0, 3488.0).tag(tracking=True)
            tD=FloatRange(0.0, 2000.0, 500.0).tag(tracking=True)
Exemplo n.º 3
0
                #def coup(fq):
                #    X=Npq*pi*(f-f0q)/f0q
                #    return 1.0e9*(sin(X)/X)**2
                #return [1.0/(1.0+((f-fc)/coup(fc))**2) for fc in c.flux_parabola] #1.0j*w*Ct+1.0/(1.0j*w*l)))**2 for l in L]

                #return [1.0/(1.0+((f*Ba/+f-fc)/coup(fc))**2) for fc in c.flux_parabola] #1.0j*w*Ct+1.0/(1.0j*w*l)))**2 for l in L]

                #return [absolute(Ga/(Ga+1.0j*w*Ct+1.0/(1.0j*w*l)))**2 for l in L]
                #return [absolute(Ga/(Ga+1.0j*Ba+1.0j*w*Ct+1.0/(1.0j*w*l)))**2 for l in L]#+1.0j*(VcdivV)*w*Cc)
                #return [c.flux_parabola[argmax(absolute(Ga/(Ga+1.0j*Ba+1.0j*w*Ct+1.0/(1.0j*w*l))), axis=0)] for l in L]#+1.0j*(VcdivV)*w*Cc)

    d = Fitter2()

    #b.scatter_plot("fluxtry", a.frequency, c.flux_parabola[argmax(array(d.R).transpose(), axis=1)])
    #b.colormesh("fluxtry", a.yoko, a.frequency, array(d.R[0]).transpose()+array(d.R[1]).transpose())
    b.colormesh("fluxtry2", a.yoko, a.frequency, array(d.R[0]).transpose())

    #b.line_plot("fluxtry",  a.frequency, d.R)#.transpose())
    #b.line_plot("fluxtry",  a.frequency, d.R[1])#.transpose())

    if 0:
        from numpy import exp, pi, sqrt, sin, log10, log

        b.line_plot("off res",
                    a.frequency,
                    10.0 * log10(absolute(a.Magcom[:, 300])),
                    linewidth=0.5)

        f = linspace(4.0e9, 5.0e9, 5000)

        class Fitter2(Operative):
Exemplo n.º 4
0
#        return data[0,1,:].astype(float64)
#        #print pwr
#
#    @tagged_property(unit="GHz", label="Start frequency")
#    def fstart(self):
#        return self.rd_hdf.data["Traces"]['Rohde&Schwarz Network Analyzer - S12_t0dt'][0][0]
#
#    @tagged_property(unit="GHz", label="Step frequency")
#    def fstep(self):
#        return self.rd_hdf.data["Traces"]['Rohde&Schwarz Network Analyzer - S12_t0dt'][0][1]
#
#    @tagged_property(unit="GHz", label="Frequency")
#    def freq(self, fstart, fstep, sm):
#        return linspace(fstart, fstart+fstep*(sm-1), sm)
from taref.plotter.fig_format import Plotter
a = Lyzer()
#a.rd_hdf.read()
a.read_data()
b = Plotter()
#print b.colormap
b.colormesh("magabs", a.yoko, a.freq, a.MagAbs)
#print b.xyfs, b.clts
#print a.Magcom
print a.probe_frq, a.probe_pwr
print a.yoko.dtype
print get_display(a, "probe_pwr")
#print locals()
#print globals()
#print a.sm
shower(a, b)  #locals_dict=locals())
#read_hdf.show()
Exemplo n.º 5
0
        t2=[]
        qfreq=[]
        for f in freq:
            X2=36*pi*(f-4.4e9)/4.4e9
            wrap=(sin(X2)/X2)**2
            R=absolute(R_full(f))**2
            #qfreq.append(freq[argmax(R)])
            #imax=argmax(R)
            #print imax
            #f1=freq[argmin(absolute(R[:imax]-0.5))]
            #f2=freq[argmin(absolute(R[imax:]-0.5))]
            #t2.append(f2-f1)
            temp.append(R)

        #b.line_plot("coup", freq, t2)
        #b.line_plot("R", freq, absolute(R_full(freq))**2)
        b.colormesh("R_full", freq, freq, temp)
        #R_full(4.2500001e9)
        #R_full(4.3000001e9)
        #R_full(4.3500001e9)
        #fq=linspace(4e9, 5e9, 1000)
        #X=Np*pi*(fq-f0)/f0
        #Ga=(sin(X)/X)**2.0
        #Ba=(sin(2.0*X)-2.0*X)/(2.0*X**2.0)
        #b.line_plot("Ga", fq, Ga)
        #b.line_plot("Ba", fq, Ba)
        #sqrt(1/(C))/2*p
        #b.line_plot("semiclassical", fq, absolute(R)/amax(absolute(R)))
    b.show()
    qdt.show()
Exemplo n.º 6
0
            #R2=-Gamma/(Gamma+1.0j*(w-w0nn))
            anharm=(E2-E1)-(E1-E0)
            R2=R_lor(f, E1p-E0p+anharm/2.0, w0n)
            #R1, R2=R_full(f, E1-E0, (E2-E0)/2.0)
            #qfreq.append(freq[argmax(R)])
            #imax=argmax(R)
            #print imax
            #f1=fq[argmin(absolute(fq-f))]
            #f2=freq[argmin(absolute(R[imax:-1]-0.5))]
            t2.append(R2)
            temp.append(R1)
        temp=array(temp)
        #b.line_plot("coup", freq, t2)
        c=Plotter()
        g=Plotter()
        c.colormesh("R_full", yo, freq, 10*log10(absolute(temp)+absolute(t2)))
        g.colormesh("R_full", yo, freq, absolute(temp))
        h=Plotter()
        h.colormesh("R_full", yo, freq, absolute(t2))


        #g.colormesh('R_angle', yo, freq, angle(temp))        #b.line_plot("Ba", freq, t2)
        #b.line_plot("Ga", freq, temp)
        b.show()

    if 0:
        from numpy import pi, linspace, sin, amax, argmin, argmax, cos
        from scipy.constants import h
        Np=qdt.Np
        f0=5.45e9
        w0=2*pi*f0
Exemplo n.º 7
0
#        return data[0,1,:].astype(float64)
#        #print pwr
#
#    @tagged_property(unit="GHz", label="Start frequency")
#    def fstart(self):
#        return self.rd_hdf.data["Traces"]['Rohde&Schwarz Network Analyzer - S12_t0dt'][0][0]
#
#    @tagged_property(unit="GHz", label="Step frequency")
#    def fstep(self):
#        return self.rd_hdf.data["Traces"]['Rohde&Schwarz Network Analyzer - S12_t0dt'][0][1]
#
#    @tagged_property(unit="GHz", label="Frequency")
#    def freq(self, fstart, fstep, sm):
#        return linspace(fstart, fstart+fstep*(sm-1), sm)
from taref.plotter.fig_format import Plotter
a=Lyzer()
#a.rd_hdf.read()
a.read_data()
b=Plotter()
#print b.colormap
b.colormesh("magabs", a.yoko, a.freq, a.MagAbs)
#print b.xyfs, b.clts
#print a.Magcom
print a.probe_frq, a.probe_pwr
print a.yoko.dtype
print get_display(a, "probe_pwr")
#print locals()
#print globals()
#print a.sm
shower( a, b)#locals_dict=locals())
#read_hdf.show()