From 7b4ea69696aa2996625fad276f7d626b15868dae Mon Sep 17 00:00:00 2001 From: unknown <asoalexandros@gmail.com> Date: Thu, 27 Mar 2025 12:32:50 +0100 Subject: [PATCH] Debugging part 3 (Day 3) --- hp4155/Custom_SMU/debug.ipynb | 26 +++++++++----------------- hp4155/Custom_SMU/lib/help.py | 4 ++-- hp4155/Custom_SMU/lib/interface.py | 2 +- hp4155/hp4155a.py | 6 +++--- 4 files changed, 15 insertions(+), 23 deletions(-) diff --git a/hp4155/Custom_SMU/debug.ipynb b/hp4155/Custom_SMU/debug.ipynb index 7044e73..88f4e5b 100644 --- a/hp4155/Custom_SMU/debug.ipynb +++ b/hp4155/Custom_SMU/debug.ipynb @@ -9,7 +9,7 @@ { "data": { "application/vnd.jupyter.widget-view+json": { - "model_id": "aac9d803eab04d8487de412700c8bd31", + "model_id": "e0c05966295b480084cd0c192364699c", "version_major": 2, "version_minor": 0 }, @@ -23,7 +23,7 @@ { "data": { "application/vnd.jupyter.widget-view+json": { - "model_id": "3f50962b21b94d6c88e10a4ad2e15d1f", + "model_id": "5cdeb91c8cd241a49fa19ce9ba786941", "version_major": 2, "version_minor": 0 }, @@ -37,7 +37,7 @@ { "data": { "application/vnd.jupyter.widget-view+json": { - "model_id": "f04dcfa5ab3c442f8c987de79a4b826c", + "model_id": "9f73930882314ec8b9866c902ea98ed2", "version_major": 2, "version_minor": 0 }, @@ -263,7 +263,7 @@ "\n", " # List all errors occured\n", " counter,message = device.list_all_errors()\n", - " if counter>1:\n", + " if counter>0:\n", " error_box(message)\n", " change_state(first_page,second_page,third_page,fourth_page,fifth_page)\n", " start.disabled = False\n", @@ -452,7 +452,7 @@ "\n", " # List all errors occured\n", " counter,message = device.list_all_errors()\n", - " if counter>1:\n", + " if counter>0:\n", " error_box(message)\n", " change_state(first_page,second_page,third_page,fourth_page,fifth_page)\n", " start.disabled = False\n", @@ -584,11 +584,11 @@ " \n", " # Now set the Parameters\n", " device.stress_filter(filter)\n", - " device.hold_time(hold_time)\n", + " device.stress_hold_time(hold_time)\n", " device.stress_time(duration)\n", "\n", - " cons_smu_numbers = check_cons_smu_sampling(smus) # works also for sampling\n", - " for i, cons_smu in enumerate(smus):\n", + " cons_smu_numbers = check_cons_smu_samp(smus) # works also for sampling\n", + " for i, cons_smu in enumerate(cons_smus):\n", " if i+1 in cons_smu_numbers: # check if the constant smu was found in the first page func\n", " device.setup_smu_stress(i+1,cons_smu)\n", " \n", @@ -599,7 +599,7 @@ " \n", " # List all errors occured\n", " counter,message = device.list_all_errors()\n", - " if counter>1:\n", + " if counter>0:\n", " error_box(message)\n", " change_state(first_page,second_page,third_page,fourth_page,fifth_page)\n", " start.disabled = False\n", @@ -702,14 +702,6 @@ " \n", "start.on_click(on_start_clicked)" ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "5dcfff06-d975-4473-b3d1-6a3543e319d7", - "metadata": {}, - "outputs": [], - "source": [] } ], "metadata": { diff --git a/hp4155/Custom_SMU/lib/help.py b/hp4155/Custom_SMU/lib/help.py index 929521d..876b79b 100644 --- a/hp4155/Custom_SMU/lib/help.py +++ b/hp4155/Custom_SMU/lib/help.py @@ -136,7 +136,7 @@ def plot_results(values,device): ax1.set_xscale(x_scale) ax1.set_yscale(y1_scale) - ax1.scatter(x_values,y1_values,color='tab:red') + ax1.plot(x_values,y1_values,color='tab:red') ax1.tick_params(axis ='y', labelcolor ='tab:red',which='both') if y2_var!= "": @@ -146,7 +146,7 @@ def plot_results(values,device): ax2.set_ylabel(y2_label,color = 'tab:green') ax2.set_yscale(y2_scale) - ax2.scatter(x_values,y2_values,color='tab:green') + ax2.plot(x_values,y2_values,color='tab:green') ax2.tick_params(axis ='y', labelcolor ='tab:green',which='both') display(fig) diff --git a/hp4155/Custom_SMU/lib/interface.py b/hp4155/Custom_SMU/lib/interface.py index 765993e..c15969a 100644 --- a/hp4155/Custom_SMU/lib/interface.py +++ b/hp4155/Custom_SMU/lib/interface.py @@ -120,7 +120,7 @@ def page_3(): ## Sampling Parameters third_page[11,:] = widgets.Label("SAMPLING OR STRESS PARAMETERS") third_page[12,0] = widgets.Dropdown(options=["LINear","L10","L25","L50","THINnedout"], value = 'LINear',description = 'MODE',style = {'description_width': 'initial'},layout=Layout(height='auto', width='auto')) - third_page[13,0] = widgets.FloatText(1e-3,description = "INITIAL INTERVAL", style = {'description_width': 'initial'},layout=Layout(height='auto', width='auto')) + third_page[13,0] = widgets.FloatText(2e-3,description = "INITIAL INTERVAL", style = {'description_width': 'initial'},layout=Layout(height='auto', width='auto')) third_page[14,0] = widgets.IntText(1001,description = "NO. OF SAMPLES", style = {'description_width': 'initial'},layout=Layout(height='auto', width='auto')) third_page[15,0] = widgets.FloatText(0,description = "DURATION", style = {'description_width': 'initial'},layout=Layout(height='auto', width='auto')) third_page[16,0] = widgets.FloatText(0,description = "HOLD TIME", style = {'description_width': 'initial'},layout=Layout(height='auto', width='auto')) diff --git a/hp4155/hp4155a.py b/hp4155/hp4155a.py index b0352fb..a47efe5 100644 --- a/hp4155/hp4155a.py +++ b/hp4155/hp4155a.py @@ -22,11 +22,11 @@ class HP4155a(object): command = f":PAGE:STR:SMU{number}:MODE {smu['mode']};FUNC {smu['func']};NAME {repr(smu['name'])}" self.inst.write(command) - def setup_smu_stress(self,value,comp): - command =f":PAGE:STR:SET:CONS:SMU{number} {value}" + def setup_smu_stress(self,number:int,smu:dict): + command =f":PAGE:STR:SET:CONS:SMU{number} {smu['value']}" self.inst.write(command) - command = f":PAGE:STR:SET:CONS:SMU{number}:COMP {comp}" + command = f":PAGE:STR:SET:CONS:SMU{number}:COMP {smu['comp']}" self.inst.write(command) def smu_stress_disable(self,number:int): -- GitLab