Esempio n. 1
0
#FFT filtering not yet working, possibly BW not large enough
#D1 4670MHZ Edge (4.8GHz) LO above
#D2 4330MHz Edge (4.1GHz) LO below
D1 = AfDig(adressDigi='3036D1', adressLo='3011D1', LoPosAB=1, LoRef=0,
           name='D1 Lags (sec)', cfreq=f1, inputlvl=-2,
           start=(-lags / BW), stop=(lags / BW), pt=(lags * 2 - 1),
           nSample=lsamples, sampFreq=BW)

D2 = AfDig(adressDigi='3036D2', adressLo='3010D2', LoPosAB=0, LoRef=3,
           name='D2 Lags (sec)', cfreq=f2, inputlvl=-2,
           start=(-lags / BW), stop=(lags / BW), pt=(lags * 2 - 1),
           nSample=lsamples, sampFreq=BW)

# Sweep equipment setup
nothing = dummy('none', name='nothing',
                start=0, stop=1, pt=1,
                sstep=20e-3, stime=0.0)

vBias = sim928c(sim900, name='V 1Mohm', sloti=2,
                start=-0.010, stop=-0.010, pt=1,
                sstep=0.060, stime=0.020)

vMag = sim928c(sim900, name='Magnet V R=22.19KOhm', sloti=3,
               start=-0.85, stop=-0.57, pt=71,
               sstep=0.03, stime=0.020)

pFlux = AnSigGen('GPIB0::17::INSTR', name='FluxPump',
                 start=2.03, stop=0.03, pt=101,
                 sstep=30e-3, stime=1e-3)
#-30 dB at output
                     LoRef=2, name='Signal Gen', start=2e9, stop=6e9, pt=1, 
                     sstep=1e9, stime=0.0)
sgen.set_power(-30)
sgen.output(0)                     
  
pFlux = AnSigGen('GPIB0::17::INSTR', name='FluxPump',
                 start=0.03, stop=0.03, pt=1,
                 sstep=30e-3, stime=1e-3)            
pFlux.set_power_mode(0)  # Log(0)/Linear mode in mV (1)
pFlux.set_frequency(fd)
pFlux.sweep_par = 'power'  # Power sweep
pFlux.set_power(-50)
pFlux.output(0)  # Power OFF (0)/ On (1)
# -20 dB at output
                   
dummyD1D2 = dummy('prober', name='Probe frequency', start=4.5e9, stop=5.8e9, pt=391, sstep=6e9, stime=0.0)
dummyD1D2.D1 = D1
dummyD1D2.D2 = D2
dummyD1D2.sgen = pFlux
dummyD1D2.sweep_par = 'f11'


vBias = sim928c(sim900, name='V 1Mohm', sloti=4,
                start=-20.0+0.0017, stop=20.0017, pt=9,
                sstep=0.200, stime=0.025)
vBias.set_volt(0.0)
vBias.output(1)


vMag = sim928c(sim900, name='Magnet V R=22.19KOhm', sloti=3,
               start=-2.6, stop=-2.6, pt=1,
                 sstep=10, stime=0)

#D12spacing = dummy(name='D1-f',
#                start=5.4e9, stop=3.5e9, pt=1,
#                sstep=4e9, stime=0.0)

vBias = sim928c(sim900, name='V 1Mohm', sloti=4,
                start=0.0, stop=0.0, pt=1,
                sstep=0.060, stime=0.020)

vMag = sim928c(sim900, name='Magnet V R=22.19KOhm', sloti=3,
               start=-1.09, stop=-1.09, pt=1,
               sstep=0.03, stime=0.020)

nothing = dummy(name='nothing',
                start=0, stop=1, pt=1,
                sstep=1.0, stime=0.0)


pFlux.set_power_mode(1)  # Linear mode in mV
pFlux.set_freq(f1+f2)
pFlux.sweep_par='power'  # Power sweep
# D12spacing.D1 = D1  # assign objects (in reverse D1 f > D2 f)
# D12spacing.D2 = D2
# D12spacing.sweep_par = 'f12'
# D12spacing.cfreq = f1+f2
# sweep_dim_1(vBias, 0.002)

dim_1 = pFlux
dim_1.UD = False
dim_1.defval = 0.001
iBias = yoko('GPIB0::13::INSTR',
           name = 'Yoko V R=14.8KOhm',
           start = 90e-3, 
           stop = -90e-3, 
           pt = 1801 ) #'Yoko V' 
iBias.prepare_v(vrange = 3)  # vrange =2 -- 10mV, 3 -- 100mV, 4 -- 1V, 5 -- 10V, 6 -- 30V

vMag = yoko('GPIB0::10::INSTR',
            name = 'Magnet V R=2.19KOhm',
            start = -0.5, 
            stop = 0.5, 
            pt = 401) #'Yoko M' 
vMag.prepare_v(vrange = 4)

dim_3 = dummy(name = 'Nothing',
                start = 0,
                stop = 0,
                pt = 1)

