コード例 #1
0

Vglist = np.linspace(Vgmax, Vgmin, (Vgmax-Vgmin)/deltaVg+1)
Vg_ini = Vglist[0]
END = False
total_count = Vglist.shape[0]
resistance_array = np.array([])
applied_gate_array = np.array([])
I_leakage_array = np.array([])


##Inititalizing the devices
ivvi = IVVI_DAC(addr='COM5', verb=True)
ivvi.RampAllZero(tt=2.)

vmeas = stlab.adi(addr='TCPIP::192.168.1.105::INSTR') #for measuring the voltage accross the sample
v_gateleakage = stlab.adi(addr='TCPIP::192.168.1.162::INSTR') #for measuring the leakage current

## Estimating for the internal resistances
print ('#### Calibration for the internal resistances ####')
input ('Short the S3b_output and M1b_input (pin #4), Press Enter to continue...')

ivvi.RampVoltage(S3b_dac,V_bias/S3b_range*1e3,tt=0.5, steps = 5) ##ramping this voltage in 20seconds
I_cal_p = float(vmeas.query('READ?')) / M1b_total_gain

ivvi.RampVoltage(S3b_dac,-V_bias/S3b_range*1e3,tt=1, steps = 5) ##ramping this voltage in 20seconds
I_cal_n = float(vmeas.query('READ?')) / M1b_total_gain

R_cal = 2*V_bias/(I_cal_p-I_cal_n)

print ('V_bias:',V_bias)
コード例 #2
0
myfile = stlab.newfile(prefix, idstring, colnames, autoindex=True)


Vglist = np.linspace(Vgmax, Vgmin, (Vgmax-Vgmin)/deltaVg+1)

if Vgmax ==Vgmin == 0:
    gate_it =False
else: 
    gate_it =True


if gate_it: 
    ##Inititalizing the devices
    ivvi = IVVI_DAC(addr='COM5', verb=True)
    ivvi.RampAllZero(tt=2., steps = 20)
    v_gateleakage = stlab.adi(addr='TCPIP::192.168.1.162::INSTR') #for measuring the leakage current


Vg_ini = Vglist[0]

V_bias_list = np.linspace(V_bias_max, V_bias_min, (V_bias_max-V_bias_min)/delta_V_bias+1)

END = False

plt.rcParams["figure.figsize"] = [16,9] 
plt.title(prefix)
plt.ylabel('current [nA]')
plt.xlabel('bias Voltage [$\mu$V]')
plt.xlim(V_bias_min*1e6,V_bias_max*1e6)
palette = plt.get_cmap('Set1') # create a color palette
コード例 #3
0
(daq, device, props) = zhinst.utils.create_api_session(device_id, apilevel_example, required_devtype='.*LI|.*IA|.*IS')
zhinst.utils.api_server_version_check(daq)
zhinst.utils.disable_everything(daq, device)
out_mixer_channel = zhinst.utils.default_output_mixer_channel(props)


## Temperature readout
mytriton = TritonWrapper()


# resetting the IVVI
dev = IVVI_DAC('COM5') # IVVI
dev.RampAllZero()

# initializing the Keithley for gate current measurement
vmeasure = stlab.adi('TCPIP::192.168.1.161::INSTR',read_termination='\n') # with Keithley DMM6500
# vmeasure=stlab.adi("ASRL1::INSTR") #with Keithley 2000

vmeasure.write('SENS:VOLT:DC:RANG:AUTO 0')
vmeasure.write('SENS:VOLT:DC:RANGE 2')
vmeasure.write(':INIT:CONT 0')
vmeasure.write('VOLT:NPLC 1')
vmeasure.write('TRIG:SOUR IMM')
vmeasure.write(":SYST:AZER:STAT OFF")
vmeasure.write(":TRIG:COUN 1")
gate_leakage_v_I_conversion = 1e-6 # conversion factor of the measured voltage on S1h 'Current monitor' to leakage current



#############################################################
''' MEASUREMENT'''
        'size': 16,
        }

##########################################################
''' Initializing the devices '''

# Keysight setting
gate_dev = Keysight_B2901A('TCPIP::192.168.1.63::INSTR')
gate_dev.SetModeVoltage()
gate_dev.SetComplianceCurrent(safe_gate_current)
gate_dev.SetOutputOn()



# initializing the ZND
VNA = stlab.adi(addr='TCPIP::192.168.1.230::INSTR',reset=False) # this is FieldFox
# VNA.write('INST:SEL "NA"')  #set mode to Network Analyzer
# if measure == 'OnePort':
# 	VNA.SinglePort()
# elif measure == 'TwoPort':
# 	VNA.TwoPort()


