def cm_refl_lowfrq_parabola(pwi):
    pcolormesh(yoko, freq, absolute(Magabs[:, :, pwi]))   
    plot(yoko, flux_parabola(flux_rescale(yoko, offset=-0.02)), "w", linewidth=3, alpha=0.5, )
    ylim(amin(freq), amax(freq))
    title("Flux map at reflection {pwr} dBm".format(pwr=pwr[pwi]))
    xlabel("Flux (V)")
    ylabel("Reflection")
def VNA_twotonesat():
    powsat = mean(dB(Magcom[0, :, 19:31]), axis=1)
    print shape(pwr2)
    print pwr2[:, 0]

    print yoko2[0, :]
    print shape(yoko2)

    fridge_att = 87.0 + 15.0 * 0.0
    pwrlin = 0.001 * 10.0**((pwr2[:, 0] - fridge_att) / 10.0)
    powsat_theory = lorentzian(flux_parabola(flux_rescale(yoko2[0, :])),
                               4.285e9, pwrlin, 50.0e6)
    print shape(powsat_theory)

    plot(pwr2[:, 0] - fridge_att,
         normalize(absolute(powsat_theory[:, 56])),
         label="Theory 50 MHz coupling")
    plot(pwr2[:, 0] - fridge_att, normalize(powsat),
         label="Data")  #mean(dB(Magcom[0, :, 19:31]), axis=1))

    xlabel("Control power (dBm)")
    ylabel("Reflection (normalized)")
    title(
        "Reflection (normalized) Probe at 4.403 GHz, -137 dBm, \n Control at 4.285  GHz"
    )
    legend(loc=3)
def cs_refl_lowfrq(fqi, pwi):    
    plot(yoko, normalize(absolute(Magabs[fqi, :, pwi])))
    RR=lorentzian(flux_parabola(flux_rescale(yoko, offset=-0.02)), freq[fqi], [pwrlin], g)
        #RR=1/(1-1j*detuning(yoko*0.195)/(2.0*pi*10.0e6))
    plot(yoko, normalize(absolute(RR)), label="50 MHz {}".format(g))
    title("Cross section reflection (normalized) \n at {frq:.3f} GHz and {pwr} dBm".format(frq=freq[fqi]/1.0e9, pwr=pwr[pwi]))
    xlabel("Flux (V)")
    ylabel("Reflection (normalized)")
def cs_gate_bgsub(fqi, pwi):
    plot(yoko, absolute(Magabs[fqi, pwi, :])/amax(absolute(Magabs[fqi, pwi, :])))
    g=10.0e-6
    RR=lorentzian(flux_parabola(flux_rescale(yoko)), freq[fqi], [0.0], g)
    #RR=1/(1-1j*detuning(yoko*0.195)/(2.0*pi*10.0e6))
    #plot(yoko, absolute(RR)/amax(absolute(RR)), label="50 MHz {}".format(g))
    xlabel("Flux (V)")
    ylabel("Gate response normalized")
    title("Gate cross section")
def refl_fluxmap():
    pcolormesh(yoko, freq, Magabs, vmin=0.0, vmax=0.0045 )
    plot(yoko, flux_parabola(flux_rescale(yoko)), "w", alpha=0.5)
    ylim(amin(freq), amax(freq))
    xlabel("Flux (V)")
    ylabel("Frequency (Hz)")
    title("Gate response fluxmap, at {} dBm".format(-87*0-20*0+pwr[powind]))
    colorbar()
    return file_name
def cs_abs(fqi, pwi):
    plot(yoko, normalize(absolute(Magabs[fqi, pwi, :])))
    locpwr=pwr[pwi]-fridge_attn-extra_attn
    pwrlin=0.001*10.0**((locpwr)/10.0)
    RR=lorentzian(flux_parabola(flux_rescale(yoko, offset=-0.01)), freq[fqi], [pwrlin], g)
        #RR=1/(1-1j*detuning(yoko*0.195)/(2.0*pi*10.0e6))
    plot(yoko, normalize(absolute(RR)), label="50 MHz {}".format(g))
    title("Cross section reflection (normalized) \n at {frq:.3f} GHz and {pwr} dBm".format(frq=freq[fqi]/1.0e9, pwr=locpwr))
    xlabel("Flux (V)")
    ylabel("Reflection (normalized)")
示例#7
0
def cs_abs(fqi, pwi):
    plot(yoko, normalize(absolute(Magabs[fqi, pwi, :])))
    locpwr = pwr[pwi] - fridge_attn - extra_attn
    pwrlin = 0.001 * 10.0**((locpwr) / 10.0)
    RR = lorentzian(flux_parabola(flux_rescale(yoko, offset=-0.01)), freq[fqi],
                    [pwrlin], g)
    #RR=1/(1-1j*detuning(yoko*0.195)/(2.0*pi*10.0e6))
    plot(yoko, normalize(absolute(RR)), label="50 MHz {}".format(g))
    title(
        "Cross section reflection (normalized) \n at {frq:.3f} GHz and {pwr} dBm"
        .format(frq=freq[fqi] / 1.0e9, pwr=locpwr))
    xlabel("Flux (V)")
    ylabel("Reflection (normalized)")
def VNA_twotonesat():    
    powsat=mean(dB(Magcom[0, :, 19:31]), axis=1)
    print shape(pwr2)
    print pwr2[:,0]

    print yoko2[0,:]
    print shape(yoko2)

    fridge_att=87.0+15.0*0.0
    pwrlin=0.001*10.0**((pwr2[:,0]-fridge_att)/10.0)
    powsat_theory=lorentzian(flux_parabola(flux_rescale(yoko2[0,:])), 4.285e9, pwrlin, 50.0e6)
    print shape(powsat_theory)


    plot(pwr2[:,0]-fridge_att, normalize(absolute(powsat_theory[:,56])), label="Theory 50 MHz coupling")    
    plot(pwr2[:,0]-fridge_att, normalize(powsat), label="Data")#mean(dB(Magcom[0, :, 19:31]), axis=1))

    xlabel("Control power (dBm)")
    ylabel("Reflection (normalized)")
    title("Reflection (normalized) Probe at 4.403 GHz, -137 dBm, \n Control at 4.285  GHz")    
    legend(loc=3)
def gate_bgsub_colormesh_wparabola(pwi):
    gate_bgsub_colormesh(pwi) 
    plot(yoko, flux_parabola(flux_rescale(yoko)), "w", linewidth=3, alpha=0.5, )
def refl_fluxmap():
    pcolormesh(yoko, freq, Magabs, vmin=0.0, vmax=0.0045 )
    plot(yoko, flux_parabola(flux_rescale(yoko)), "w", alpha=0.5)
    ylim(amin(freq), amax(freq))
    xlabel("Flux (V)")
    ylabel("Frequency (Hz)")
    title("Gate response fluxmap, at {} dBm".format(-87*0-20*0+pwr[powind]))
    colorbar()
    return file_name

if 0:
    freqind=85
    print freq[freqind]
    plot(yoko, transpose(Magabs[freqind, :]/amax(Magabs[freqind,:])))
    reflec=absolute(lorentzian(flux_parabola(flux_rescale(yoko)), freq[freqind], array([2.0e-16]), 10.0e6))
    plot(yoko, reflec/amax(reflec))
    #plot(amax(Magabs[:, :], axis=1)-amin(Magabs, axis=1))
    #xlim(100, 130)
    show()


file_path="/Users/thomasaref/Dropbox/Current stuff/Logbook/TA210715A46_cooldown1/Data_1006/TA46_gate_flux_swp_4p2t4p5GHz.hdf5"

with File(file_path, 'r') as f:
    #print f["Traces"].keys()
    Magvec=f["Traces"]["Rohde&Schwarz Network Analyzer - S12"]
    data=f["Data"]["Data"]
    fstart=f["Traces"]['Rohde&Schwarz Network Analyzer - S12_t0dt'][0][0]
    fstep=f["Traces"]['Rohde&Schwarz Network Analyzer - S12_t0dt'][0][1]
    sm=shape(Magvec)[0]
def cs_refl_lowfrq_dB(fqi, pwi):    
    fqi=103
    plot(yoko, normalize(dB(Magabs[fqi, :, pwi])))
    RR=lorentzian(flux_parabola(flux_rescale(yoko, offset=-0.07)), freq[fqi], [0*pwrlin], g)
        #RR=1/(1-1j*detuning(yoko*0.195)/(2.0*pi*10.0e6))
    plot(yoko, normalize(absolute(RR)), label="50 MHz {}".format(g))
    plot(yoko, normalize(absolute(RR)), label="50 MHz {}".format(g))
    title("Cross section reflection (normalized) \n at {frq:.3f} GHz and {pwr} dBm".format(frq=freq[fqi]/1.0e9, pwr=pwr[pwi]))
    xlabel("Flux (V)")
    ylabel("Reflection (normalized)")

def cs_refl_lowfrq_dB(fqi, pwi):    
    fqi=103
    plot(yoko, normalize(dB(Magabs[fqi, :, pwi])))
    RR=lorentzian(flux_parabola(flux_rescale(yoko, offset=-0.07)), freq[fqi], [0*pwrlin], g)
        #RR=1/(1-1j*detuning(yoko*0.195)/(2.0*pi*10.0e6))
    plot(yoko, normalize(absolute(RR)), label="50 MHz {}".format(g))
        
if 0:
    show()
    
    pcolormesh(yoko, freq, absolute(lorentzsweep(flux_parabola(flux_rescale(yoko, offset=-0.07)), freq, [pwrlin], g)))
    plot(yoko, flux_parabola(flux_rescale(yoko, offset=-0.07)), "w", linewidth=3, alpha=0.5, )
    ylim(amin(freq), amax(freq))
    
    show()

if 0:
    pcolormesh(normalize_1d(absolute(Magabs[:, :, powind])))
    show() 

if 0:
    pcolormesh(absolute(Magabs[:, :, powind]))   
    show() 

def cm_refl_lowfrq(pwi):
    pcolormesh(yoko, freq, absolute(Magabs[:, :, pwi]))   
示例#13
0
        lvlcorr = data[:, 1, :]
        PXIIQ = data[:, 2, :] + 1j * data[:, 3, :]
        print PXIIQ.dtype  #=PXIIQ.astype(float)
        print shape(PXIIQ)

    plot(absolute(absolute(PXIIQ) - 0.02760) / 0.000319)
    #plot(lvlcorr)
    print shape(yoko)
    yoko = squeeze(yoko)
    fridge_att = 87.0 + 5.0
    pwr = array([-50.0])
    pwrlin = 0.001 * 10.0**((pwr - fridge_att) / 10.0)
    plot(
        normalize(
            absolute(
                lorentzian(flux_parabola(flux_rescale(yoko, offset=0.06)),
                           4.285e9, pwrlin, 50.0e6))))
    show()

file_path = "/Users/thomasaref/Dropbox/Current stuff/Logbook/TA210715A46_cooldown1/Data_1010/TA46_VNA_refl_twotone_powsat.hdf5"

with File(file_path, 'r') as f:
    print f["Traces"].keys()
    print f.attrs["comment"]
    print f["Instrument config"].keys()
    ctl_frq = f["Instrument config"][
        'PXI Aeroflex 302x Signal Generator - GPIB: PXI3::13::INSTR, PXI SigGen at localhost'].attrs[
            "Frequency"]  #["Power"]
    probe_frq = f["Instrument config"][
        'Rohde&Schwarz Network Analyzer - IP: 169.254.107.192,  at localhost'].attrs[
            "Start frequency"]
        print shape(data[:])
        #pwr=data[:,0,:]
        yoko=data[:,0,:].astype(float64)
        lvlcorr=data[:,1,:]
        PXIIQ=data[:,2,:]+1j*data[:,3,:]
        print PXIIQ.dtype #=PXIIQ.astype(float)
        print shape(PXIIQ)

    plot(absolute(absolute(PXIIQ)-0.02760)/0.000319)
    #plot(lvlcorr)    
    print shape(yoko)
    yoko=squeeze(yoko)
    fridge_att=87.0+5.0
    pwr=array([-50.0])
    pwrlin=0.001*10.0**((pwr-fridge_att)/10.0)
    plot(normalize(absolute(lorentzian(flux_parabola(flux_rescale(yoko, offset=0.06)), 4.285e9, pwrlin, 50.0e6))))
    show()

file_path="/Users/thomasaref/Dropbox/Current stuff/Logbook/TA210715A46_cooldown1/Data_1010/TA46_VNA_refl_twotone_powsat.hdf5"

with File(file_path, 'r') as f:
    print f["Traces"].keys()
    print f.attrs["comment"]
    print f["Instrument config"].keys()
    ctl_frq=f["Instrument config"]['PXI Aeroflex 302x Signal Generator - GPIB: PXI3::13::INSTR, PXI SigGen at localhost'].attrs["Frequency"] #["Power"]
    probe_frq=f["Instrument config"]['Rohde&Schwarz Network Analyzer - IP: 169.254.107.192,  at localhost'].attrs["Start frequency"]
    probe_pwr=f["Instrument config"]['Rohde&Schwarz Network Analyzer - IP: 169.254.107.192,  at localhost'].attrs["Output power"]

    print probe_frq, probe_pwr, ctl_frq        
    print f["Data"]["Channel names"][:]
    Magvec=f["Traces"]["Rohde&Schwarz Network Analyzer - S12"]#[:]