Skip to content
Snippets Groups Projects
Commit 66202602 authored by Alexandros Asonitis's avatar Alexandros Asonitis
Browse files

debugging part 2 more limitations

parent 620ddf63
No related branches found
No related tags found
No related merge requests found
%% Cell type:code id:51b012d0-95b0-41c2-81bb-2205f3c53be2 tags: %% Cell type:code id:51b012d0-95b0-41c2-81bb-2205f3c53be2 tags:
``` python ``` python
%run double_gate_ADU.py %run double_gate_ADU.py
``` ```
%% Output %% Output
%% Cell type:code id:0ee5162d-3693-4f4a-a9dc-2159c80e7008 tags: %% Cell type:code id:1a0e956e-9d25-481e-b1ec-b03babcb4c19 tags:
``` python
print(device.error())
```
%% Output
+0,"No error"
%% Cell type:code id:db297f4d-f586-4b69-8994-e05ebf68605f tags:
``` python ``` python
``` ```
......
...@@ -219,53 +219,35 @@ def graph_tool(params,device): ...@@ -219,53 +219,35 @@ def graph_tool(params,device):
device.user_function(element,"mA/mm",f"{element[:-2]}*{normalization_factor(params['SAMPLE']['width'])}") #max 3 device.user_function(element,"mA/mm",f"{element[:-2]}*{normalization_factor(params['SAMPLE']['width'])}") #max 3
#define the absolute(A to indicate absolute) always 3 (max 6!) #define the absolute(A to indicate absolute) always 3 (max 6!)
if element.startswith("V"): if element.startswith('I') and element.endswith('mm'):
device.user_function('A'+element,"V",f"ABS({element})")
elif element.startswith('I') and element.endswith('mm'):
device.user_function('A'+element,"mA/mm",f"ABS({element})") device.user_function('A'+element,"mA/mm",f"ABS({element})")
else: # regular I elif element.startswith('I') and element.endswith('mm')== False:
device.user_function('A'+element,"A",f"ABS({element})") device.user_function('A'+element,"A",f"ABS({element})")
# Now send the parameters in the tool # Now send the parameters in the tool
if params["PLOT"]["x_scale"]=='LOG':
device.display_variable('X',"A"+params["PLOT"]["x"])
else:
device.display_variable('X',params["PLOT"]["x"]) device.display_variable('X',params["PLOT"]["x"])
device.error()
device.axis_scale('X',params["PLOT"]["x_scale"]) device.axis_scale('X',params["PLOT"]["x_scale"])
device.error()
device.display_variable_min_max('X','MIN',params["PLOT"]["x_min"]) device.display_variable_min_max('X','MIN',params["PLOT"]["x_min"])
device.error()
device.display_variable_min_max('X','MAX',params["PLOT"]["x_max"]) device.display_variable_min_max('X','MAX',params["PLOT"]["x_max"])
device.error()
if params["PLOT"]["y1_scale"]=='LOG': if params["PLOT"]["y1_scale"]=='LOG':
device.display_variable('Y1',"A"+params["PLOT"]["y1"]) device.display_variable('Y1',"A"+params["PLOT"]["y1"])
else: else:
device.display_variable('Y1',params["PLOT"]["y1"]) device.display_variable('Y1',params["PLOT"]["y1"])
device.error()
device.axis_scale('Y1',params["PLOT"]["y1_scale"]) device.axis_scale('Y1',params["PLOT"]["y1_scale"])
device.error()
device.display_variable_min_max('Y1','MIN',params["PLOT"]["y1_min"]) device.display_variable_min_max('Y1','MIN',params["PLOT"]["y1_min"])
device.error()
device.display_variable_min_max('Y1','MAX',params["PLOT"]["y1_max"]) device.display_variable_min_max('Y1','MAX',params["PLOT"]["y1_max"])
device.error()
if params["PLOT"]["y2"]!= "None": if params["PLOT"]["y2"]!= "None":
if params["PLOT"]["y2_scale"]=='LOG': if params["PLOT"]["y2_scale"]=='LOG':
device.display_variable('Y2',"A"+params["PLOT"]["y2"]) device.display_variable('Y2',"A"+params["PLOT"]["y2"])
else: else:
device.display_variable('Y2',params["PLOT"]["y2"]) device.display_variable('Y2',params["PLOT"]["y2"])
device.error()
device.axis_scale('Y2',params["PLOT"]["y2_scale"]) device.axis_scale('Y2',params["PLOT"]["y2_scale"])
device.error()
device.display_variable_min_max('Y2','MIN',params["PLOT"]["y2_min"]) device.display_variable_min_max('Y2','MIN',params["PLOT"]["y2_min"])
device.error()
device.display_variable_min_max('Y2','MAX',params["PLOT"]["y2_max"]) device.display_variable_min_max('Y2','MAX',params["PLOT"]["y2_max"])
device.error()
...@@ -244,9 +244,14 @@ def plot_config(meas): #meas = 1,2,3 for transfer,output,gatediode ...@@ -244,9 +244,14 @@ def plot_config(meas): #meas = 1,2,3 for transfer,output,gatediode
config_grid = GridspecLayout(6,4) config_grid = GridspecLayout(6,4)
if meas== 3: if meas== 3:
options = ['VTG','VBG','ITG','IBG','ITGmm','IBGmm','None'] options_x= ['VTG','VBG']
else : else :
options = ['VTG','VBG','VDS','ITG','IBG','ID','ITGmm','IBGmm','IDmm','None'] options_x = ['VTG','VBG','VDS']
if meas ==3:
options = ['ITG','IBG','ITGmm','IBGmm','None']
else:
options = ['ITG','IBG','ID','ITGmm','IBGmm','IDmm','None']
# define the default values (y2 is always empty) taken from the interface # define the default values (y2 is always empty) taken from the interface
if meas == 1:# Transfer if meas == 1:# Transfer
...@@ -294,13 +299,13 @@ def plot_config(meas): #meas = 1,2,3 for transfer,output,gatediode ...@@ -294,13 +299,13 @@ def plot_config(meas): #meas = 1,2,3 for transfer,output,gatediode
#iterate through the second line (NAME) #iterate through the second line (NAME)
must_options = [x for x in options if x!='None'] must_options = [x for x in options if x!='None']
config_grid[2,1]=widgets.Dropdown(layout=Layout(height='auto', width='auto'),options = must_options,value = x_name) config_grid[2,1]=widgets.Dropdown(layout=Layout(height='auto', width='auto'),options = options_x,value = x_name)
config_grid[2,2]=widgets.Dropdown(layout=Layout(height='auto', width='auto'),options = must_options,value = y1_name) config_grid[2,2]=widgets.Dropdown(layout=Layout(height='auto', width='auto'),options = must_options,value = y1_name)
config_grid[2,3]=widgets.Dropdown(layout=Layout(height='auto', width='auto'),options = options,value = "None") config_grid[2,3]=widgets.Dropdown(layout=Layout(height='auto', width='auto'),options = options,value = "None")
#Iterate through the third line (scale) #Iterate through the third line (scale)
options_scale = ['LIN','LOG'] options_scale = ['LIN','LOG']
config_grid[3,1] = widgets.Dropdown(value = x_scale,options = options_scale, layout=Layout(height='auto', width='auto')) config_grid[3,1] = widgets.Dropdown(value = x_scale,options = options_scale, layout=Layout(height='auto', width='auto'),disabled = True)
config_grid[3,2] = widgets.Dropdown(value = y1_scale,options = options_scale, layout=Layout(height='auto', width='auto')) config_grid[3,2] = widgets.Dropdown(value = y1_scale,options = options_scale, layout=Layout(height='auto', width='auto'))
config_grid[3,3] = widgets.Dropdown(value = 'LIN',options = options_scale, layout=Layout(height='auto', width='auto')) config_grid[3,3] = widgets.Dropdown(value = 'LIN',options = options_scale, layout=Layout(height='auto', width='auto'))
...@@ -318,7 +323,7 @@ def plot_config(meas): #meas = 1,2,3 for transfer,output,gatediode ...@@ -318,7 +323,7 @@ def plot_config(meas): #meas = 1,2,3 for transfer,output,gatediode
"x":config_grid[2,1], "x":config_grid[2,1],
"y1":config_grid[2,2], "y1":config_grid[2,2],
"y2":config_grid[2,3], "y2":config_grid[2,3],
"x_scale":config_grid[3,1], #"x_scale":config_grid[3,1],
"y1_scale":config_grid[3,2], "y1_scale":config_grid[3,2],
"y2_scale":config_grid[3,3], "y2_scale":config_grid[3,3],
"x_min":config_grid[4,1], "x_min":config_grid[4,1],
......
...@@ -45,10 +45,7 @@ class HP4155a(object): ...@@ -45,10 +45,7 @@ class HP4155a(object):
self.inst.write(":PAGE:STR") self.inst.write(":PAGE:STR")
def error(self): def error(self):
error =self.inst.query(":SYST:ERR?") return self.inst.query(":SYST:ERR?")
if error != '+0,"No error"\n':
raise Exception(error)
return 0
def operation_completed(self): def operation_completed(self):
text = self.inst.query('*OPC?') text = self.inst.query('*OPC?')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment