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 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 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 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))
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"][
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"]#[:]