Hysteresis JV simulation

[1]:
import os, sys
try:
    import pySIMsalabim as sim
except ImportError: # add parent directory to sys.path if pySIMsalabim is not installed
    sys.path.append('..')
    import pySIMsalabim as sim
from pySIMsalabim.experiments.hysteresis import *

Setup the simulation

[2]:
# Set the path to the simulation setup file
cwd = os.path.abspath('..')
session_path = os.path.join(cwd, 'SIMsalabim','ZimT')
zimt_device_parameters = os.path.join(session_path, 'simulation_setup.txt')

# Set the hysteresis simulation parameters
scan_speed = 10
direction = -1
G_frac = 1
tVG_name = os.path.join(session_path,'tVG.txt')
Vmin = 0.0
Vmax = 1.25
steps = 200
# Run the hysteresis simulation
ret, mess, rms = Hysteresis_JV(zimt_device_parameters, session_path, 0, scan_speed, direction, G_frac, tVG_name, run_mode=False, Vmin=Vmin, Vmax=Vmax, steps = steps, expJV_Vmin_Vmax='', expJV_Vmax_Vmin='',rms_mode='lin',threadsafe=False)

Plot results

[3]:
ax = plot_hysteresis_JV(session_path)
../_images/examples_hysteresis_5_0.png
[4]:
# Clean up the output files (comment out if you want to keep the output files)
sim.clean_all_output(session_path)
sim.delete_folders('tmp',session_path)