diff --git a/hp4155/memristor (Version 4.0)/help_pulse.py b/hp4155/memristor (Version 4.0)/help_pulse.py index d65e0d3234457da58b7c8c2a252e0cf2dc051fd8..a5195597a879a8520133f809c25e500d4346c8e3 100644 --- a/hp4155/memristor (Version 4.0)/help_pulse.py +++ b/hp4155/memristor (Version 4.0)/help_pulse.py @@ -172,7 +172,7 @@ def constant_meas(dictionary,device): smu_help.update( iname = 'I3', vname = 'V3', - mode = 'V', + mode = 'VPULSE', func = 'VAR1' ) smu_ground.update( diff --git a/hp4155/memristor (Version 4.0)/memristor.py b/hp4155/memristor (Version 4.0)/memristor.py index 35a99009b9e78c87d0d580ad8af27e7242be87b4..b006dd97ccb5bf8abda35f32df41dcf1f5a44383 100644 --- a/hp4155/memristor (Version 4.0)/memristor.py +++ b/hp4155/memristor (Version 4.0)/memristor.py @@ -6,10 +6,6 @@ from keyboard import add_hotkey,remove_hotkey # pulsed libraries from help_pulse import * -import warnings -warnings.filterwarnings("ignore") - - #create temporary file to store the results localy temp_file= os.path.join(os.getcwd(),'tempfile.txt') @@ -397,8 +393,8 @@ def on_full_button_clicked(b): add_hotkey("esc",break_loop) #execute number of measurements for i in range(number.value):#here it is easier to implement the sampling checks - clear_output() - if i>0 : + clear_output(wait = True) + if i>0: display(fig) if sampling.value == True: #before set(100mv) R_mean_init = sampling_check(-0.01,device) @@ -415,6 +411,7 @@ def on_full_button_clicked(b): V34,I34 = sweep(0,Vreset.value,step.value,CC_vreset.value,integration_time.value,device) #reset plot_sweep(V34,I34,f"RESET Iteration {i+1}") + #after reset if sampling.value == True:#-0.1V R_mean_reset = sampling_check(-0.01,device) @@ -452,13 +449,19 @@ def on_full_button_clicked(b): ax1.plot(V,I) ax2.plot(V,np.absolute(I)) fig.tight_layout() - + #check for loop termination if stop == True: + clear_output(wait= True) + time.sleep(2) + display(fig) information_box("Endurance stopped after esc!") f.write("endurance stopped!\n\n") break else: + clear_output(wait = True) + time.sleep(2) + display(fig) information_box("Endurance completed!") f.write("endurance completed!\n\n") @@ -539,11 +542,8 @@ def on_sweep_button_clicked(b): 'field':field, 'dut':DUT } - if first == True: - change_state(information) - first = False - times,values = sweep_meas(sweep_dict) + times,values = sweep_meas(sweep_dict,device) plot_sweep_pulse(values) save_sweep(folder,sample_dict,values,times,sweep_dict) change_state(all_widgets) @@ -563,7 +563,7 @@ def on_constant_button_clicked(b): 'dut':DUT } - times,values = constant_meas(cons_dict) + times,values = constant_meas(cons_dict,device) plot_constant_pulse(values) save_constant(folder,sample_dict,values,times,cons_dict) change_state(all_widgets) diff --git a/hp4155/memristor (Version 4.0)/memristor_buttons.ipynb b/hp4155/memristor (Version 4.0)/memristor_buttons.ipynb index 43f6979454a32cedb2447fd2abe4978cf77ae342..c9aa7e1d764af70e814dd3f28e2a6ef48ee6801e 100644 --- a/hp4155/memristor (Version 4.0)/memristor_buttons.ipynb +++ b/hp4155/memristor (Version 4.0)/memristor_buttons.ipynb @@ -3,13 +3,13 @@ { "cell_type": "code", "execution_count": 1, - "id": "7611a98c-c1cf-46cb-bdd9-fd3dc6a1f53c", + "id": "b913930d-b120-4e59-8a42-d9eecb526a61", "metadata": {}, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { - "model_id": "6e4058bf902d421babfc628c5663e9e9", + "model_id": "04df3def923445eb95f28afa67430db0", "version_major": 2, "version_minor": 0 }, @@ -23,7 +23,7 @@ { "data": { "application/vnd.jupyter.widget-view+json": { - "model_id": "862dbbbc94c04ff29613fa11d666c2b1", + "model_id": "0eeebb7ea7f64c97814087e1c195f32b", "version_major": 2, "version_minor": 0 }, @@ -37,7 +37,7 @@ { "data": { "application/vnd.jupyter.widget-view+json": { - "model_id": "b48ee34dc7774e778bc91cf196269652", + "model_id": "ff84a98e2896443cbf3470c994e9b383", "version_major": 2, "version_minor": 0 }, @@ -53,28 +53,10 @@ "%run memristor.py" ] }, - { - "cell_type": "code", - "execution_count": 2, - "id": "38e8523c-17f0-48b4-9501-dd2278ffe8d1", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "(0, '\"No error\"\\n')\n" - ] - } - ], - "source": [ - "print(device.error())" - ] - }, { "cell_type": "code", "execution_count": null, - "id": "01f338ba-d3a5-47ec-993e-53866010308b", + "id": "1047e606-d5cb-420b-892f-766226339854", "metadata": {}, "outputs": [], "source": []