%% shock work-up procedure
% The script was adequate for a multichannel stimulator (SXC-4A, Sanxia Technique Inc., China).
% This script is mainly used to measure the threshold of each participant before using electric shock and color or shape conditioned learning or electric shock to induce threat or anxiety.
% The materials have a Creative Commons CC BY license so that you can use them in any way you want.
% You just need to provide an attribution (“by Zhiwei Zhang,Jingqing Nian”,DOI:10.17605/OSF.IO/M3P8Q).
% If you have any questions, please send an email to J.Q Nian(E-mail:nianjingqing@126.com).
%% Author Information
% Version 1.0 made by Zhiwei Zhang[E-mail:760861993@qq.com]
% Version 1.1 modified by Jingqing Nian[E-mail:nianjingqing@126.com]
% Version 1.2 modified by Jingqing Nian[E-mail:nianjingqing@126.com] in 13th March 2023.
% Author Unit:School of Psychology,Guizhou Normal University
%% Version History
% Version 1.0 has completed the preparation of the core process and some basic functions, such as interrupting the task when the score reaches the preset value.
% Version 1.1 modifies the code adaptively according to the parameter setting requirements of the electric shock instrument.
% Version 1.2 mainly changes is the scoring method from pressing the corresponding number keys to sliding the mouse, and further simplifies and optimizes the script.