def bg(x):
     return bg_A4(x)
     return interp(x, b.frequency, 20*log10(absolute(b.MagcomData[:, 0])))
Esempio n. 2
0
if __name__ == "__main__":

    #pl.nplot=4
    a.read_data()
    b.read_data()

    #b.filter_type="None"
    #pl_raw=b.magabs_colormesh()
    #pl_ifft=b.ifft_plot()#.show()

    b.filter_type = "FFT"

    pl = Plotter(name="pwr_sat", nrows=2, ncols=2)
    onres = (20 * log10(absolute(b.MagcomFilt[69, :, :])).transpose() -
             bg_A4(b.freq_axis[69] * 1e9)).transpose()

    pl, pf = colormesh(b.flux_axis,
                       b.pwr - 30 - 60,
                       10**(onres / 20.0).transpose(),
                       ylabel="Power (dBm) ",
                       xlabel=r"$\Phi/\Phi_0$",
                       auto_xlim=False,
                       x_min=0.35,
                       x_max=0.5,
                       auto_ylim=False,
                       y_min=-30 - 90,
                       y_max=10 - 90,
                       nrows=2,
                       ncols=2,
                       nplot=1,
Esempio n. 3
0
pl88="fig2_TA88"

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)",
Esempio n. 4
0
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
Esempio n. 5
0
d.filt.halfwidth=30
d.fitter.fit_type="lorentzian"
d.fitter.gamma=0.055 #0.01
d.flux_axis_type="flux" #"fq" #"flux"
d.end_skip=10
d.filter_type="FFT"



if __name__=="__main__":
    pl="fig2"

    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)
Esempio n. 6
0
c.save_folder.main_dir = "sup2_filtering"

if __name__ == "__main__":
    nskip = 50

    d0527.filter_type = "None"
    d0527.read_data()
    d0317.read_data()

    magfilt88 = MagcomFilt88(d0527)
    magabs88 = absolute(magfilt88)

    plbg = "fig2_sup"
    plbg = line(d0527.frequency / 1e9,
                20 * log10(absolute(d0527.MagcomData[:, 0])) -
                bg_A4(d0527.frequency),
                color="green",
                alpha=1.0,
                linewidth=0.5,
                nrows=2,
                ncols=3,
                nplot=1,
                pl=plbg,
                fig_width=fig_width,
                fig_height=fig_height)  #.show()

    plbg.nplot = 2
    line(d0527.frequency / 1e9,
         20 * log10(absolute(d0527.MagcomData[:, 0])) - bg_A4(d0527.frequency),
         color="green",
         pl=plbg)  #.show()
d1118.pwr_ind=1

fig_width=7.2
fig_height=2.5



if __name__=="__main__":
    pl="fig2"

    nskip=50

    magfilt=MagcomFilt(d1122)
    magabs=absolute(magfilt)

    pl=scatter(d1122.frequency[::nskip]/1e9, 20.0*log10(magabs[::nskip])-bg_A4(d1122.frequency[::nskip]),
               facecolor="blue", edgecolor="blue", pl=pl, nrows=1, ncols=3, nplot=1,
               fig_width=fig_width, fig_height=fig_height, marker_size=10)
    
    #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=d1122.frequency)