VNA.write("SENS:SWE:POIN " + str(freq_points))

if averaging > 1:
	VNA.write('SENS:AVER:COUN %d' % averaging)
	# VNA.write('SENS:AVER ON')
	# VNA.write('SENS:AVER:CLEAR')
VNA.SetPower(power)
VNA.SetIFBW(100.)
コード例 #5
0
if S3b_range >= 1e-3:
    coeff = 1e3
    unit = 'm'
else:
    coeff = 1e6
    unit = '$\mu$'

plt.rcParams["figure.figsize"] = [16, 9]
palette = plt.get_cmap('Set1')  # create a color palette

##Inititalizing the devices
ivvi = IVVI_DAC(addr='COM3', verb=True)
ivvi.RampAllZero(tt=2., steps=20)

Imeas = stlab.adi(
    addr='TCPIP::192.168.1.105::INSTR'
)  #for measuring the current converted to Voltage at M0 output

if Vgmax != 0 and measure_gate_leakage:
    v_gateleakage = stlab.adi(
        addr='TCPIP::192.168.1.106::INSTR')  #for measuring the leakage current
else:
    I_leakage = -1
''' Start the measurement '''

## Calibration for internal resistors
overshoot = False

if M1b_mode == 'Low-Noise':
    R_exp = 2000 + M1b_gain * 1e-3
コード例 #6
0
"""Example script to retrieve a single trace from a PNA

Does not reset PNA.  The idea is that the user sets up the trace on screen and then
runs this script to retrieve it.

"""

import stlab
import numpy as np

prefix = 'M'  #prefix for measurement folder name.  Can be anything or empty
idstring = 'He7_2_to_1_TR_tru'  #Additional info included in measurement folder name.  Can be anything or empty

pna = stlab.adi(addr='TCPIP::192.168.1.93::INSTR', reset=False,
                verb=True)  #Initialize device communication and reset

data = pna.MeasureScreen_pd(
)  #Trigger 2 port measurement and retrieve data in Re,Im format.  Returns OrderedDict
myfile = stlab.newfile(prefix, idstring, autoindex=True)
stlab.saveframe(
    myfile,
    data)  #Save measured data to file.  Written as a block for spyview.
#Create metafile for spyview at each measurement step
stlab.metagen.fromarrays(myfile,
                         data['Frequency (Hz)'], [0],
                         xtitle='Frequency (Hz)',
                         ytitle='None',
                         colnames=list(data))
myfile.close()  #Close file
コード例 #7
0
if S3b_range >= 1e-3:
    coeff = 1e3
    unit = 'm'
else:
    coeff = 1e6
    unit = '$\mu$'

plt.rcParams["figure.figsize"] = [20, 18]
palette = plt.get_cmap('rainbow')  # create a color palette

##Inititalizing the devices
ivvi = IVVI_DAC(addr='COM3', verb=True)
ivvi.RampAllZero(tt=2., steps=20)

Imeas = stlab.adi(
    addr='TCPIP::192.168.1.105::INSTR', verb=True, read_termination='\n'
)  #for measuring the current converted to Voltage at M0 output
Imeas.SetRangeAuto(False)
Imeas.SetRange(10)
Imeas.write('VOLT:NPLC 12')
Imeas.write('TRIG:SOUR IMM')  #DMM6500
Imeas.write('SENS:GAIN:AUTO OFF')  #DMM6500
Imeas.write('SENS:ZERO:AUTO OFF')  #DMM6500

if Vgmax != 0 and measure_gate_leakage:
    v_gateleakage = stlab.adi(
        addr='TCPIP::192.168.1.106::INSTR')  #for measuring the leakage current
else:
    I_leakage = -1
''' Start the measurement '''
コード例 #8
0
ファイル: VNA_power_sweep.py プロジェクト: yausern/stlab
"""PNA power sweep

Example script to perform a series of frequency traces on a PNA as a function of input power

"""

import stlab
import numpy as np

prefix = 'M' #prefix for measurement folder name.  Can be anything or empty
idstring = 'Dev1_powersweep' #Additional info included in measurement folder name.  Can be anything or empty

pna = stlab.adi(addr='TCPIP::192.168.1.42::INSTR',reset=False,verb=True) #Initialize device communication and reset

