• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Python api.line函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中taref.plotter.api.line函数的典型用法代码示例。如果您正苦于以下问题:Python line函数的具体用法?Python line怎么用?Python line使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了line函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。

示例1: background_plot

 def background_plot(self, pl=None):
     pl=line(self.freq_axis[self.flat_indices], array([fp[2]+fp[3] for fp in self.fit_params]), pl=pl)
     line(self.freq_axis[self.indices], self.MagAbsFilt_sq[self.indices,0], plotter=pl, color="red", linewidth=1.0, alpha=0.5)
     if self.show_quick_fit:
         if self.fitter.p_guess is not None:
             line(self.freq_axis[self.flat_indices], array([pg[2]+pg[3] for pg in self.fitter.p_guess]), pl=pl, color="green", linewidth=0.5)
     return pl
开发者ID:thomasaref,项目名称:TA_software,代码行数:7,代码来源:vna_lyzer.py


示例2: ifft_plot

def ifft_plot(self, **kwargs):
    process_kwargs(self, kwargs, pl="hannifft_{0}_{1}_{2}".format(self.filter_type, self.bgsub_type, self.name))
    on_res=10*log10(absolute(self.filt.window_ifft(self.MagcomData[:,0])))

    pl=line(self.time_axis-0.05863, self.filt.fftshift(on_res),  color="purple",
           plot_name="onres_{}".format(self.on_res_ind), alpha=0.8, label="IFFT", **kwargs)

    self.filt.N=len(on_res)
    filt=self.filt.freqz
    #filt=filt_prep(len(on_res), self.filt_start_ind, self.filt_end_ind)
    top=36.0#amax(on_res)
    line(self.time_axis-0.05863, filt*top-70, plotter=pl, color="green",
         linestyle="dotted", label="Filter window")
    pl.xlabel=kwargs.pop("xlabel", self.time_axis_label)
    pl.ylabel=kwargs.pop("ylabel", "Mag abs")

    scatter(array([0.05863,   0.2,  0.337,   0.48,  0.761, 1.395, 1.455])-0.05863,
            array([0.0, 500.0, 1000.0, 1500.0, 2500.0, 4500,  200+2500+2500-300])/100.0-60,
            marker_size=4.0, pl=pl, label="IFFT peak")
    t=linspace(0,2,1001) #self.time_axis-0.05863
    line(t, 3488.0*t/100.0-60, pl=pl, color="black", linestyle="dashed", auto_xlim=False, x_min=-0.2, x_max=1.0,
         auto_ylim=False, y_min=-65, y_max=-15, label="$d=v_ft$")

    t=array([8.7e-8, 2.64e-7, 3.79e-7, 4.35e-7, 6.6e-7])-8.7e-8
    scatter(t*1e6, array([0.0, 600.0, 1000.0, 1200.0, 2000.0])/100.0-60, pl=pl,
            facecolor="red", edgecolor="red", label="100 ns pulse",
            marker_size=4.0)
    pl.legend()
    #b.line_plot("spd_fit", t*1e6,  (t*qdt.vf)*1e6, label="(3488 m/s)t")

    return pl
开发者ID:thomasaref,项目名称:TA_software,代码行数:31,代码来源:D0527_trans_careful.py


示例3: filt_compare

 def filt_compare(self, ind, **kwargs):
     process_kwargs(self, kwargs, pl="filtcomp_{0}_{1}_{2}".format(self.filter_type, self.bgsub_type, self.name))
     self.filter_type="None"
     pl=line(self.frequency, self.MagdB[:, ind], label="MagAbs (unfiltered)", **kwargs)
     self.filter_type="FFT"
     line(self.frequency, self.MagdB[:, ind], label="MagAbs (filtered)", plotter=pl)
     return pl
开发者ID:thomasaref,项目名称:TA_software,代码行数:7,代码来源:vna_lyzer.py


