function import_data_delta_mode(immersion_depth,diameter,delta_t,amplification) variable immersion_depth,diameter,delta_t,amplification wave Channel_1,Channel_2 // The values for immersion_depth and diameter have to be in centimeters !! Both !! variable lateralArea = immersion_depth * Pi * diameter // variable facialArea = ( diameter /2 ) * ( diameter /2 ) * Pi variable totalArea = facialArea + lateralArea SetScale/P x 0,delta_t,"", Channel_1,Channel_2 duplicate /o Channel_1,potential duplicate /o Channel_2,current current = Channel_2 / amplification // duplicate /o current,current_density current_density = current / totalArea KillWaves Channel_1,Channel_2,current end function plot_cv(measurement_number) variable measurement_number string directory_name directory_name = "root:m" + num2str(measurement_number) print "present working directory is " + directory_name SetDataFolder directory_name wave current_density,potential Display /K=1 potential as "Temporal behaviour " + directory_name ModifyGraph tick=2,mirror=2,fStyle=1,fSize=10,prescaleExp(left)=0,btLen=3;DelayUpdate ModifyGraph width=226.772,height=170.079,expand=1.5 ShowInfo Label bottom "Time [s]" Label left "Potential [V]" ModifyGraph axRGB(left)=(0,15872,65280),tlblRGB(left)=(0,15872,65280);DelayUpdate ModifyGraph alblRGB(left)=(0,15872,65280) ModifyGraph rgb=(0,15872,65280) AppendToGraph/R current_density Label right " Current [\UA cm \S-2 \M]" ModifyGraph tick=2,fStyle=1,fSize=10,font(right)="Arial",axRGB(right)=(65280,0,0);DelayUpdate ModifyGraph tlblRGB(right)=(65280,0,0),alblRGB(right)=(65280,0,0);DelayUpdate ShowInfo Display /k=1 current_density vs potential as "Cyclic Voltammogram " + directory_name ModifyGraph tick=2,mirror=2,fStyle=1,fSize=10,prescaleExp(left)=6,btLen=3;DelayUpdate ModifyGraph width=226.772,height=170.079,expand=1.5 ShowInfo Label bottom "Potential [V]" Label left " Current [\UA cm \S-2 \M]" ModifyGraph rgb=(0,0,0) SetDataFolder "root:" end function plot_smooth_cv(measurement_number,smoothing_grade) variable measurement_number,smoothing_grade string directory_name directory_name = "root:m" + num2str(measurement_number) print "present working directory is " + directory_name SetDataFolder directory_name wave current_density,potential Duplicate/o :potential,potential_smth; Smooth smoothing_grade, potential_smth Duplicate/o :current_density,current_density_smth; Smooth smoothing_grade, current_density_smth print ("I used smothing grade" + num2str(smoothing_grade)) Display /K=1 potential_smth as "Temporal behaviour " + directory_name ModifyGraph tick=2,mirror=2,fStyle=1,fSize=10,prescaleExp(left)=0,btLen=3;DelayUpdate ModifyGraph width=226.772,height=170.079,expand=1.5 ShowInfo Label bottom "Time [s]" Label left "potential_smth [V]" ModifyGraph axRGB(left)=(0,15872,65280),tlblRGB(left)=(0,15872,65280);DelayUpdate ModifyGraph alblRGB(left)=(0,15872,65280) ModifyGraph rgb=(0,15872,65280) AppendToGraph/R current_density Label right " Current [\UA cm \S-2 \M]" ModifyGraph tick=2,fStyle=1,fSize=10,font(right)="Arial",axRGB(right)=(65280,0,0);DelayUpdate ModifyGraph tlblRGB(right)=(65280,0,0),alblRGB(right)=(65280,0,0);DelayUpdate ShowInfo string potential_smth_grade = "potential_smth_" + num2str(smoothing_grade) duplicate /o potential_smth, $potential_smth_grade string current_density_smth_grade = "current_density_smth_" + num2str(smoothing_grade) duplicate /o current_density_smth, $current_density_smth_grade Display /k=1 $current_density_smth_grade vs $potential_smth_grade as "Cyclic Voltammogram " + directory_name + " " + num2str(smoothing_grade) ModifyGraph tick=2,mirror=2,fStyle=1,fSize=10,prescaleExp(left)=6,btLen=3;DelayUpdate ModifyGraph width=226.772,height=170.079,expand=1.5 ShowInfo Label bottom "Potential smth [V]" Label left " Current smth [\UA cm \S-2 \M]" ModifyGraph rgb=(0,0,0) print current_density_smth_grade print "Kontrolle" //SetDataFolder "root:" end function compare_cv(first_measurement_number,second_measurement_number) variable first_measurement_number,second_measurement_number string first_directory_name first_directory_name = "root:m" + num2str(first_measurement_number) print "present working directory is " + first_directory_name string second_directory_name second_directory_name = "root:m" + num2str(second_measurement_number) print "present working directory is " + second_directory_name SetDataFolder first_directory_name wave current_density,potential ShowInfo Display /k=1 current_density vs potential as "Comparing" + first_directory_name + " black trace and " + second_directory_name + " red trace" ModifyGraph tick=2,mirror=2,fStyle=1,fSize=10,prescaleExp(left)=6,btLen=3;DelayUpdate ModifyGraph width=226.772,height=170.079,expand=1.5 ShowInfo Label bottom "Potential [V]" Label left "Current [\UA cm \S-2 \M]" ModifyGraph rgb=(0,0,0) SetDataFolder second_directory_name wave current_density,potential AppendtoGraph current_density vs potential SetDataFolder first_directory_name end function plot_cv_section(measurement_number) // this function requires cursors A und B to be set on a Current_density vs. Time plot variable measurement_number string directory_name directory_name = "root:m" + num2str(measurement_number) print "Data are from " + directory_name SetDataFolder directory_name wave current_density,potential string potential_section="pot_" + num2str(trunc(xcsr(A))) + "_to_" + num2str(trunc(xcsr(B))) string current_density_section="cur_density_" + num2str(trunc(xcsr(A))) + "_to_" + num2str(trunc(xcsr(B))) print(potential_section) print(current_density_section) //make /o/N=1 $potential_section duplicate /o/R=[pcsr(A),pcsr(B)] potential,$potential_section duplicate /o/R=[pcsr(A),pcsr(B)] current_density,$current_density_section string plot_title = "CV section" + directory_name+ " time from " + num2str(xcsr(A)) + " to " + num2str(xcsr(B)) Display /k=1 $current_density_section vs $potential_section as plot_title ModifyGraph tick=2,mirror=2,fStyle=1,fSize=10,prescaleExp(left)=6,btLen=3;DelayUpdate ModifyGraph width=226.772,height=170.079,expand=1.5 ShowInfo Label bottom "Potential [V]" Label left "Current [\UA cm \S-2 \M]" ModifyGraph rgb=(0,0,0) end