pna.SetRange(4e9,8e9) #Set frequency range in Hz
pna.SetIFBW(300.) #Set IF bandwidth in Hz
pna.SetPoints(1001) #Set number of frequency points

powstart = -45.
powstop = -0.
steps = 5
powers = np.linspace(powstart,powstop,steps) #generate power sweep steps

myfile = stlab.newfile(prefix,idstring,autoindex=True)
for i,rfpower in enumerate(powers):
    pna.SetPower(rfpower) #set pna power
    data = pna.MeasureScreen_pd() #Trigger 2 port measurement and retrieve data in Re,Im format.  Returns OrderedDict
    stlab.saveframe(myfile, data) #Save measured data to file.  Written as a block for spyview.
    #Create metafile for spyview at each measurement step
    stlab.metagen.fromarrays(myfile,data['Frequency (Hz)'],powers[0:i+1],xtitle='Frequency (Hz)',ytitle='Power (dB)',colnames=data.keys())
myfile.close() #Close file
コード例 #9
0
import stlab
import datetime
import time
import numpy as np
from stlab.devices.Cryocon_44C import Cryocon_44C

dev = Cryocon_44C('TCPIP::192.168.1.4::5000::SOCKET')
device = stlab.adi(addr='TCPIP::192.168.1.230::INSTR', reset=True, verb=True)

numPoints = 1001
startFreq = 5200000000.0
stopFreq = 5400000000.0

tdelay = 30  #time between meas
tmeas = 300  #total time measuring

prefix = 'Test'  #prefix for measurement folder name.  Can be anything or empty
idstring = 'Timed'  #Additional info included in measurement folder name.  Can be anything or empty

device.write('INST:SEL "NA"')  #set mode to Network Analyzer
device.SinglePort()  #changed this to from twoport to singleport
#        frec = self.query('FREQ:DATA?')
device.write("SENS:SWE:POIN " + str(numPoints))

device.write("SENS:FREQ:START " + str(startFreq))

device.write("SENS:FREQ:STOP " + str(stopFreq))

#device.write("SENS:DIF:BAND " + str(bandwidth)) #this crashes the fieldfox error -113
device.SetIFBW(100.)
コード例 #10
0
ファイル: S_USING_Keysight.py プロジェクト: harjmandi/Devices
import stlab
import numpy as np

prefix = 'C26_UL-noGate_'  #prefix for measurement folder name.  Can be anything or empty
caption = 'measurement with no amplification and no circulator/directional coupler POWER:-10 dBm'
path = 'D:\\measurement_data_4KDIY\\Hadi\\C26 2020-02-26 measurements/'

KEYSIGHT = stlab.adi(addr='TCPIP::192.168.1.230::INSTR',
                     reset=False,
                     verb=True)

numPoints = 1001
startFreq = 2e9
stopFreq = 5e9
power = -10

KEYSIGHT.write('INST:SEL "NA"')  #set mode to Network Analyzer
KEYSIGHT.SinglePort()  #changed this to from twoport to singleport
KEYSIGHT.write("SENS:SWE:POIN " + str(numPoints))
KEYSIGHT.write("SENS:FREQ:START " + str(startFreq))
KEYSIGHT.write("SENS:FREQ:STOP " + str(stopFreq))
KEYSIGHT.SetPower(power)

#device.write("SENS:DIF:BAND " + str(bandwidth)) #this crashes the fieldfox error -113
KEYSIGHT.SetIFBW(100.)

myfile = stlab.newfile(prefix, '_', autoindex=True, mypath=path)

data = KEYSIGHT.MeasureScreen_pd()