示例4: anharm_plot

    def anharm_plot():
        """reproduces anharm plot in Anton's paper"""
        set_tag(qdt, "EjdivEc", log=False)
        set_tag(qdt, "Ej", log=False)

        #qdt.epsinf=qdt.epsinf/3.72
        #qdt.Np=10
        #qdt.Ec=qdt.fq*0.1*h
        print qdt.max_coupling, qdt.coupling_approx
        anharm=qdt.call_func("anharm", EjdivEc=EjdivEc)
        anharmp=qdt.call_func("lamb_shifted_anharm", EjdivEc=EjdivEc)
        fq=qdt.call_func("fq", Ej=EjdivEc*qdt.Ec)
        ls_fq=qdt.call_func("lamb_shifted_fq", EjdivEc=EjdivEc)
        ls_fq2=qdt.call_func("lamb_shifted_fq2", EjdivEc=EjdivEc)

        pl, pf=line(fq/qdt.f0, (anharmp/h-anharm/h)/(2.0*qdt.max_coupling), linewidth=0.5, color="black", label=r"$\Delta_{2,1}-\Delta_{1,0}$")
        line(fq/qdt.f0, (ls_fq-fq)/(2.0*qdt.max_coupling), plotter=pl, color="blue", linewidth=0.5, label=r"$\Delta_{1,0}$")
        E0, E1, E2=qdt.call_func("transmon_energy_levels", EjdivEc=EjdivEc, n_energy=3)
        fq2=(E2-E1)/h
        line(fq/qdt.f0, (ls_fq2-fq2)/(2.0*qdt.max_coupling), plotter=pl, color="red", linewidth=0.5, label=r"$\Delta_{2,1}$")
        pl.set_ylim(-1.0, 0.6)
        pl.set_xlim(0.7, 1.3)
        pl.xlabel=r"$f_{10}/f_{IDT}$"
        pl.ylabel=r"$\Delta/\Gamma_{10}^{MAX}$"
        pl.legend(loc='lower left')
        #fq=qdt.call_func("lamb_shifted_fq", EjdivEc=EjdivEc)
        #line(EjdivEc, fq, plotter=pl, color="green", linewidth=0.5)

        #line(EjdivEc, E1p, plotter=pl, color="green", linewidth=0.5)
        #line(EjdivEc, E2p, plotter=pl, color="purple", linewidth=0.5)
        return pl
开发者ID:priyanka27s,项目名称:TA_software,代码行数:31,代码来源:qdt.py


示例5: Pmatrix

def Pmatrix(Np=5, frqs=frqs, f0=4.5e9, vf=3488.0, rs=-1j*0.03, Cs=4.07e-10, W=25.0e-6):
    ts=sqrt(1+rs**2)
    lbda0=vf/f0
    p=lbda0/4.0
    #N=4*Np-3
    #Np=int((N+3)/4.0)

    C=sqrt(2.0)*Np*W*Cs
    Pmat=array([P_one_freq(Np=Np, f=f, p=p, ts=ts, rs=rs) for f in frqs])#, dtype=complex)
    #print shape(Pmat)
    (P11, P12, P13,
     P21, P22, P23,
     P31, P32, Ga)=(Pmat[:,0], Pmat[:,1], Pmat[:,2],
                    Pmat[:,3], Pmat[:,4], Pmat[:,5],
                    Pmat[:,6], Pmat[:,7], absolute(Pmat[:,8]))
    Ba=-imag(hilbert(Ga))
    w=2*pi*frqs
    P33=Ga+1j*Ba+1j*w*C
    if 0:
        line(frqs, Ga, pl=pl)
        line(frqs, Ba, pl=pl)

    return (P11, P12, P13,
            P21, P22, P23,
            P31, P32, P33)
开发者ID:thomasaref,项目名称:TA_software,代码行数:25,代码来源:RAM_time_test.py


示例6: flux_line

 def flux_line(self, pl=None, xlabel="$\Phi/\Phi_0$", ylabel="Frequency (GHz)"):
     xmin, xmax, ymin, ymax=pl.x_min, pl.x_max, pl.y_min, pl.y_max
     line(self.flux_over_flux0[10:-10], self.fq[10:-10]/1e9, plotter=pl, xlabel=xlabel, ylabel=ylabel)
     pl.x_min, pl.x_max, pl.y_min, pl.y_max=xmin, xmax, ymin, ymax
     pl.xlabel="$\Phi/\Phi_0$"
     pl.ylabel="Frequency (GHz)"
     return pl
开发者ID:priyanka27s,项目名称:TA_software,代码行数:7,代码来源:lyzer.py


示例7: ifft_plot

 def ifft_plot(self):
     p, pf=line(absolute(fft.ifft(self.Magcom[:,self.on_res_ind])), plotter="ifft_{}".format(self.name),
            plot_name="onres_{}".format(self.on_res_ind),label="i {}".format(self.on_res_ind), color="red")
     line(absolute(fft.ifft(self.Magcom[:,self.start_ind])), plotter=p, linewidth=1.0,
          plot_name="strt {}".format(self.start_ind), label="i {}".format(self.start_ind))
     line(absolute(fft.ifft(self.Magcom[:,self.stop_ind])), plotter=p, linewidth=1.0,
          plot_name="stop {}".format(self.stop_ind), label="i {}".format(self.stop_ind))
     return p
