From 66202602843c1b48ba9eaa46d77c931321f0c60a Mon Sep 17 00:00:00 2001 From: unknown <asoalexandros@gmail.com> Date: Mon, 21 Oct 2024 10:07:43 +0200 Subject: [PATCH] debugging part 2 more limitations --- .../double_gate_ADU_interface.ipynb | 31 ++++--------------- .../lib/help.py | 24 ++------------ .../lib/interface.py | 15 ++++++--- hp4155/hp4155a.py | 5 +-- 4 files changed, 20 insertions(+), 55 deletions(-) diff --git a/hp4155/ADU for double gate devices-test/double_gate_ADU_interface.ipynb b/hp4155/ADU for double gate devices-test/double_gate_ADU_interface.ipynb index 5a22305..faa3625 100644 --- a/hp4155/ADU for double gate devices-test/double_gate_ADU_interface.ipynb +++ b/hp4155/ADU for double gate devices-test/double_gate_ADU_interface.ipynb @@ -9,7 +9,7 @@ { "data": { "application/vnd.jupyter.widget-view+json": { - "model_id": "e17b02dca07148ae85036ca6e597972b", + "model_id": "3cf0faebf88c45f49e903b375a7612b4", "version_major": 2, "version_minor": 0 }, @@ -23,7 +23,7 @@ { "data": { "application/vnd.jupyter.widget-view+json": { - "model_id": "cbd815fcdfe044f49837a43725952507", + "model_id": "e0c490c25be140d78098258f89fe2c7c", "version_major": 2, "version_minor": 0 }, @@ -37,7 +37,7 @@ { "data": { "application/vnd.jupyter.widget-view+json": { - "model_id": "e87d9d231a614b31b1f0c0134a4cdbe5", + "model_id": "c2beee9304734535a652146df18f2fb1", "version_major": 2, "version_minor": 0 }, @@ -51,7 +51,7 @@ { "data": { "application/vnd.jupyter.widget-view+json": { - "model_id": "3222ed014163431eb9b651247256caa7", + "model_id": "17d7289741454a9f9f701f7b47ac38ce", "version_major": 2, "version_minor": 0 }, @@ -65,7 +65,7 @@ { "data": { "application/vnd.jupyter.widget-view+json": { - "model_id": "8a0a185bf8a74f3eb6b08a0f4beff52f", + "model_id": "55e13e645e6e429dade45a3f97226e0b", "version_major": 2, "version_minor": 0 }, @@ -81,29 +81,10 @@ "%run double_gate_ADU.py" ] }, - { - "cell_type": "code", - "execution_count": 3, - "id": "0ee5162d-3693-4f4a-a9dc-2159c80e7008", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "+0,\"No error\"\n", - "\n" - ] - } - ], - "source": [ - "print(device.error())" - ] - }, { "cell_type": "code", "execution_count": null, - "id": "db297f4d-f586-4b69-8994-e05ebf68605f", + "id": "1a0e956e-9d25-481e-b1ec-b03babcb4c19", "metadata": {}, "outputs": [], "source": [] diff --git a/hp4155/ADU for double gate devices-test/lib/help.py b/hp4155/ADU for double gate devices-test/lib/help.py index 2c539b1..0723fd3 100644 --- a/hp4155/ADU for double gate devices-test/lib/help.py +++ b/hp4155/ADU for double gate devices-test/lib/help.py @@ -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 #define the absolute(A to indicate absolute) always 3 (max 6!) - if element.startswith("V"): - device.user_function('A'+element,"V",f"ABS({element})") - elif element.startswith('I') and element.endswith('mm'): + if element.startswith('I') and element.endswith('mm'): 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})") # 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.error() + device.display_variable('X',params["PLOT"]["x"]) device.axis_scale('X',params["PLOT"]["x_scale"]) - device.error() 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.error() if params["PLOT"]["y1_scale"]=='LOG': device.display_variable('Y1',"A"+params["PLOT"]["y1"]) else: device.display_variable('Y1',params["PLOT"]["y1"]) - device.error() device.axis_scale('Y1',params["PLOT"]["y1_scale"]) - device.error() 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.error() if params["PLOT"]["y2"]!= "None": if params["PLOT"]["y2_scale"]=='LOG': device.display_variable('Y2',"A"+params["PLOT"]["y2"]) else: device.display_variable('Y2',params["PLOT"]["y2"]) - device.error() device.axis_scale('Y2',params["PLOT"]["y2_scale"]) - device.error() 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.error() diff --git a/hp4155/ADU for double gate devices-test/lib/interface.py b/hp4155/ADU for double gate devices-test/lib/interface.py index 4664839..8cdca3c 100644 --- a/hp4155/ADU for double gate devices-test/lib/interface.py +++ b/hp4155/ADU for double gate devices-test/lib/interface.py @@ -243,10 +243,15 @@ def additional_secondary(name,start,step,stop,comp): def plot_config(meas): #meas = 1,2,3 for transfer,output,gatediode config_grid = GridspecLayout(6,4) + if meas== 3: + options_x= ['VTG','VBG'] + else : + options_x = ['VTG','VBG','VDS'] + if meas ==3: - options = ['VTG','VBG','ITG','IBG','ITGmm','IBGmm','None'] + options = ['ITG','IBG','ITGmm','IBGmm','None'] else: - options = ['VTG','VBG','VDS','ITG','IBG','ID','ITGmm','IBGmm','IDmm','None'] + options = ['ITG','IBG','ID','ITGmm','IBGmm','IDmm','None'] # define the default values (y2 is always empty) taken from the interface if meas == 1:# Transfer @@ -294,13 +299,13 @@ def plot_config(meas): #meas = 1,2,3 for transfer,output,gatediode #iterate through the second line (NAME) 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,3]=widgets.Dropdown(layout=Layout(height='auto', width='auto'),options = options,value = "None") #Iterate through the third line (scale) 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,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 "x":config_grid[2,1], "y1":config_grid[2,2], "y2":config_grid[2,3], - "x_scale":config_grid[3,1], + #"x_scale":config_grid[3,1], "y1_scale":config_grid[3,2], "y2_scale":config_grid[3,3], "x_min":config_grid[4,1], diff --git a/hp4155/hp4155a.py b/hp4155/hp4155a.py index 3addbd1..e925ca7 100644 --- a/hp4155/hp4155a.py +++ b/hp4155/hp4155a.py @@ -45,10 +45,7 @@ class HP4155a(object): self.inst.write(":PAGE:STR") def error(self): - error =self.inst.query(":SYST:ERR?") - if error != '+0,"No error"\n': - raise Exception(error) - return 0 + return self.inst.query(":SYST:ERR?") def operation_completed(self): text = self.inst.query('*OPC?') -- GitLab