Esempio n. 8
0
                    ylabel="Power (dBm)",
                    xlabel=r"$\Phi/\Phi_0$",
                    auto_xlim=False,
                    x_min=0.35,
                    x_max=0.5,
                    pl="TA53_pwr")
    #a.save_plots([pl1])
    #pl1.show()
    pl2 = scatter(a.pwr,
                  absolute(
                      absolute(a.MagcomFilt[69, 635, :]) -
                      absolute(a.MagcomFilt[69, 0, :])),
                  xlabel="Power (dBm)",
                  ylabel=r"$|\Delta S_{21}|$")  #.show()

    onres = 20 * log10(absolute(a.MagcomFilt[69, 635, :])) - bg_A4(
        a.frequency[69])
    offres = 20 * log10(absolute(a.MagcomFilt[69, 0, :])) - bg_A4(
        a.frequency[69])
    scatter(a.pwr - 30 - 60, absolute(onres - offres))
    #scatter(b.pwr-30-60, 10**(absolute(onres-offres)/20.0))
    scatter(a.pwr - 30 - 60,
            absolute(10**(onres / 20.0) - 10**(offres / 20.0)))
    #scatter(b.pwr-30-60, absolute(10**(onres/20.0)))

    if 1:
        pl = colormesh(qdt.phi_arr / pi,
                       qdt.pwr_arr - qdt.atten,
                       absolute(qdt.fexpt2),
                       cmap="RdBu_r")
        lp = line(qdt.pwr_arr - qdt.atten,
                  0.12 * absolute(qdt.fexpt2[:, 300 / 10]))
Esempio n. 9
0
 def bg(x):
     return bg_A4(x)
     return interp(x, b.frequency, 20 * log10(absolute(b.MagcomData[:, 0])))
Esempio n. 10
0
c.save_folder.main_dir="sup2_filtering"



if __name__=="__main__":
    nskip=50

    d0527.filter_type="None"
    d0527.read_data()
    d0317.read_data()

    magfilt88=MagcomFilt88(d0527)
    magabs88=absolute(magfilt88)

    plbg="fig2_sup"
    plbg=line(d0527.frequency/1e9, 20*log10(absolute(d0527.MagcomData[:, 0]))-bg_A4(d0527.frequency),
            color="green", alpha=1.0, linewidth=0.5,
            nrows=2, ncols=3, nplot=1, pl=plbg, fig_width=fig_width, fig_height=fig_height)#.show()


    plbg.nplot=2
    line(d0527.frequency/1e9, 20*log10(absolute(d0527.MagcomData[:, 0]))-bg_A4(d0527.frequency),
            color="green", pl=plbg)#.show()
            
            
    plbg.nplot=1
    line(d0527.frequency[::nskip]/1e9, 20.0*log10(magabs88[::nskip])-bg_A4(d0527.frequency[::nskip]),
               color="blue",
               #facecolor="red", edgecolor="red",
               pl=plbg)
    plbg.nplot=2
Esempio n. 11
0
if __name__=="__main__":

    
    #pl.nplot=4
    a.read_data()
    b.read_data()

    #b.filter_type="None"
    #pl_raw=b.magabs_colormesh()
    #pl_ifft=b.ifft_plot()#.show()

    b.filter_type="FFT"

    pl=Plotter(name="pwr_sat", nrows=2, ncols=2)
    onres=(20*log10(absolute(b.MagcomFilt[69, :, :])).transpose()-bg_A4(b.freq_axis[69]*1e9)).transpose()
    
    pl, pf=colormesh(b.flux_axis, b.pwr-30-60, 10**(onres/20.0).transpose(), 
                  ylabel="Power (dBm) ", xlabel=r"$\Phi/\Phi_0$",
                  auto_xlim=False, x_min=0.35, x_max=0.5, 
                  auto_ylim=False, y_min=-30-90, y_max=10-90, nrows=2, ncols=2, nplot=1, pl=pl, pf_too=True, fig_width=fig_width, fig_height=fig_height)

    ax=pl.axes
    ax.set_yticks(linspace(-30.0-90, 10.0-90, 3))
    ax.set_xticks(linspace(0.38, 0.48, 3))
    
    #b.pwr, b.freq_axis[a.end_skip:-b.end_skip], 10**(onres/20.0), #absolute(a.MagcomFilt[a.end_skip:-a.end_skip, 635, :]),
    #              ylabel="Frequency (GHz)", xlabel=r"Power (dBm")#.show()
    pl.nplot=2
    onres=20*log10(absolute(b.MagcomFilt[69, 635, :]))-bg_A4(b.frequency[69])
    offres=20*log10(absolute(b.MagcomFilt[69, 0, :]))-bg_A4(b.frequency[69])