开发者ID:priyanka27s,项目名称:TA_software,代码行数:8,代码来源:lyzer.py


示例8: arc_arrow

def arc_arrow(x=0, y=0, angle=13*pi/8.0, sangle=0.0, r=1, Nsteps=101, xa=0.01, ya=0.007, color=color, linewidth=linewidth, **kwargs):
    theta=linspace(sangle, angle, Nsteps)
    x_arr=x+r*cos(theta)
    y_arr=y+r*sin(theta)
    line(x_arr, y_arr, color=color, linewidth=linewidth, **kwargs)
    pl.axes.arrow(x_arr[-1], y_arr[-1], xa, ya, shape='full', lw=linewidth,
                  length_includes_head=False, edgecolor="black", facecolor="black",
                  head_width=10)
开发者ID:thomasaref,项目名称:TA_software,代码行数:8,代码来源:fig1_setup2.py


示例9: ifft_plot

def ifft_plot(self):
    Magcom=(self.Magcom.transpose()-self.Magcom[:, 0]).transpose()
    p, pf=line(absolute(fft.ifft(Magcom[:,self.on_res_ind])), plotter="ifft_{}".format(self.name),
           plot_name="onres_{}".format(self.on_res_ind),label="i {}".format(self.on_res_ind))
    line(absolute(fft.ifft(Magcom[:,self.start_ind])), plotter=p,
         plot_name="strt {}".format(self.start_ind), label="i {}".format(self.start_ind))
    line(absolute(fft.ifft(Magcom[:,self.stop_ind])), plotter=p,
         plot_name="stop {}".format(self.stop_ind), label="i {}".format(self.stop_ind))
开发者ID:priyanka27s,项目名称:TA_software,代码行数:8,代码来源:D0424_wide_gate_fft.py


示例10: magabsfilt2_colormesh

 def magabsfilt2_colormesh(self):
     p, pf=colormesh(self.frequency[10:-10]/1e9, self.yoko[10:-10],
                     self.MagAbsFilt.transpose()[10:-10, 10:-10], plotter="magabsfilt2_{}".format(self.name))
     print self.voltage_from_flux_par2[0].shape,self.voltage_from_flux_par2[1].shape
     line(self.voltage_from_flux_par2[0]/1e9, self.voltage_from_flux_par2[1], plotter=p)
     #print max(self.voltage_from_flux_par), min(self.voltage_from_flux_par)
     p.xlabel="Yoko (V)"
     p.ylabel="Frequency (GHz)"
     return p
开发者ID:priyanka27s,项目名称:TA_software,代码行数:9,代码来源:lyzer.py


示例11: flux_par4

def flux_par4(self, offset=-0.08, flux_factor=0.16, Ejmax=h*44.0e9, f0=5.35e9, alpha=0.7, pl=None):
    set_all_tags(qdt, log=False)
    flux_o_flux0=flux_over_flux0(self.yoko, offset, flux_factor)
    qEj=Ej(Ejmax, flux_o_flux0)
    #flux_o_flux0=qdt.call_func("flux_over_flux0", voltage=self.yoko, offset=offset, flux_factor=flux_factor)
    freq, frq2=flux_parabola(self.yoko, offset, flux_factor, Ejmax, qdt.Ec)
    fq1=lamb_shifted_fq2(qEj/qdt.Ec, qdt.ft, qdt.Np, f0, qdt.epsinf, qdt.W, qdt.Dvv)
    line(self.yoko, freq, plotter=pl, linewidth=1.0, alpha=0.5)
    line(self.yoko, fq1/2, plotter=pl, linewidth=1.0, alpha=0.5)
开发者ID:thomasaref,项目名称:TA_software,代码行数:9,代码来源:D0703_osc_test.py