dim_1= iBias
dim_2= vMag
def sweep_dim_1(dim_1,value):
     ramp(dim_1, 'v', value, 0.001, 0.0001)
def sweep_dim_2(dim_3,value):
     ramp(dim_3, 'v', value, 0.01, 0.01)
def sweep_dim_3(dim_2,value):
     pass

     
vm.prepare_data_save(folder, filen_0, dim_1, dim_2, dim_3)
#vm.ask_overwrite()
copy_file(thisfile, filen_0, folder) #backup this script
           sstep = 5e-3, #def step and step/wait-time in sec for ramping
           stime = 1e-3) 
iBias.prepare_v(vrange = 3)  # vrange =2 -- 10mV, 3 -- 100mV, 4 -- 1V, 5 -- 10V, 6 -- 30V

vMag = yoko('GPIB0::10::INSTR',
            name = 'Magnet V R=2.19KOhm',
            start = -0.5, 
            stop = +0.5, 
            pt = 101,
            sstep = 20e-3,
            stime = 1e-3) #'Yoko M' 
vMag.prepare_v(vrange = 4)

PSG = dummy('GPIB0::18::INSTR',
           name = 'Nothing',
           start = 300e-3,
           stop = -1e-3,
           pt = 1)
#PSG.set_powUnit('V')
#PSG.set_freq(1e9) #gives 2 uV steps
#PSG.set_output(1)

#define what is to be swept i.e. get_v(..) /set_v(..) would be 'v'
iBias.sweep_par = 'v' 
vMag.sweep_par = 'v'
#PSG.sweep_par = 'power'

dim_1= iBias
def sweep_dim_1(obj,value):
    obj.sweep_v(value, 2)
    sleep(2.1)
iBias.prepare_i(vrange = 4)  #  vrange =4 -- 1mA, 5 -- 10mA, 6 -- 100mA
iBias.UD = True

vMag = yoko('GPIB0::10::INSTR',
            name = 'Magnet V R=2.19KOhm',
            start = -600e-3,
            stop = 600e-3,
            pt = 401,
            sstep = 10e-3,
            stime = 1e-6)
vMag.prepare_v(vrange = 4)

PSG = dummy('GPIB0::11::INSTR',
           name = 'none',
           start = 0,
           stop = 1,
           pt = 1,
           sstep = 20e-3,
           stime = 1e-3)

iBias.sweep_par = 'iv'
vMag.sweep_par = 'iv'

dim_1= iBias
def sweep_dim_1(obj, value):
    ramp(obj, obj.sweep_par, value, obj.sstep, obj.stime)
    #obj.sweep_iv(value, 5)
    #sleep(5.1)

dim_2= vMag
def sweep_dim_2(obj, value):
iBias.prepare_v(vrange = 6)  # vrange =2 -- 10mV, 3 -- 100mV, 4 -- 1V, 5 -- 10V, 6 -- 30V

vMag = yoko('GPIB0::10::INSTR',
            name = 'Magnet V R=2.19KOhm',
            start = -280e-3,
            stop = -190e-3,
            pt = 20,
            sstep = 5e-3,
            stime = 1e-6) #'Yoko M'
vMag.prepare_v(vrange = 4)

# PSG = APSG('GPIB0::11::INSTR',
PSG = dummy('GPIB0::11::INSTR',
           name = 'RF - Power (V)',
           start = 0,
           stop = 0,
           pt = 1,
           sstep = 20e-3,
           stime = 1e-3)

# PSG.set_powUnit('V')
# PSG.set_freq(11.7e9)  # 1GHz gives 2 uV steps
# PSG.set_output(1)

#define what is to be swept i.e. get_v(..) /set_v(..) would be 'v'
iBias.sweep_par = 'v'
vMag.sweep_par = 'v'
# PSG.sweep_par = 'power'

dim_1= iBias
def sweep_dim_1(obj,value):
if not os.path.exists(folder):
    os.makedirs(folder)


sim900 = sim900c('GPIB0::12::INSTR')
vm = key2000('GPIB0::29::INSTR')


f1 = 4.8e9
f2 = 4.1e9



# Sweep equipment setup
nothing = dummy('none', name='nothing',
                start=0, stop=1, pt=1,
                sstep=20e-3, stime=0.0)

vBias = sim928c(sim900, name='V 1Mohm', sloti=4,
                start=(-6 +0.002), stop=6.002, pt=301,
                sstep=0.060, stime=0.020)

#vMag = dummy(sim900, name='Magnet V R=22.19KOhm', sloti=3,
#               start=-0.0, stop=0.0, pt=351,
#               sstep=0.03, stime=0.020)

pFlux = dummy('GPIB0::8::INSTR', name='FluxPump',
                 start=0.00, stop=0.00, pt=1,
                 sstep=10, stime=0)
