myfile.write('\n') stlab.metagen.fromarrays(myfile, Vglist, range(count+1), xtitle='Iset (A)',ytitle='Index_Voltage ()',colnames=colnames) plt.rcParams["figure.figsize"] = [16,9] plt.subplot(2, 1, 1) plt.plot(applied_gate_array,resistance_array, '--r', marker='o') plt.title(prefix+'$I_{max}$:{:.1f}nA, $I_{mmin}$:{:.1f}nA'.fomrat(1e-9*V_bias/np.Minimum(resistance_array),1e-9*V_bias/np.Maximum(resistance_array))) plt.ylabel('resistance [$\Omega$]') plt.xlim(Vgmin,Vgmax) plt.subplot(2, 1, 2) plt.plot(applied_gate_array,I_leakage_array, '--r', marker='o') plt.ylabel('leakage current [nA]') plt.xlabel('gate voltage [V]') plt.xlim(Vgmin,Vgmax) plt.pause(0.1) plt.savefig(os.path.dirname(myfile.name)+'\\'+prefix) ivvi.RampVoltage(S1h_dac,0.,tt=30.) ivvi.RampAllZero(tt=5.) vmeas.close() ivvi.close() myfile.close()
plt_leak_curr = np.append(plt_leak_curr, leakage_current) plt.rcParams["figure.figsize"] = [16, 9] plt.plot(plt_Vg, plt_leak_curr, '--r', marker='o') plt.ylabel('Leakage Current (nA)') plt.xlabel('Gate Voltage (V)') plt.text(60, .025, ['Leackage Current =', leakage_current, 'nA']) plt.pause(0.1) print('RAMPING FINISHED') dev.RampVoltage(DAC, 0, tt=ramp_time) # to safely return back the gate voltage dev.close() print('FINISHED') ####################################################################### ''' saving the data ''' if save_data: # saving the metafile plt.savefig(os.path.dirname(my_file_2.name) + '\\' + prefix) my_file_2.close() parameters = [ 'target gate (V)', 'time step (s)',