示例12: ifft_plot

    def ifft_plot(self, **kwargs):
        process_kwargs(self, kwargs, pl="hannifft_{0}_{1}_{2}".format(self.filter_type, self.bgsub_type, self.name))
        on_res=absolute(filt.window_ifft(self.MagcomData[50,:, 91]))
        #strt=absolute(self.filt.window_ifft(self.Magcom[:,self.start_ind]))
        #stop=absolute(self.filt.window_ifft(self.Magcom[:,self.stop_ind]))

        pl=line(filt.fftshift(on_res),  color="red",
               plot_name="onres_{}".format(self.on_res_ind),label="{:.4g}".format(self.flux_axis[self.on_res_ind]), **kwargs)
        #line(self.time_axis, self.filt.fftshift(strt), pl=pl, linewidth=1.0, color="purple",
        #     plot_name="strt {}".format(self.start_ind), label="{:.4g}".format(self.flux_axis[self.start_ind]))
        #line(self.time_axis, self.filt.fftshift(stop), pl=pl, linewidth=1.0, color="blue",
        #     plot_name="stop {}".format(self.stop_ind), label="{:.4g}".format(self.flux_axis[self.stop_ind]))

        filt.N=len(on_res)
        filt_frq=filt.freqz
        #filt=filt_prep(len(on_res), self.filt_start_ind, self.filt_end_ind)
        top=amax(on_res)#, amax(strt), amax(stop)])
        line(filt_frq*top, plotter=pl, color="green", label="wdw")
        pl.xlabel=kwargs.pop("xlabel", self.time_axis_label)
        pl.ylabel=kwargs.pop("ylabel", "Mag abs")
        if 1:
            double_filt= array([[filt.fft_filter(a.MagcomFilt[m,:, n]) for n in range(len(a.frq2))] for m in a.flat_indices])#.transpose()
            print double_filt.shape
            double_filt=swapaxes(double_filt, 1, 2)
            endskip=2

            colormesh(absolute(double_filt[a.end_skip:-a.end_skip, 56, :]).transpose()-absolute(double_filt[a.end_skip:-a.end_skip, 56, 134]).transpose())#-absolute(double_filt[50, 10:-10, 134]))
            colormesh(absolute(double_filt[a.end_skip:-a.end_skip, 58, :]).transpose()-absolute(double_filt[a.end_skip:-a.end_skip, 58, 134]).transpose())#-absolute(double_filt[250, 10:-10, 134]))
            colormesh(absolute(double_filt[a.end_skip:-a.end_skip, 60, :]).transpose()-absolute(double_filt[a.end_skip:-a.end_skip, 60, 134]).transpose())#-absolute(double_filt[450, 10:-10, 134]))
            print a.yoko[58]
            colormesh(absolute(double_filt[a.end_skip:-a.end_skip, 20, :]).transpose()-absolute(double_filt[a.end_skip:-a.end_skip, 20, 134]).transpose())#-absolute(double_filt[50, 10:-10, 134]))
            colormesh(absolute(double_filt[a.end_skip:-a.end_skip, 45, :]).transpose()-absolute(double_filt[a.end_skip:-a.end_skip, 45, 134]).transpose())#-absolute(double_filt[250, 10:-10, 134]))
            colormesh(absolute(double_filt[a.end_skip:-a.end_skip, 70, :]).transpose()-absolute(double_filt[a.end_skip:-a.end_skip, 70, 134]).transpose())#-absolute(double_filt[450, 10:-10, 134]))


            colormesh(absolute(a.MagcomData[50, :, :]).transpose())
            pl=colormesh(absolute(a.MagcomFilt[50, endskip:-endskip, :]).transpose())
            colormesh(absolute(double_filt[50, endskip:-endskip, :]).transpose(), pl=pl)#-absolute(double_filt[50, 10:-10, 134]))
            colormesh(absolute(double_filt[250, endskip:-endskip, :]).transpose())#-absolute(double_filt[250, 10:-10, 134]))
            colormesh(absolute(double_filt[450, endskip:-endskip, :]).transpose())#-absolute(double_filt[450, 10:-10, 134]))



            colormesh(absolute(double_filt[50, endskip:-endskip, :]).transpose()/absolute(double_filt[50, endskip:-endskip, 134]))
            colormesh(absolute(double_filt[250, endskip:-endskip, :]).transpose()/absolute(double_filt[250, endskip:-endskip, 134]))
            colormesh(absolute(double_filt[450, endskip:-endskip, :]).transpose()/absolute(double_filt[450, endskip:-endskip, 134]))

            colormesh(angle(double_filt[50, 10:-10, :]).transpose())#-absolute(double_filt[50, 10:-10, 134]))
            colormesh(angle(double_filt[250, 10:-10, :]).transpose())#-absolute(double_filt[250, 10:-10, 134]))
            colormesh(angle(double_filt[450, 10:-10, :]).transpose())#-absolute(double_filt[450, 10:-10, 134]))

            #colormesh(absolute(double_filt[:, :, 75]))
            #colormesh(absolute(double_filt[:, :, 50]))
            #colormesh(absolute(double_filt[:, :, 25]))

        return pl
开发者ID:thomasaref,项目名称:TA_software,代码行数:56,代码来源:D1109_two_tone_pwr_spec.py


示例13: ifft_plot

    def ifft_plot(self):
        pl=Plotter(fig_width=6, fig_height=4)

        line("ifft_{}".format(self.name), absolute(fft.ifft(self.Magcom[:,self.on_res_ind])), label="On resonance")
        line("ifft_{}".format(self.name), absolute(fft.ifft(self.Magcom[:,0])), label="Off resonance", color="red")
        pl.legend()
        pl.set_xlim(0, 100)
        pl.xlabel="Time (#)"
        pl.ylabel="Absolute Magnitude"
        return pl
开发者ID:thomasaref,项目名称:TA_software,代码行数:10,代码来源:D0316_S4A1_coupling_midpeak.py


示例14: giant_atom_variety_check

def giant_atom_variety_check(pl="giant_atom_check", **kwargs):
    idt=IDT.process_kwargs(kwargs)
    idt.Y0_type="center"
    idt.df_type="center"
    idt.mus_type="center"
    idt.Ga_type="giant atom"#, "full sum"
    idt.Ba_type="formula"
    frq=linspace(0e9, 10e9, 10000)
    idt.fixed_freq_max=20.0*idt.f0
    pl=line(frq/idt.f0, idt._get_Ga(frq)/idt.Ga0_approx, plotter=pl, label="giant atom", **kwargs)
    idt.Y0_type="formula"
    line(frq/idt.f0, idt._get_Ga(frq)/idt.Ga0_approx, plotter=pl, label="Y0", color="red", **kwargs)
    idt.Y0_type="center"
    idt.df_type="formula"
    line(frq/idt.f0, idt._get_Ga(frq)/idt.Ga0_approx, plotter=pl, label="df", color="green", **kwargs)
    idt.df_type="center"
    idt.mus_type="formula"
    line(frq/idt.f0, idt._get_Ga(frq)/idt.Ga0_approx, plotter=pl, label="alpha", color="purple", **kwargs)

    X=idt.Np*pi*(frq-idt.f0)/idt.f0
    line(frq/idt.f0, (sin(X)/X)**2, plotter=pl, label="sinc", color="blue", **kwargs)
    #line(frq/idt.f0, idt._get_Ba(frq)/idt.Ga0_approx, plotter=pl, label=idt.Ga_type, **kwargs)
    #idt.Ba_type="hilbert"
    #line(frq/idt.f0, idt._get_Ba(frq)/idt.Ga0_approx, plotter=pl, label=idt.Ga_type, **kwargs)
    #line(frq/idt.f0, -imag(hilbert(idt._get_Ga(frq)/idt.Ga0_approx)), plotter=pl, label=idt.Ga_type, **kwargs)
    #print idt.Ga0, idt.Ga0_approx
    #print idt.Ga0_mult
    #print idt.max_coupling, idt.max_coupling_approx
    return pl
开发者ID:thomasaref,项目名称:TA_software,代码行数:29,代码来源:idt_graphs.py


示例15: flux_par3