stlab.saveframe(
コード例 #11
0
measure_frequency = np.linspace(start_freq, stop_freq, freq_points)

##########################################################
''' Initializing the devices '''

# IVVI settings
s1h_gain = 45 * (
    1 / 101
)  # [V/V] manual gain set on S1h module, the second term (101/1) is made externally using a voltage devider
DAC = 1  # DAC linked to the S1h
dev = IVVI_DAC('COM5')  # IVVI
dev.RampAllZero()

# initializing the Keithley for gate current measurement
vmeasure = stlab.adi('TCPIP::192.168.1.105::INSTR')  # with Keithley DMM6500

vmeasure.write('SENS:VOLT:DC:RANG:AUTO 0')
vmeasure.write('SENS:VOLT:DC:RANGE 10')
vmeasure.write(':INIT:CONT 0')
vmeasure.write('VOLT:NPLC 1')
vmeasure.write('TRIG:SOUR IMM')
vmeasure.write(":SYST:AZER:STAT OFF")
vmeasure.write(":TRIG:COUN 1")
gate_leakage_v_I_conversion = 1e-6

#Triton
mytriton = tritonclass()

# initializing the ZND
VNA = RS_ZND('TCPIP::192.168.1.149::INSTR', reset=False)
コード例 #12
0
ファイル: quickQ.py プロジェクト: yausern/stlab
"""Example for quick measurement and fit of a Q factor using stlab.S11fit

Takes a user defined label as command line argument to name the output files (one figure, one complex trace and the fit parameters)

"""

import stlab  #fitting routines imported here.  Callable as stlab.S11fit(...) and stlab.S11func(...)
import numpy as np
#from stlab.devices.RS_ZND import RS_ZND_pna as pnaclass #Import device driver for PNA
from matplotlib import pyplot as plt  #import graphing library
import sys
import re
import os

pna = stlab.adi(
    addr="TCPIP::192.168.1.42::INSTR", reset=False,
    verb=True)  #Initialize device but do not reset.  Needs correct address
#'addr' is the VISA address string for the device
#Since reset is set to False, this script assumes that the sweep settings are already set before starting
#These could of course be set through member methods of the pna.  See driver for options.
data = pna.MeasureScreen_pd(
)  #Trigger measurement and retrieve data.  Data is returned as an OrderedDict (stlab dict)
# If calibration is used, both calibrated and uncalibrated data is returned
measpow = data['Power (dBm)'][0]  #retrieve power for plot
print(data.keys())  #Show available data columns on screen
pna.close()

x = data['Frequency (Hz)']  #Get frequency array from measurement
#Regular expression to find correct label for fitting columns.  Will assing SXX into sparam for first found S parameter trace in measurement
pattern = '^S\d{2}(re|im)'
pattern = re.compile(pattern)
コード例 #13
0
except:
    T0 = -1
time.sleep(1)
for x in range(9):
    try:
        T = mytriton.GetTemperature(8)
    except:
        T = -1
    T0 += T
Tini = T0 / 10. * 1000.

##Communicate with devices
ivvi = IVVI_DAC(addr='COM5', verb=True)
ivvi.RampAllZero(tt=10.)

vmeas = stlab.adi(addr='TCPIP::192.168.1.105::INSTR')

islist1 = np.arange(0, ismax, deltaI)
islist = np.concatenate(
    [islist1[:-1], islist1[::-1], -islist1[1:-1], -islist1[::-1]])

idstring = '_at{:.2f}mK'.format(Tini).replace('.', 'p')
colnames = [
    'Iset (A)', 'Vmeas (V)', 'Rmeas (Ohm)', 'Vgate (V)', 'T (mK)', 'Time (s)'
]
last_time = time.time()

Vglist = np.linspace(Vgmax, Vgmin, (Vgmax - Vgmin) / deltaVg + 1)
if Vglist.size == 0:
    Vglist = [0]
Vg_ini = Vglist[0]
コード例 #14
0
ファイル: quickQ.py プロジェクト: yausern/stlab
"""Example for quick measurement and fit of a Q factor using stlab.S11fit

Takes a user defined label as command line argument to name the output files (one figure, one complex trace and the fit parameters)

"""

import stlab #fitting routines imported here.  Callable as stlab.S11fit(...) and stlab.S11func(...)
import numpy as np
#from stlab.devices.RS_ZND import RS_ZND_pna as pnaclass #Import device driver for PNA
from matplotlib import pyplot as plt #import graphing library
import sys
import re
import os

pna = stlab.adi(addr="TCPIP::192.168.1.42::INSTR",reset=False,verb=True) #Initialize device but do not reset.  Needs correct address
#'addr' is the VISA address string for the device
#Since reset is set to False, this script assumes that the sweep settings are already set before starting
#These could of course be set through member methods of the pna.  See driver for options.
data = pna.MeasureScreen_pd() #Trigger measurement and retrieve data.  Data is returned as an OrderedDict (stlab dict)
# If calibration is used, both calibrated and uncalibrated data is returned
measpow = data['Power (dBm)'][0] #retrieve power for plot
print(data.keys()) #Show available data columns on screen
pna.close()

x = data['Frequency (Hz)'] #Get frequency array from measurement
#Regular expression to find correct label for fitting columns.  Will assing SXX into sparam for first found S parameter trace in measurement
pattern = '^S\d{2}(re|im)'
pattern = re.compile(pattern)
for lab in data.keys():
    if  pattern.match(lab):
        sparam = lab[:3]