905 svar /sdfr=df panel_name
907 if (strlen(panel_name) && (wintype(panel_name) == 7))
908 DoWindow /F $panel_name
912 NewPanel /K=1 /N=anglescan_panel /W=(200,50,480,874) as "angle scan processing"
915 GroupBox gb_source, title="data source"
917 Button b_source_select, help={
"select the source wave, e.g. ReducedData1. it must be in the scan or region data folder. the attr folder with the manipulator waves must be in the same folder or one level up."}
919 Button b_source_update, help={
"reload the process data from the previous source (link displayed below)"}
920 TitleBox tb_source_path, size={240,21}
921 TitleBox tb_source_path,variable= root:packages:pearl_anglescan_panel:source_path
923 GroupBox gb_offsets, title=
"offsets"
924 SetVariable sv_theta_offset, size={88,16},bodyWidth=60,title=
"theta"
925 SetVariable sv_theta_offset,value= root:packages:pearl_anglescan_panel:theta_offset
926 SetVariable sv_theta_offset, help={
"manipulator theta value that corresponds to normal emission."}
927 SetVariable sv_tilt_offset, size={74,16},bodyWidth=60,title=
"tilt"
928 SetVariable sv_tilt_offset,value= root:packages:pearl_anglescan_panel:tilt_offset
929 SetVariable sv_tilt_offset, help={
"manipulator tilt value that corresponds to normal emission."}
930 SetVariable sv_phi_offset, size={78,16},bodyWidth=60,title=
"phi"
931 SetVariable sv_phi_offset,value= root:packages:pearl_anglescan_panel:phi_offset
932 SetVariable sv_phi_offset, help={
"manipulator phi value that should map to the 3 o'clock angle."}
933 SetVariable sv_alpha_offset, size={90,16},bodyWidth=60,title=
"alpha"
934 SetVariable sv_alpha_offset,value= root:packages:pearl_anglescan_panel:alpha_offset
935 SetVariable sv_alpha_offset, help={
"alpha value that corresponds to normal emission (if the sample normal is properly aligned)."}
937 Button b_save_prefs, help={
"save settings as preferences."}
939 Button b_load_prefs, help={
"load settings from preferences."}
941 GroupBox gb_crop, title=
"crop and delete"
942 CheckBox cb_crop_enable, size={50,14}, title=
"enable"
943 CheckBox cb_crop_enable, help={
"crop at +/-alpha and +theta, delete arbitrary rows"}
944 CheckBox cb_crop_enable, variable= root:packages:pearl_anglescan_panel:crop_enable
945 SetVariable sv_crop_alpha, size={90,16},bodyWidth=60,title=
"alpha"
946 SetVariable sv_crop_alpha, limits={0,30,1},value= root:packages:pearl_anglescan_panel:crop_alpha
947 SetVariable sv_crop_alpha, help={
"alpha (detection angle) cropping angle (positive boundary), relative to normal emission"}
948 SetVariable sv_crop_theta, size={90,16},bodyWidth=60,title=
"theta"
949 SetVariable sv_crop_theta, limits={10,90,1},value= root:packages:pearl_anglescan_panel:crop_theta
950 SetVariable sv_crop_theta, help={
"theta (polar angle) upper limit, relative to normal emission"}
951 SetVariable sv_crop_rows, size={200,16},bodyWidth=160,title=
"rows"
952 SetVariable sv_crop_rows, limits={10,90,1},value= root:packages:pearl_anglescan_panel:crop_rows
953 SetVariable sv_crop_rows, help={
"rows to delete from the raw data. comma-separated point indices, hyphen for range."}
955 Button b_crop_preview, help={
"show a preview of the cropped dataset."}
957 GroupBox gb_norm_alpha, title=
"normalize alpha"
958 CheckBox cb_norm_alpha_enable, size={50,14}, title=
"enable"
959 CheckBox cb_norm_alpha_enable,variable= root:packages:pearl_anglescan_panel:norm_alpha_enable
960 CheckBox cb_norm_alpha_enable, help={
"enable normalization of the alpha distribution"}
962 PopupMenu pm_norm_alpha_mode, mode=5, popvalue=
"loess", value= #
"\"none;binomial;boxcar;scienta;loess;\""
963 PopupMenu pm_norm_alpha_mode, help={
"alpha normalization method. recommended: loess"}
964 SetVariable sv_norm_alpha_smoothing, size={112,16}, bodyWidth=60, title=
"smoothing"
965 SetVariable sv_norm_alpha_smoothing, limits={0,1,0.05}, value= root:packages:pearl_anglescan_panel:norm_alpha_smoothing
966 SetVariable sv_norm_alpha_smoothing, help={
"smoothing parameter (depends on the normalization method)."}
968 Button b_norm_alpha_check, help={
"show a graph of the normalization function"}
970 Button b_norm_alpha_preview, help={
"show a preview of the normalized dataset (without other normalizations)."}
972 GroupBox gb_norm_phi, title=
"normalize phi"
973 CheckBox cb_norm_phi_enable, size={50,14}, title=
"enable"
974 CheckBox cb_norm_phi_enable,variable= root:packages:pearl_anglescan_panel:norm_phi_enable
975 CheckBox cb_norm_phi_enable, help={
"enable normalization of the phi distribution to reduce the effect of wobble"}
976 SetVariable sv_norm_phi_range, size={118,16}, bodyWidth=60, title=
"theta range"
977 SetVariable sv_norm_phi_range, limits={0,90,1}, value= root:packages:pearl_anglescan_panel:norm_phi_thetarange
978 SetVariable sv_norm_phi_range, help={
"theta range (from normal) to factor into the normalization function"}
980 Button b_norm_phi_check, help={
"show a graph of the normalization function"}
982 Button b_norm_phi_preview, help={
"show a preview of the normalized dataset (without other normalizations)."}
984 GroupBox gb_norm_theta, title=
"normalize theta"
985 CheckBox cb_norm_theta_enable, size={50,14},title=
"enable"
986 CheckBox cb_norm_theta_enable, variable= root:packages:pearl_anglescan_panel:norm_theta_enable
987 CheckBox cb_norm_theta_enable, help={
"enable normalization of the theta distribution (integrated over phi)"}
989 PopupMenu pm_norm_theta_domain, mode=5, popvalue=
"loess", value= #
"\"global;scans;\""
990 PopupMenu pm_norm_theta_domain, help={
"smoothing domain: global or individual scans. use global unless there is a stronga or irregular phi variation."}
992 PopupMenu pm_norm_theta_mode,mode=5,popvalue=
"loess",value= #
"\"none;binomial;boxcar;polynomial;loess;\""
993 PopupMenu pm_norm_theta_mode, help={
"theta normalization method. recommended: loess"}
994 SetVariable sv_norm_theta_smoothing, size={112,16}, bodyWidth=60, title=
"smoothing"
995 SetVariable sv_norm_theta_smoothing, limits={0,1,0.05}, value= root:packages:pearl_anglescan_panel:norm_theta_smoothing
996 SetVariable sv_norm_theta_smoothing, help={
"smoothing parameter (depends on the normalization method)."}
998 Button b_norm_theta_check, help={
"show a graph of the normalization function"}
1000 Button b_norm_theta_preview, help={
"show a preview of the normalized dataset (without other normalizations)."}
1002 GroupBox gb_norm_thetaphi, size={272,97},title=
"normalize (theta,phi)"
1003 CheckBox cb_norm_thetaphi_enable, size={50,14},title=
"enable"
1004 CheckBox cb_norm_thetaphi_enable, variable= root:packages:pearl_anglescan_panel:norm_thetaphi_enable
1005 CheckBox cb_norm_thetaphi_enable, help={
"enable normalization of the (theta, phi) distribution."}
1007 PopupMenu pm_norm_thetaphi_mode, mode=5, popvalue=
"loess", value= #
"\"none;none;none;none;loess;\""
1008 PopupMenu pm_norm_thetaphi_mode, help={
"theta normalization method. recommended: loess"}
1009 SetVariable sv_norm_thetaphi_smoothing, size={112,16}, bodyWidth=60, title=
"smoothing"
1010 SetVariable sv_norm_thetaphi_smoothing, limits={0,1,0.05}, value= root:packages:pearl_anglescan_panel:norm_thetaphi_smoothing
1011 SetVariable sv_norm_thetaphi_smoothing, help={
"smoothing parameter (depends on the normalization method)."}
1013 Button b_norm_thetaphi_check, help={
"show a graph of the normalization function"}
1015 Button b_norm_thetaphi_preview, help={
"show a preview of the normalized dataset (without other normalizations)."}
1017 GroupBox gb_output, title=
"output"
1018 SetVariable sv_output_folding, size={95,16}, bodyWidth=60, title=
"folding"
1019 SetVariable sv_output_folding, limits={1,20,1}, value= root:packages:pearl_anglescan_panel:output_folding
1020 SetVariable sv_output_folding, help={
"n-fold rotational average. 1=no averaging."}
1021 SetVariable sv_output_horizon, size={98,16}, bodyWidth=60, title=
"horizon"
1022 SetVariable sv_output_horizon, limits={1,90,1}, value= root:packages:pearl_anglescan_panel:output_horizon
1023 SetVariable sv_output_horizon, help={
"highest theta to display"}
1025 PopupMenu pm_graph_projection, mode=2, popvalue=
"stereographic", value= #
"\"equidistant;stereographic;equal area;gnomonic;orthographic;\""
1026 PopupMenu pm_graph_projection, help={
"projection (theta mapping) mode"}
1028 PopupMenu pm_graph_mode, mode=2, popvalue=
"dots", value= #
"\"none;dots;none;image;\""
1029 PopupMenu pm_graph_mode, help={
"graph type: dots = coloured dots on circles; image = interpolated matrix"}
1031 Button b_output_calc, help={
"execute data processing with the enabled filters and display the diffractogram."}
1033 Button b_output_duplicate, help={
"copy the result to an arbitrary data folder."}
1035 Button b_output_itx, help={
"save the result to an igor text file (itx)."}
1037 Button b_output_etpi, help={
"save the result to a pmsco angle scan file (etpi)."}
1039 GroupBox gb_graph, title=
"graph"
1041 PopupMenu pm_graph_colortable, mode=0, value= #
"\"*COLORTABLEPOPNONAMES*\""
1042 PopupMenu pm_graph_colortable, help={
"color table to use in pseudocolor graphs."}
1043 SetVariable sv_graph_contrast, size={119,16}, bodyWidth=60, title=
"contrast (%)"
1044 SetVariable sv_graph_contrast, limits={0,25,1}, value= root:packages:pearl_anglescan_panel:graph_contrast
1045 SetVariable sv_graph_contrast, help={
"contrast value (percentile)."}
1047 Button b_graph_update, help={
"update the existing graph."}
1049 Button b_graph_png, help={
"save the graph in png format."}
1057 svar /sdfr=df panel_name
1059 variable gb_space = 2
1060 variable gb_internal_top = 16
1061 variable gb_internal_bot = 4
1062 variable line_space = 22
1080 GroupBox gb_source,pos={4,gb_top}
1081 gb_ht = gb_internal_top
1082 Button b_source_select,pos={17, gb_top + gb_ht + b_adj},size={50,20}
1083 Button b_source_update, pos={67, gb_top + gb_ht + b_adj},size={50,20}
1085 TitleBox tb_source_path,pos={18, gb_top + gb_ht + tb_adj},size={240,21}
1087 gb_ht += gb_internal_bot
1088 GroupBox gb_source, size={272,gb_ht}
1090 gb_top += gb_ht + gb_space
1091 GroupBox gb_offsets,pos={4,gb_top}
1092 gb_ht = gb_internal_top
1093 SetVariable sv_theta_offset,pos={46, gb_top + gb_ht + sv_adj},size={88,16}
1094 Button b_save_prefs,pos={186, gb_top + gb_ht + b_adj},size={80,20}
1096 SetVariable sv_tilt_offset,pos={60, gb_top + gb_ht + sv_adj},size={74,16}
1097 Button b_load_prefs,pos={186, gb_top + gb_ht + b_adj},size={80,20}
1099 SetVariable sv_phi_offset,pos={56, gb_top + gb_ht + sv_adj},size={78,16}
1101 SetVariable sv_alpha_offset,pos={44, gb_top + gb_ht + sv_adj},size={90,16}
1103 gb_ht += gb_internal_bot
1104 GroupBox gb_offsets, size={272,gb_ht}
1106 gb_top += gb_ht + gb_space
1107 GroupBox gb_crop,pos={4,gb_top}
1108 gb_ht = gb_internal_top
1109 CheckBox cb_crop_enable,pos={73, gb_top + gb_ht + cb_adj},size={50,14}
1111 SetVariable sv_crop_alpha, pos={44, gb_top + gb_ht + sv_adj}, size={90,16}
1112 Button b_crop_preview,pos={186, gb_top + gb_ht + b_adj},size={80,20}
1114 SetVariable sv_crop_theta, pos={44, gb_top + gb_ht + sv_adj}, size={90,16}
1116 SetVariable sv_crop_rows, pos={44, gb_top + gb_ht + sv_adj}, size={190,16}
1118 gb_ht += gb_internal_bot
1119 GroupBox gb_crop, size={272,gb_ht}
1121 gb_top += gb_ht + gb_space
1122 GroupBox gb_norm_alpha,pos={4,gb_top}
1123 gb_ht = gb_internal_top
1124 CheckBox cb_norm_alpha_enable,pos={73, gb_top + gb_ht + cb_adj},size={50,14}
1126 PopupMenu pm_norm_alpha_mode,pos={36, gb_top + gb_ht + pm_adj},size={138,21}
1127 Button b_norm_alpha_check,pos={186, gb_top + gb_ht + b_adj},size={80,20}
1129 SetVariable sv_norm_alpha_smoothing,pos={22, gb_top + gb_ht + sv_adj},size={112,16}
1130 Button b_norm_alpha_preview,pos={186, gb_top + gb_ht + b_adj},size={80,20}
1132 gb_ht += gb_internal_bot
1133 GroupBox gb_norm_alpha, size={272,gb_ht}
1135 gb_top += gb_ht + gb_space
1136 GroupBox gb_norm_phi,pos={4,gb_top}
1137 gb_ht = gb_internal_top
1138 CheckBox cb_norm_phi_enable,pos={73, gb_top + gb_ht + cb_adj},size={50,14}
1139 Button b_norm_phi_check,pos={186, gb_top + gb_ht + b_adj},size={80,20}
1141 SetVariable sv_norm_phi_range,pos={15, gb_top + gb_ht + sv_adj},size={118,16}
1142 Button b_norm_phi_preview,pos={186, gb_top + gb_ht + b_adj},size={80,20}
1144 gb_ht += gb_internal_bot
1145 GroupBox gb_norm_phi, size={272,gb_ht}
1147 gb_top += gb_ht + gb_space
1148 GroupBox gb_norm_theta,pos={4,gb_top}
1149 gb_ht = gb_internal_top
1150 CheckBox cb_norm_theta_enable,pos={73, gb_top + gb_ht + cb_adj},size={50,14}
1152 PopupMenu pm_norm_theta_domain, pos={35, gb_top + gb_ht + pm_adj}, size={138,21}
1153 Button b_norm_theta_check,pos={186, gb_top + gb_ht + b_adj},size={80,20}
1155 PopupMenu pm_norm_theta_mode,pos={35, gb_top + gb_ht + pm_adj},size={138,21}
1156 Button b_norm_theta_preview,pos={186, gb_top + gb_ht + b_adj},size={80,20}
1158 SetVariable sv_norm_theta_smoothing,pos={21, gb_top + gb_ht + sv_adj},size={112,16}
1160 gb_ht += gb_internal_bot
1161 GroupBox gb_norm_theta, size={272,gb_ht}
1163 gb_top += gb_ht + gb_space
1164 GroupBox gb_norm_thetaphi,pos={4,gb_top}
1165 gb_ht = gb_internal_top
1166 CheckBox cb_norm_thetaphi_enable,pos={73, gb_top + gb_ht + cb_adj},size={50,14}
1168 PopupMenu pm_norm_thetaphi_mode,pos={35, gb_top + gb_ht + pm_adj},size={138,21}
1169 Button b_norm_thetaphi_check,pos={186, gb_top + gb_ht + b_adj},size={80,20}
1171 SetVariable sv_norm_thetaphi_smoothing,pos={21, gb_top + gb_ht + sv_adj},size={112,16}
1172 Button b_norm_thetaphi_preview,pos={186, gb_top + gb_ht + b_adj},size={80,20}
1174 gb_ht += gb_internal_bot
1175 GroupBox gb_norm_thetaphi, size={272,gb_ht}
1177 gb_top += gb_ht + gb_space
1178 GroupBox gb_output,pos={4,gb_top}
1179 gb_ht = gb_internal_top
1180 SetVariable sv_output_folding,pos={38, gb_top + gb_ht + sv_adj},size={95,16}
1181 Button b_output_calc,pos={186, gb_top + gb_ht + b_adj},size={80,20}
1183 SetVariable sv_output_horizon,pos={35, gb_top + gb_ht + sv_adj},size={98,16}
1184 Button b_output_duplicate,pos={186, gb_top + gb_ht + b_adj},size={80,20}
1186 PopupMenu pm_graph_projection,pos={24, gb_top + gb_ht + pm_adj},size={149,21}
1187 Button b_output_itx,pos={186, gb_top + gb_ht + b_adj},size={80,20}
1189 PopupMenu pm_graph_mode,pos={44, gb_top + gb_ht + pm_adj},size={129,21}
1190 Button b_output_etpi,pos={186, gb_top + gb_ht + b_adj},size={80,20}
1192 gb_ht += gb_internal_bot
1193 GroupBox gb_output, size={272,gb_ht}
1195 gb_top += gb_ht + gb_space
1196 GroupBox gb_graph,pos={4,gb_top}
1197 gb_ht = gb_internal_top
1198 PopupMenu pm_graph_colortable,pos={21, gb_top + gb_ht + pm_adj},size={152,21}
1199 Button b_graph_update,pos={186, gb_top + gb_ht + b_adj},size={80,20}
1201 SetVariable sv_graph_contrast,pos={14, gb_top + gb_ht + sv_adj},size={119,16}
1202 Button b_graph_png,pos={186, gb_top + gb_ht + b_adj},size={80,20}
1204 gb_ht += gb_internal_bot
1205 GroupBox gb_graph, size={272,gb_ht}
1207 gb_top += gb_ht + gb_space