def flux_par3(self, offset=-0.07, flux_factor=0.52, Ejmax=h*44.0e9, f0=5.35e9, alpha=0.0, C=qdt.Ct, pl=None):
    set_all_tags(qdt, log=False)
    #flux_o_flux0=qdt.call_func("flux_over_flux0", voltage=self.yoko, offset=offset, flux_factor=flux_factor)
    #print flux_o_flux0-pi/2*trunc(flux_o_flux0/(pi/2.0))
    #Ej=qdt.call_func("Ej", flux_over_flux0=flux_o_flux0, Ejmax=Ejmax)
    #EjdivEc=Ej/qdt.Ec
    #fq_vec=array([sqrt(f*(f+1.0*qdt.call_func("calc_Lamb_shift", fqq=f))) for f in self.frequency])
    fq_vec=array([f-qdt.call_func("Lamb_shift", f=f, f0=f0) for f in self.frequency])
    fq_vec=array([sqrt(f*(f-2*qdt.call_func("Lamb_shift", f=f, f0=f0, couple_mult=alpha))) for f in self.frequency])
    Ec=qdt.call_func("Ec", Cq=C)
    Ej=qdt._get_Ej(fq=fq_vec, Ec=Ec) #Ej_from_fq(fq_vec, qdt.Ec)
    flux_d_flux0=arccos(Ej/Ejmax)#-pi/2
    flux_d_flux0=append(flux_d_flux0, -arccos(Ej/Ejmax))
    flux_d_flux0=append(flux_d_flux0, -arccos(Ej/Ejmax)+pi)
    flux_d_flux0=append(flux_d_flux0, arccos(Ej/Ejmax)-pi)

    if pl is not None:
        volt=qdt._get_voltage(flux_over_flux0=flux_d_flux0, offset=offset, flux_factor=flux_factor)
        freq=s3a4_wg.frequency[:]/1e9
        freq=append(freq, freq) #append(freq, append(freq, freq)))
        freq=append(freq, freq)
        #freq=append(freq, freq)
        line(freq, volt, plotter=pl, linewidth=1.0, alpha=0.5)
        #EjdivEc=Ej/qdt.Ec
        #ls_fq2=qdt.call_func("lamb_shifted_fq2", EjdivEc=EjdivEc)
        #E0, E1, E2=qdt.call_func("transmon_energy_levels", EjdivEc=EjdivEc, n_energy=3)
        #fq2=(E2-E1)/h
        #f_vec=lamb_shifted_anharm(EjdivEc, qdt.ft, qdt.Np, qdt.f0, qdt.epsinf, qdt.W, qdt.Dvv)
        #ah=-ls_fq2/2#-fq2)
        #fq_vec=array([sqrt((f-ah[n])*(f-ah[n]+alpha*calc_freq_shift(f-ah[n], qdt.ft, qdt.Np, f0, qdt.epsinf, qdt.W, qdt.Dvv))) for n, f in enumerate(self.frequency)])
        #fq_vec=array([f/2-qdt.call_func("calc_Lamb_shift", fqq=f/2) for f in self.frequency])

        #freq=(s3a4_wg.frequency[:]-1.45e9)/1e9
        #freq=append(freq, freq)
        #freq=append(freq, freq)
        #Ej=Ej_from_fq(fq_vec, qdt.Ec)
        #flux_d_flux0=arccos(Ej/Ejmax)#-pi/2
        #flux_d_flux0=append(flux_d_flux0, -arccos(Ej/Ejmax))
        #flux_d_flux0=append(flux_d_flux0, -arccos(Ej/Ejmax)+pi)
        #flux_d_flux0=append(flux_d_flux0, arccos(Ej/Ejmax)-pi)

        #freq=append(freq, freq)
        #fq_vec+=f_vec/h/2
        #fq2_vec=fq2(Ej, qdt.Ec)
        #Ej=Ej_from_fq(fq_vec, qdt.Ec) #qdt.call_func("lamb_shifted_fq2", EjdivEc=EjdivEc)
        #Ej=Ej_from_fq(fq_vec, qdt.Ec)
        #flux_d_flux0=arccos(Ej/Ejmax)#-pi/2
        #flux_d_flux0=append(flux_d_flux0, -arccos(Ej/Ejmax))
        #volt=voltage_from_flux(flux_d_flux0, offset, flux_factor)
        #line(freq, volt, plotter=pl, plot_name="second", color="green", linewidth=1.0, alpha=0.5)
    #flux_d_flux0.append(-)
    return qdt._get_voltage(flux_over_flux0=flux_d_flux0, offset=offset, flux_factor=flux_factor)
开发者ID:priyanka27s,项目名称:TA_software,代码行数:52,代码来源:D0424_wide_gate_fft.py


示例16: ifft_plot

def ifft_plot(self):
    pl=Plotter(fig_width=6, fig_height=4)

    line("ifft_{}".format(self.name), absolute(fft.ifft(self.Magcom[:,self.on_res_ind])), label="On resonance")
    line("ifft_{}".format(self.name), absolute(fft.ifft(self.Magcom[:,0])), label="Off resonance", color="red")
    pl.legend()
    pl.set_xlim(0, 100)
    pl.xlabel="Time (#)"
    pl.ylabel="Absolute Magnitude"
    return pl