#-30 dB at output
    adressDigi="3036D2",
    adressLo="3010D2",
    LoPosAB=0,
    LoRef=3,
    name="D2 Lags (sec)",
    cfreq=f2,
    inputlvl=-2,
    start=(-lags / BW),
    stop=(lags / BW),
    pt=(lags * 2 - 1),
    nSample=lsamples,
    sampFreq=BW,
)

# Sweep equipment setup
nothing = dummy("none", name="nothing", start=0, stop=1, pt=1, sstep=20e-3, stime=0.0)

vBias = sim928c(sim900, name="V 1Mohm", sloti=2, start=-20.0, stop=20.0, pt=201, sstep=0.060, stime=0.020)

vMag = sim928c(sim900, name="Magnet V R=22.19KOhm", sloti=3, start=-0.85, stop=-0.57, pt=5, sstep=0.03, stime=0.020)

pFlux = AnSigGen("GPIB0::17::INSTR", name="FluxPump", start=0.03, stop=0.03, pt=1, sstep=30e-3, stime=1e-3)
# -30 dB at output

sgen = None

pFlux.set_power_mode(1)  # Linear mode in mV
# f1+f2
pFlux.set_freq(f1 + f2)
pFlux.sweep_par = "power"  # Power sweep
# FFT filtering not yet working, possibly BW not large enough
# D1 4670MHZ Edge (4.8GHz) LO above
# D2 4330MHz Edge (4.1GHz) LO below
D1 = AfDig(adressDigi='3036D1', adressLo='3011D1', LoPosAB=1, LoRef=0,
           name='D1 Lags (sec)', cfreq=f1, inputlvl=-20,
           start=(-lags / BW), stop=(lags / BW), pt=(lags * 2 - 1),
           nSample=lsamples, sampFreq=BW)

D2 = AfDig(adressDigi='3036D2', adressLo='3010D2', LoPosAB=0, LoRef=3,
           name='D2 Lags (sec)', cfreq=f2, inputlvl=-15,
           start=(-lags / BW), stop=(lags / BW), pt=(lags * 2 - 1),
           nSample=lsamples, sampFreq=BW)

# Sweep equipment setup
Dfreq = dummy('DigiFreq', name='Frequency',
                start=4e9, stop=6.0e9, pt=201,
                sstep=10e9, stime=0.0)

vBias = sim928c(sim900, name='V 1Mohm', sloti=4, 
                start=0.0, stop=0.0, pt=1, 
                sstep=0.060, stime=0.020)

vMag = sim928c(sim900, name='Magnet V R=22.19KOhm', sloti=3,
               start=-1.1, stop=-1.1, pt=1,
               sstep=0.03, stime=0.020)

pFlux = AnSigGen('GPIB0::8::INSTR', name='FluxPump',
                 start=0.024, stop=0.00, pt=49,
                 sstep=30e-3, stime=0.0)
# -30 dB at output
                     LoRef=2, name='Signal Gen', start=2e9, stop=6e9, pt=1, 
                     sstep=1e9, stime=0.0)
sgen.set_power(-30)
sgen.output(0)                     
  
pFlux = AnSigGen('GPIB0::17::INSTR', name='FluxPump',
                 start=0.03, stop=1.5, pt=151,
                 sstep=300e-3, stime=1e-3)            
pFlux.set_power_mode(1)  # Log(0)/Linear mode in mV (1)
pFlux.set_frequency(fd)
pFlux.sweep_par = 'power'  # Power sweep
pFlux.set_power(0.03)
pFlux.output(0)  # Power OFF (0)/ On (1)
# -20 dB at output
                   
dummyD1D2 = dummy('prober', name='Drive frequency', start=8.5e9, stop=15.5e9, pt=351, sstep=6e9, stime=0.0)
dummyD1D2.D1 = D1
dummyD1D2.D2 = D2
dummyD1D2.pFlux = pFlux
dummyD1D2.sweep_par = 'pfreq'


vBias = sim928c(sim900, name='V 1Mohm', sloti=4,
                start=0.0017, stop=0.0017, pt=1,
                sstep=0.200, stime=0.025)
vBias.set_volt(0.0)
vBias.output(1)


vMag = sim928c(sim900, name='Magnet V R=22.19KOhm', sloti=3,
               start=0.03, stop=0.03, pt=1,
PSG.set_powUnit('V')
# PSG.set_freq(12.9e9)  # 1GHz gives 2uV steps
# PSG.set_freq(12.2e9)
PSG.set_freq(8.9e9)
PSG.set_output(1)
PSG.set_power(PSG.start)

iBias.sweep_par = 'v'
vMag.sweep_par = 'v'


nothing = dummy('GPIB0::11::INSTR',
           name = 'nothing',
           start = 0,
           stop = 0,
           pt = 1,
           sstep = 20e-3,
           stime = 1e-3)

# dim_2 = vMag

dim_1 = PSG
dim_2= iBias
dim_3 = nothing
dim_1.UD = False

def sweep_dim_1(obj,index):
    # value = obj.lin[int(index)]
    if index == 0 :  # check for even number
        PSG.set_output(1)