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

Python api.scatter函数代码示例

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

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



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

示例1: 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


示例2: 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


示例3: plot_widths

    def plot_widths(self, plotter=None):
        print "first fit"
        tstart=time()
        fq_vec=array([sqrt(f*(f-2*self.qdt._get_Lamb_shift(f=f))) for f in self.frequency])

        #fit_p=self.fano_fit(263, fq_vec)
        #print self.p_guess, fit_p

        #fit=lorentzian(fq_vec, fit_p[1:])
        #pl, pf=line(fq_vec, self.MagAbsFilt_sq[263, :])
        #line(fq_vec, fit, plotter=pl, color="red")
        #pl.show()
        fit_params=self.full_fano_fit(fq_vec)
        pl, pf=scatter(self.frequency, absolute(fit_params[1, :]), color="red", label=self.name, plot_name="widths_{}".format(self.name))

        line(self.frequency, self.qdt._get_coupling(self.frequency)+18e6, plotter=pl)

        pl, pf=scatter(self.frequency, fit_params[2, :], color="red", label=self.name, plot_name="widths_{}".format(self.name))
        line(self.frequency, fq_vec, #flux_par3(self),
        plotter=pl)
        print "fit second", tstart-time()
        tstart=time()

        fq_vec=array([sqrt(f*(f-2*self.qdt._get_Lamb_shift(f=f))) for f in self.frequency])

        pl, pf = scatter(fit_params[2, :], fq_vec, color="red")
        #flux_d_flux0=self.qdt._get_flux_over_flux0(voltage=self.yoko, offset=0.0)
        fq=self.qdt._get_flux_parabola(voltage=self.yoko, offset=0.0)
        line(self.yoko, fq, plotter=pl)
        #fit_params=self.full_fano_fit2()
        #def rpt_fit2(self):
        #    MagAbsFilt_sq=self.MagAbsFilt**2
        #    return rpt_fit(lorentzian2, self.p_guess, MagAbsFilt_sq[440, :], self.yoko)
        #fit2_p=rpt_fit2(self)
        #print fit2_p
        #fit2=lorentzian2(self.yoko, *fit2_p)
        #line(self.yoko, fit2, plotter=pl, color="green")
        #scatter(absolute(fit_params[1, :]), color="red", label=self.name, plot_name="widths_{}".format(self.name))
        print "fit third", tstart-time()
        tstart=time()
        #fit_params=self.full_fano_fit3()
        #scatter(absolute(fit_params[1, :]), color="red", label=self.name, plot_name="widths_{}".format(self.name))
        print "fit done", tstart-time()
开发者ID:thomasaref,项目名称:TA_software,代码行数:43,代码来源:D0509_lowfrq2sidelobe.py


示例4: center_plot

 def center_plot(self, **kwargs):
     process_kwargs(self, kwargs, pl="center_{0}_{1}_{2}".format(self.filter_type, self.bgsub_type, self.name))
     pl=scatter(self.freq_axis[self.flat_indices], array([fp[1] for fp in self.fit_params]), **kwargs)
     if self.show_quick_fit:
         if self.flux_axis_type=="fq":
             line(self.freq_axis[self.indices], self.ls_f[self.indices]/1e9, plotter=pl, color="red", linewidth=1.0)
         elif self.flux_axis_type=="yoko":
             line(self.freq_axis[self.indices], self.qdt._get_Vfq0(f=self.frequency[self.indices]), plotter=pl, color="red", linewidth=1.0)
         else:
             line(self.freq_axis, self.qdt._get_fluxfq0(f=self.frequency), plotter=pl, color="red", linewidth=1.0)
         if self.fitter.p_guess is not None:
             line(self.freq_axis[self.indices], array([pg[1] for pg in self.fitter.p_guess]), pl=pl, color="green", linewidth=1.0) #self.voltage_from_frequency(self.qdt._get_coupling(self.frequency)), plotter=pl, color="red")
     return pl
开发者ID:thomasaref,项目名称:TA_software,代码行数:13,代码来源:vna_lyzer.py


示例5: widths_plot

 def widths_plot(self, **kwargs):
     process_kwargs(self, kwargs, pl="widths_{0}_{1}_{2}".format(self.filter_type, self.bgsub_type, self.name))
     pl=scatter(self.freq_axis[self.flat_indices], absolute([fp[0] for fp in self.fit_params]), **kwargs)
     if self.show_quick_fit:
         if self.flux_axis_type=="fq":
             #line(self.freq_axis[self.indices], self.qdt._get_coupling(f=self.frequency[self.indices])/1e9, plotter=pl, color="red")
             line(self.freq_axis[self.indices], self.qdt._get_fFWHM(f=self.frequency[self.indices])[2]/2.0/1e9, plotter=pl, color="red")
         elif self.flux_axis_type=="yoko":
             line(self.freq_axis[self.indices], self.qdt._get_VfFWHM(f=self.frequency[self.indices])[2]/2.0, pl=pl, color="red") #self.voltage_from_frequency(self.qdt._get_coupling(self.frequency)), plotter=pl, color="red")
         else:
             line(self.freq_axis[self.indices], self.qdt._get_fluxfFWHM(f=self.frequency[self.indices])[2]/2.0, pl=pl, color="red") #self.voltage_from_frequency(self.qdt._get_coupling(self.frequency)), plotter=pl, color="red")
         if self.fitter.p_guess is not None:
             line(self.freq_axis[self.flat_indices], array([pg[0] for pg in self.fitter.p_guess]), pl=pl, color="green") #self.voltage_from_frequency(self.qdt._get_coupling(self.frequency)), plotter=pl, color="red")
     return pl
开发者ID:thomasaref,项目名称:TA_software,代码行数:14,代码来源:vna_lyzer.py


示例6: 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)
        qdt.gate_type="constant" #"capacitive"
        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)")
        flux=qdt._get_flux_over_flux0(voltage=data[:,1], offset=a.offset, flux_factor=a.flux_factor)


        pl3=scatter(flux, data[:, 0],  color="red", pl=pl,)
#                    auto_xlim=False, x_min=-3, x_max=3)
        flux=qdt._get_flux_over_flux0(V, offset=a.offset, flux_factor=a.flux_factor)

        line(flux, freq, pl=pl3, xlabel="$\Phi/\Phi_0$ ", ylabel="Frequency (GHz) ", color ="red")
        voltage=linspace(-6,6, 1001)
        flux=qdt._get_flux_over_flux0(voltage=voltage, offset=a.offset, flux_factor=a.flux_factor)

        line(flux, qdt._get_flux_parabola(voltage=voltage, ng=0.0)/1e9, pl=pl, color="green")#.show()
        #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:
        pl.axes.set_xticks(linspace(-1, 1, 3))
        pl.axes.set_yticks(linspace(4, 7, 4))

        return pl3 #[pl1, pl2, pl3, pl4]
开发者ID:thomasaref,项目名称:TA_software,代码行数:43,代码来源:fig4_flux_swp2.py


示例7: lgf_test_plot

    def lgf_test_plot(self, pl="lgf_test", **kwargs):
        """test plot of legendre functions to legendre polynomials using Legendre class"""
        nu_max=30
        v_arr=linspace(-1.0, nu_max, 1000)
        print "start plot"
        pl=line(v_arr, self.Pv(v_arr, 0.0), pl=pl, color="blue", linewidth=0.5, label=r"$P_{\nu}(0)$")
        line(v_arr, self.Pv(v_arr, 0.25), pl=pl, color="red", linewidth=0.5, label=r"$P_{\nu}(0.25)$")
        line(v_arr, self.Pv(v_arr, 0.5), pl=pl, color="green", linewidth=0.5, label=r"$P_{\nu}(0.5)$")
        line(v_arr, self.Pv(v_arr, 0.75), pl=pl, color="purple", linewidth=0.5, label=r"$P_{\nu}(0.75)$")
        print "stop plot"
        if 1:
            for nu in range(nu_max):
                scatter(array([nu]), array([legendre(nu)(0.0)]), pl=pl, color="blue", marker_size=3.0)
                scatter(array([nu]), array([legendre(nu)(0.25)]), pl=pl, color="red", marker_size=3.0)
                scatter(array([nu]), array([legendre(nu)(0.5)]), pl=pl, color="green", marker_size=3.0)
                scatter(array([nu]), array([legendre(nu)(0.75)]), pl=pl, color="purple", marker_size=3.0)

            pl.xlabel=r"$\nu$"
            pl.ylabel=r"$P_{\nu}(x)$"
            pl.legend()
            pl.set_ylim(-0.75, 1.5)
        return pl
开发者ID:thomasaref,项目名称:TA_software,代码行数:22,代码来源:legendre.py


示例8: plot_widths

    def plot_widths(self, plotter=None):
        print "first fit"
        #tstart=time()
        #fq_vec=array([sqrt(f*(f-2*self.qdt._get_Lamb_shift(f=f))) for f in self.frequency])

        #fit_p=self.fano_fit(263, fq_vec)
        #print self.p_guess, fit_p

        #fit=lorentzian(fq_vec, fit_p[1:])
        #pl, pf=line(fq_vec, self.MagAbsFilt_sq[263, :])
        #line(fq_vec, fit, plotter=pl, color="red")
        #pl.show()
        print self.ls_f.shape, self.yoko.shape

        fit_params=self.full_fano_fit(self.fq)
        print (fit_params[1, :]).shape
        pl, pf=scatter(self.frequency[self.indices], absolute(fit_params[1, :]), color="red", label=self.name, plot_name="widths_{}".format(self.name))

        line(self.frequency, self.qdt._get_coupling(self.frequency)+0*1.8e6, plotter=pl)
        return pl
开发者ID:thomasaref,项目名称:TA_software,代码行数:20,代码来源:D0316_S4A1_coupling_midpeak.py


示例9: lgf_plot

def lgf_plot(pl="legendre", **kwargs):
    """test plot of legendre functions compared to legendre polynomials"""
    nu_max=30
    v_arr=linspace(-1.0, nu_max, 1000)
    print "start plot"
    pl=line(v_arr, lgf_arr(v_arr, 0.0), pl=pl, color="blue", linewidth=0.5, label=r"$P_{\nu}(0)$")[0]
    line(v_arr, lgf_arr(v_arr, 0.25, nu_max), pl=pl, color="red", linewidth=0.5, label=r"$P_{\nu}(0.25)$")
    line(v_arr, lgf_arr(v_arr, 0.5, nu_max), pl=pl, color="green", linewidth=0.5, label=r"$P_{\nu}(0.5)$")
    line(v_arr, lgf_arr(v_arr, 0.75, nu_max), pl=pl, color="purple", linewidth=0.5, label=r"$P_{\nu}(0.75)$")
    print "stop plot"
    for nu in range(nu_max):
        scatter(array([nu]), array([legendre(nu)(0.0)]), pl=pl, color="blue")
        scatter(array([nu]), array([legendre(nu)(0.25)]), pl=pl, color="red")
        scatter(array([nu]), array([legendre(nu)(0.5)]), pl=pl, color="green")
        scatter(array([nu]), array([legendre(nu)(0.75)]), pl=pl, color="purple")

    pl.xlabel=r"$\nu$"
    pl.ylabel=r"$P_{\nu}(x)$"
    pl.legend()
    pl.set_ylim(-0.75, 1.5)

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


示例10: phase_ed

            def phase_ed(self):
                return a.frequency[a.indices]/1e9, angle(a.Magcom[:,1]*exp(1j*a.frequency[a.indices]*self.ed))#+a.frequency[0]*self.ed

        a.filter_type="FFT"

        b=ElectricalDelay()
        b.plotter
        pl=colormesh(angle(a.Magcom[a.flat_indices].transpose()*exp(1j*a.frequency[a.flat_indices]*b.ed)))
        a.MagAbsFit
        print a.fitter.fit_params
        #colormesh(-0.5+1.5/6.0*angle([1.0-1.0/(1.0+1.0j*(a.yoko-absolute(fp[1]))/absolute(fp[0])) for n, fp in enumerate(a.fitter.fit_params)]).transpose(), pl=pl)#a.fitter.fit_params[0]))
        #b.show()

        #print diff(a.Phase[0, :])
        from numpy import unwrap
        scatter(unwrap(a.Phase[:,0], discont=3)).show()
        line(diff(a.Phase[:,0])).show()

    #pl=a.magabs_colormesh()#magabs_colormesh3(s3a4_wg)
    #pl=a.hann_ifft_plot()
    #pl=a.ifft_plot()
    #a.filt_compare(a.on_res_ind)
    #filt=filt_prep(601, s3a4_wg.filt_start_ind, s3a4_wg.filt_end_ind)
    #line(filt*0.001, plotter=pl)
    #colormesh(s3a4_wg.MagAbsFilt)#, plotter="magabsfilt_{}".format(self.name))

    pl=a.magabs_colormesh()
    #a.phase_colormesh()#.show()
    a.filter_type="FFT"
    #a.filt.filter_type="FFT"
    pl=a.magabs_colormesh()
开发者ID:thomasaref,项目名称:TA_software,代码行数:31,代码来源:D0514_highfrq1sidelobe.py


示例11: plot_widths

 def plot_widths(self, plotter=None):
     fit_params=self.full_fano_fit()
     scatter(fit_params[0, :], absolute(fit_params[1, :]), color="red", label=self.name, plot_name="widths_{}".format(self.name), plotter=plotter)
开发者ID:priyanka27s,项目名称:TA_software,代码行数:3,代码来源:lyzer.py


示例12: widths_plot

 def widths_plot(self, pl=None):
     scatter(self.frequency[self.indices]/1e9, absolute([fp[0] for fp in self.fit_params]), plotter=pl)
     line(self.frequency/1e9, self.qdt._get_coupling(self.frequency), plotter=pl, color="red")
     return pl
开发者ID:priyanka27s,项目名称:TA_software,代码行数:4,代码来源:lyzer.py


示例13: line

fig_width=7.2
fig_height=5.0

c.save_folder.main_dir="sup_fig2_for_TA88"


if __name__=="__main__":
    nskip=50
    d0527.read_data()
    magfilt88=MagcomFilt88(d0527)
    magabs88=absolute(magfilt88)
    #line(d0527.frequency/1e9, magabs88)

    pl88=scatter(d0527.frequency[::nskip]/1e9, 20.0*log10(magabs88[::nskip])-bg_A4(d0527.frequency[::nskip]),
               facecolor="blue", edgecolor="blue", pl=pl88, nrows=2, ncols=3, nplot=1,
               fig_width=fig_width, fig_height=fig_height, marker_size=10)

    (S11, S12, S13,
     S21, S22, S23,
     S31, S32, S33)=idt88._get_simple_S(f=d0527.frequency)
    S13xS31=S13*S31
    print idt88.Np, idt88.K2
    print idt88.f0
    print d0527.comment
    print -d0527.fridge_atten+d0527.fridge_gain-d0527.rt_atten+d0527.rt_gain-10

    line(d0527.frequency/1e9, 20*log10(absolute(S13xS31))-4, color="red", pl=pl88,
         auto_ylim=False, y_min=-40, y_max=0,
         auto_xlim=False, x_min=4.2, x_max=4.7, xlabel="Frequency (GHz)",
         ylabel="Transmission (dB)", linewidth=1.0,
开发者ID:thomasaref,项目名称:TA_software,代码行数:30,代码来源:sup1_fig2_for_88.py


示例14: argers

        return data
        
        
    #print argers(gamma/2.0)
    gamma_frac=linspace(0.5, 20.0, 1001)
    
    gd=gamma/gamma_frac
    #print array([argers(g)[-1] for g in gd])
    pl1=line(gd*Np/f0*2*pi, array([argers(g)[-1] for g in gd])/f0, pl=pl,
             auto_xlim=False, x_min=0.0, x_max=20.0,
             auto_ylim=False, y_min=0.8, y_max=1.2,
             xlabel="$N_p\Gamma_0/f_0$", ylabel="Frequency ($f_0$)", color="red")    
    pl1=line(gd*Np/f0*2*pi, array([argers(g)[-2] for g in gd])/f0, pl=pl, color="red")
    #pl1=line(gd*Np/f0*2*pi, array([argers(g)[0] for g in gd])/f0, pl=pl)    
    line(array([0.0, 20.0]), array([1.0, 1.0]), color="green", pl=pl)
    scatter(array([1.0, 1.0])*gamma*Np/f0*2*pi, array([4.85, 5.75])/f0, pl=pl, marker_size=3.0)
    #scatter(array([1.0, 1.0, 1.0])*gamma*Np/f0*2*pi, array([5.694, 5.414, 4.784])/f0, pl=pl, marker_size=3.0)

    scatter(array([2.9,]), array([1.0]), pl=pl, marker_size=3.0, facecolor="black", edgecolor="black")

    pl.axes.set_xticks(linspace(0, 20, 5))
    pl.axes.set_yticks(linspace(0.8, 1.2, 5))

#    def coup(G):
#        inner=(1.0/3.0-5.0/(2*pi*9*G))*15
#        if inner<0:
#            return 0.0
#        return sqrt(inner)
#
#    from numpy import sin
#    f0=qdt.f0/1e9
开发者ID:thomasaref,项目名称:TA_software,代码行数:31,代码来源:fig4_flux_swp2.py


示例15: Coil_Lyzer

        #self.filt.N=len(self.frequency)


class Coil_Lyzer(TA88_Lyzer):
    current=Array().tag(unit="V", plot=True, label="Current", sub=True)

a=Coil_Lyzer(read_data=read_data,
        rd_hdf=TA88_Read(main_file="Data_1011/test_coil_setup_overnight.hdf5"))

a.read_data()
#print a.yoko
#print a.current
pf=polyfit(a.yoko, a.current, 3)
print pf
p=poly1d(pf)
pl=scatter(a.yoko, a.current)
line(a.yoko, p(a.yoko), pl=pl)#.show()
#pl=scatter(a.yoko, a.current)
endskip=0
mean_yoko=(a.yoko[1500-endskip:500+endskip:-1]+a.yoko[1500+endskip:2500-endskip]+a.yoko[3500-endskip:2500+endskip:-1]+a.yoko[3500+endskip:4500-endskip])/4.0
mean_current=(a.current[1500-endskip:500+endskip:-1]+a.current[1500+endskip:2500-endskip]+a.current[3500-endskip:2500+endskip:-1]+a.current[3500+endskip:4500-endskip])/4.0

#mean_current=(a.current[1499:501:-1]+a.current[1501:2499]+a.current[3499:2501:-1]+a.current[3501:4499])/4.0
line(a.yoko, a.current-p(a.yoko))#.show()
line(a.yoko)

line(a.yoko[a.yoko<5.9], a.current[a.yoko<5.9]-interp(a.yoko[a.yoko<5.9], mean_yoko, mean_current)).show()

line(a.yoko, a.current-interp(a.yoko, a.yoko[1500:500:-1], a.current[1500:500:-1])).show()
line(a.yoko[a.yoko<5.9], a.current-interp(a.yoko, a.yoko[1500:2500], a.current[1500:2500])).show()
开发者ID:thomasaref,项目名称:TA_software,代码行数:30,代码来源:D1011_coil_check.py


示例16: range

a.end_skip=10
#a.flux_indices=[range(479, 712)] #range(0,41), range(43, 479), range(482, len(a.yoko))]
a.bgsub_type="Complex" #"Abs" #"dB" #"Abs"

a.save_folder.main_dir=a.name

a.frq2_ind=0
a.pwr2_ind=1

a.read_data()
#a.pwr_ind=39
print a.yoko.shape
a.filter_type="None"
#a.magabs_colormesh(fig_width=6.0, fig_height=4.0)#.show()
scatter(absolute(a.MagcomFilt[170, 192, :]))
scatter(absolute(a.MagcomFilt[170, :, 0]))

colormesh(absolute(a.MagcomFilt[260, :, :]))#.show()
a.ifft_plot(fig_width=6.0, fig_height=4.0).show() #, time_axis_type="time",

a.filter_type="FFT"

a.pwr_ind=0
a.magabs_colormesh(pl=str(a.pwr[a.pwr_ind]))#.show()
a.pwr_ind=1
a.magabs_colormesh(pl=str(a.pwr[a.pwr_ind]))
a.pwr_ind=2
a.magabs_colormesh(pl=str(a.pwr[a.pwr_ind]))
#offset=0
a.pwr_ind=3
开发者ID:thomasaref,项目名称:TA_software,代码行数:30,代码来源:D1025_two_tone.py


示例17: line

    d0527.filter_type="None"
    d0527.read_data()
    plbg="fig2_sup"
    plbg=line(d0527.frequency/1e9, 20*log10(absolute(d0527.MagcomData[:, 0]))-bg_A4(d0527.frequency),
            color="cyan", alpha=0.5,
            nrows=2, ncols=2, nplot=1, pl=plbg, fig_width=3.5, fig_height=3.5)#.show()
    #pl=line(a.frequency, 10*log10(absolute(a.MagcomData[:, 1])))#.show()

    #pl=line(a.frequency, a.MagdB)#.show()

    magfilt=MagcomFilt(d0527)
    magabs=absolute(magfilt)
    line(d0527.frequency/1e9, magabs)
    nskip=50
    pl=scatter(d0527.frequency[::nskip]/1e9, 20.0*log10(magabs[::nskip])-bg_A4(d0527.frequency[::nskip]),
               facecolor="red", edgecolor="red", pl=pl, nrows=2, ncols=2, nplot=1,
               fig_width=3.5, fig_height=3.5)
    plbg=scatter(d0527.frequency[::nskip]/1e9, 20.0*log10(magabs[::nskip])-bg_A4(d0527.frequency[::nskip]),
               facecolor="red", edgecolor="red", pl=plbg)

    #idt.Np=56
    #idt.f0=4.46e9 #4.452
    #idt.K2=0.032
    #idt.Np=36.5
    #idt.f0=4.452e9



    (S11, S12, S13,
     S21, S22, S23,
     S31, S32, S33)=idt._get_simple_S(f=d0527.frequency)
开发者ID:thomasaref,项目名称:TA_software,代码行数:31,代码来源:fig2_characterization2.py


示例18: absolute

    pl2=a.magabs_colormesh()
    a.filter_type="Fit"
    a.magabs_colormesh(pl=pl2)
    a.magdB_colormesh(pl=pl1)
    cp=a.center_plot()
    wp=a.widths_plot().show()
    a.pwr_ind=1
    a.filter_type="FFT"
    pl_fft=a.magabs_colormesh()#.show()
    a.bgsub_type="None"
    pl1=a.magdB_colormesh()
    pl2=a.magabs_colormesh()
    a.filter_type="Fit"
    a.magabs_colormesh(pl=pl2)
    a.magdB_colormesh(pl=pl1)
    a.center_plot(pl=cp, color="red")
    a.widths_plot(pl=wp, color="red").show()


    #pl1=colormesh(a.yoko, a.pwr, absolute(a.MagcomData[69, :, :]).transpose(), ylabel="Power (dBm)", xlabel=r"Yoko (V)")#.show()
    pl3=colormesh(a.pwr, a.freq_axis[a.end_skip:-a.end_skip], absolute(a.MagcomFilt[a.end_skip:-a.end_skip, 335, :]),
                  ylabel="Frequency (GHz)", xlabel=r"Power (dBm")#.show()

    pl1=colormesh(a.yoko, a.pwr, absolute(a.MagcomFilt[69, :, :]).transpose(), ylabel="Power (dBm)", xlabel=r"Yoko (V)")#.show()

    pl2=scatter(a.pwr, absolute(absolute(a.MagcomFilt[69, 335, :])-absolute(a.MagcomFilt[69,0, :])), xlabel="Power (dBm)", ylabel=r"$|\Delta S_{21}|$")#.show()

    pls=[pl_raw, pl_ifft, pl_fft, pl1, pl2, pl3]
    #a.save_plots(pls)
    pls[0].show()
开发者ID:thomasaref,项目名称:TA_software,代码行数:30,代码来源:D1118_trans_flux_swp.py


示例19: range

#a.bgsub_type="Complex" #"Abs" #"dB"

a.end_skip=10
#a.flux_indices=[range(479, 712)] #range(0,41), range(43, 479), range(482, len(a.yoko))]
#a.bgsub_type="dB" #"Abs"

a.save_folder.main_dir=a.name

a.read_data()
a.pwr_ind=39
print a.yoko.shape
a.filter_type="None"
a.magabs_colormesh(fig_width=6.0, fig_height=4.0)#.show()

probe_ind=271 #448 #343 #100 #187
pl1=scatter(a.pwr, absolute(a.MagcomFilt[probe_ind, 192, :])) #535
scatter(a.yoko, absolute(a.MagcomFilt[probe_ind, :, 7]))

pl2=colormesh(a.yoko, a.pwr, absolute(a.MagcomFilt[probe_ind, :, :]).transpose(), cmap="nipy_spectral")#.show()
a.ifft_plot(fig_width=6.0, fig_height=4.0)#.show() #, time_axis_type="time",

a.filter_type="FFT"

#a.pwr_ind=10
#a.magabs_colormesh(pl=str(a.pwr[a.pwr_ind]))
#a.pwr_ind=9
#a.magabs_colormesh(pl=str(a.pwr[a.pwr_ind]))
#a.pwr_ind=8
#a.magabs_colormesh(pl=str(a.pwr[a.pwr_ind]))
a.pwr_ind=21
pl3=a.magabs_colormesh(pl="dB"+str(a.pwr[a.pwr_ind])+"dB.jpg", cmap="nipy_spectral")
开发者ID:thomasaref,项目名称:TA_software,代码行数:31,代码来源:D1020_fft_pwr.py


示例20: fq

    [347, 4.107, 2.645, 2.542],
    [426, 4.186, 2.657, 2.528],
    [507, 4.267,  2.659, 2.522]])
    print pts.shape

    def fq(self, volts):
        flux_d_flux0=self.qdt._get_flux_over_flux0(voltage=volts,
                   offset=self.offset, flux_factor=self.flux_factor)
        Ej=self.qdt._get_Ej(Ejmax=self.qdt.Ejmax, flux_over_flux0=flux_d_flux0)
        return self.qdt._get_fq(Ej=Ej, Ec=self.qdt.Ec)



    def ls_f(self, freqs):
        return array([sqrt(f*(f-2*self.qdt._get_Lamb_shift(f=f))) for f in freqs])
    pl=scatter(pts[:, 1], fq(a, pts[:, 2])/1e9)
    scatter(pts[:, 1], fq(a, pts[:, 3])/1e9, pl=pl, color="red")
    line(a.frequency/1e9, a.ls_f/1e9, pl=pl)

    ff=ls_f(a, a.frequency-1.3*a.qdt.Ec/h)+1.3*a.qdt.Ec/h

    line(a.frequency/1e9, ls_f(a, a.frequency)/1e9, pl=pl)

    line(a.frequency/1e9, ff/1e9, pl=pl, color="black")

    def ls_f2(self, volts):
        flux_d_flux0=self.qdt._get_flux_over_flux0(voltage=volts,
                   offset=self.offset, flux_factor=self.flux_factor)
        Ej=self.qdt._get_Ej(Ejmax=self.qdt.Ejmax, flux_over_flux0=flux_d_flux0)

        E0p, E1p, E2p=a.qdt._get_lamb_shifted_transmon_energy_levels(Ej=Ej, n_energy=3)
开发者ID:thomasaref,项目名称:TA_software,代码行数:31,代码来源:D1129_IDT2gate_flux_swp.py



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
Python api.Plotter类代码示例发布时间:2022-05-27
下一篇:
Python api.line函数代码示例发布时间: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