#ifft_plot(s4a1_mp).show()
        #d.savefig("/Users/thomasaref/Dropbox/Current stuff/Linneaus180416/", "trans_ifft.pdf")
        #d.show()
开发者ID:priyanka27s,项目名称:TA_software,代码行数:13,代码来源:D0315_S1A1_coupling_midpeak.py


示例17: Lamb_shift_check

def Lamb_shift_check(pl="ls_check", **kwargs):
    idt=IDT.process_kwargs(kwargs)
    idt.fixed_freq_max=20.0*idt.f0
    frq=linspace(0e9, 10e9, 10000)

    idt.S_type="RAM"
    pl=line(frq/idt.f0, idt._get_Lamb_shift(f=frq)/idt.max_coupling, plotter=pl, color="cyan", linewidth=0.5, label=idt.S_type, **kwargs)
    idt.S_type="simple"
    idt.fixed_reset()

    idt.Lamb_shift_type="formula"
    idt.couple_type="sinc sq"
    pl=line(frq/idt.f0, idt._get_Lamb_shift(frq)/idt.max_coupling, plotter=pl, linewidth=0.5, label=idt.couple_type, **kwargs)
    idt.couple_type="giant atom"
    line(frq/idt.f0, idt._get_Lamb_shift(frq)/idt.max_coupling, plotter=pl, color="red", linewidth=0.5, label=idt.couple_type)
    idt.couple_type="df giant atom"
    line(frq/idt.f0, idt._get_Lamb_shift(frq)/idt.max_coupling, plotter=pl, color="green", linewidth=0.5, label=idt.couple_type)
    idt.couple_type="full expr"
    line(frq/idt.f0, idt._get_Lamb_shift(frq)/idt.max_coupling, plotter=pl, color="black", linewidth=0.5, label=idt.couple_type)
    #idt.couple_type="full sum"
    #line(frq/idt.f0, idt._get_Lamb_shift(frq)/idt.max_coupling, plotter=pl, color="purple", linewidth=0.5, label=idt.couple_type)
    pl.xlabel="frequency/center frequency"
    pl.ylabel="Lamb shift/max coupling (dB)"
    pl.set_ylim(-1.0, 1.0)
    pl.legend(loc="lower right")

    #line(frq, a._get_full_Lamb_shift(frq)/a.max_coupling, plotter=pl, color="black", linewidth=0.3)
    return pl
开发者ID:thomasaref,项目名称:TA_software,代码行数:28,代码来源:idt_graphs.py


示例18: flux_plots

def flux_plots():
    data=npr.read()
    frequency=linspace(3.5e9, 7.5e9, 1000)
    freq=append(frequency/1e9, frequency/1e9)
    freq=append(freq, freq)
    V=qdt._get_Vfq0_many(f=frequency)[1]

    pl1=scatter(data[:, 0], data[:, 1], fig_width=6.0, fig_height=4.0, color="red", pl="fitVvsf")
    line(freq, V, pl=pl1, ylabel="Yoko (V)", xlabel="Frequency (GHz)")

    pl1.add_label("a)")

    V2=ideal_qdt._get_Vfq0_many(f=frequency)[1]

    pl2=scatter(data[:, 0], data[:, 1], fig_width=6.0, fig_height=4.0, color="red", pl="idealVvsf")
    line(freq, V2, pl=pl2, ylabel="Yoko (V)", xlabel="Frequency (GHz)")
    pl2.add_label("b)")

    pl3=scatter(data[:, 1], data[:, 0], fig_width=6.0, fig_height=4.0, color="red", pl="fitfvsV")
    line(V, freq, pl=pl3, xlabel="Yoko (V)", ylabel="Frequency (GHz)")
    pl3.add_label("c)")

    pl4=scatter(data[:, 1], data[:, 0], fig_width=6.0, fig_height=4.0, color="red", pl="idealfvsV")
    line(V2, freq, pl=pl4, xlabel="Yoko (V)", ylabel="Frequency (GHz)")
    pl4.add_label("d)")

    #pls=[pl1, pl2, pl3, pl4]

    #for pl in pls:
    return [pl1, pl2, pl3, pl4]
开发者ID:thomasaref,项目名称:TA_software,代码行数:30,代码来源:flux_parabola.py


示例19: anton_lamb_shift_plot

def anton_lamb_shift_plot(fig_width=9.0, fig_height=6.0):
    """reproduces coupling/lamb shift plot in Anton's paper"""
    pl=Plotter(fig_width=fig_width, fig_height=fig_height)
    EjdivEc=linspace(0.1, 300, 10000)
    Ej=EjdivEc*antonqdt.Ec
    #E0, E1, E2=antonqdt._get_transmon_energy_levels(Ej=Ej, n_energy=3)
    fq=antonqdt._get_fq(Ej)
    #anharm=(E2-E1)-(E1-E0)
    #E0p, E1p, E2p=antonqdt._get_lamb_shifted_transmon_energy_levels(Ej=Ej, n_energy=3)
    #anharmp=(E2p-E1p)-(E1p-E0p)
    #fq= (E1-E0)/h#qdt.call_func("fq", Ej=EjdivEc*qdt.Ec)
    coup=antonqdt._get_coupling(fq)
    ls=antonqdt._get_Lamb_shift(fq)
    line(fq/antonqdt.f0, 2.0*coup/(2.0*antonqdt.max_coupling), plotter=pl, linewidth=0.5, color="red", label=r"$\Gamma$, $N=10$")
    line(fq/antonqdt.f0, ls/(2.0*antonqdt.max_coupling), plotter=pl, color="green", linewidth=0.5, label=r"$\Delta$, $N=10$")

    #antonqdt.Np=3
    Ej=EjdivEc*antonqdt3.Ec
    fq=antonqdt3._get_fq(Ej)
    coup=antonqdt3._get_coupling(fq)
    ls=antonqdt3._get_Lamb_shift(fq)
    line(fq/antonqdt3.f0, 2.0*coup/(2.0*antonqdt3.max_coupling), plotter=pl, linewidth=0.5, color="blue", label=r"$\Gamma$, $N=3$")
    line(fq/antonqdt3.f0, ls/(2.0*antonqdt3.max_coupling), plotter=pl, color="black", linewidth=0.5, label=r"$\Delta$, $N=3$")
    pl.set_ylim(-0.4, 1.0)
    pl.set_xlim(0.2, 1.8)
    pl.xlabel=r"$f_{10}/f_{IDT}$"
    pl.ylabel=r"$\Delta/\Gamma_{10}^{MAX}$"
    pl.legend(loc='upper right')
    return pl
开发者ID:priyanka27s,项目名称:TA_software,代码行数:29,代码来源:qdt.py


示例20: Lamb_shift_comparison

def Lamb_shift_comparison(pl="ls_comp", **kwargs):
    idt=IDT.process_kwargs(kwargs)

    #idt.rs=-0.01j
    #idt.dloss2=0.1*1e6
    #idt.eta=0.4
    frq=linspace(0e9, 10e9, 10000)
    #idt.N_fixed=100000
    idt.fixed_freq_max=20.0*idt.f0

    idt.S_type="RAM"
    pl=line(frq/idt.f0, idt._get_Lamb_shift(f=frq), plotter=pl, color="cyan", linewidth=0.5, label=idt.S_type, **kwargs)
    idt.S_type="simple"
    idt.fixed_reset()

    idt.Lamb_shift_type="formula"
    idt.couple_type="sinc sq"
    pl=line(frq/idt.f0, idt._get_Lamb_shift(frq), plotter=pl, linewidth=0.5, label="sinc^2", **kwargs)
    idt.couple_type="giant atom"
    line(frq/idt.f0, idt._get_Lamb_shift(frq), plotter=pl, color="red", linewidth=0.5, label=idt.couple_type)

    idt.Lamb_shift_type="hilbert"
    idt.couple_type="df giant atom"
    line(frq/idt.f0, idt._get_Lamb_shift(frq), plotter=pl, color="green", linewidth=0.5, label=idt.couple_type)
    idt.couple_type="full expr"
    line(frq/idt.f0, idt._get_Lamb_shift(frq), plotter=pl, color="black", linewidth=0.5, label=idt.couple_type)
    #idt.couple_type="full sum"
    #line(frq/idt.f0, idt._get_Lamb_shift(frq), plotter=pl, color="purple", linewidth=0.5, label=idt.couple_type)

    pl.xlabel="frequency/center frequency"
    pl.ylabel="Lamb shift"
    pl.set_ylim(-1e9, 1e9)
    pl.legend(loc="lower right")
    return pl
开发者ID:thomasaref,项目名称:TA_software,代码行数:34,代码来源:idt_graphs.py



注:本文中的taref.plotter.api.line函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python api.scatter函数代码示例发布时间:2022-05-27
下一篇:
Python api.colormesh函数代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap