- Timestamp:
- Mar 19, 2020 4:35:21 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_Protocol_Reduction.ipf
r1242 r1246 1043 1043 // 1044 1044 Window V_ProtocolPanel() 1045 1046 Variable sc = 1 1047 1048 if(root:Packages:NIST:VSANS:Globals:gLaptopMode == 1) 1049 sc = 0.7 1050 endif 1051 1045 1052 PauseUpdate; Silent 1 // building window... 1046 NewPanel /W=(1 280,332,1630,932) /K=1 as "VSANS Reduction Protocol"1047 ModifyPanel cbRGB=(56589,50441,50159) , fixedSize=11053 NewPanel /W=(1180*sc,332*sc,1530*sc,932*sc) /K=1 as "VSANS Reduction Protocol" 1054 ModifyPanel cbRGB=(56589,50441,50159)//, fixedSize=1 1048 1055 SetDrawLayer UserBack 1049 DrawLine 3,65 ,301,651050 DrawLine 3,157 ,301,1571051 DrawLine 3,208 ,301,2081052 DrawLine 3,257 ,301,2571053 DrawLine 3,305 ,301,3051054 DrawLine 3,350 ,301,3501055 DrawLine 3,445 ,301,4451056 DrawLine 3,513 ,301,5131057 DrawLine 3,396 ,301,3961058 1059 // 1060 Button button_help,pos={ 300,2},size={25,20},proc=V_ShowProtoHelp,title="?"1056 DrawLine 3,65*sc,301*sc,65*sc 1057 DrawLine 3,157*sc,301*sc,157*sc 1058 DrawLine 3,208*sc,301*sc,208*sc 1059 DrawLine 3,257*sc,301*sc,257*sc 1060 DrawLine 3,305*sc,301*sc,305*sc 1061 DrawLine 3,350*sc,301*sc,350*sc 1062 DrawLine 3,445*sc,301*sc,445*sc 1063 DrawLine 3,513*sc,301*sc,513*sc 1064 DrawLine 3,396*sc,301*sc,396*sc 1065 1066 // 1067 Button button_help,pos={sc*300,2*sc},size={sc*25,20*sc},proc=V_ShowProtoHelp,title="?" 1061 1068 Button button_help,help={"Show the help file for setting up a reduction protocol"} 1062 Button button_quest,pos={20,2},size={150,20},proc=V_ProtocolQuestionnaire,title="Questions"1063 Button button_quest,help={"Run through the questionnaire for setting up a reduction protocol"}1064 Button button_quest,disable=21065 1066 1067 PopupMenu popup_sam,pos={ 85,68},size={51,23},proc=V_SAMFilePopMenuProc1069 // Button button_quest,pos={sc*20,2*sc},size={sc*150,20*sc},proc=V_ProtocolQuestionnaire,title="Questions" 1070 // Button button_quest,help={"Run through the questionnaire for setting up a reduction protocol"} 1071 // Button button_quest,disable=2 1072 1073 1074 PopupMenu popup_sam,pos={sc*85,68*sc},size={sc*51,23*sc},proc=V_SAMFilePopMenuProc 1068 1075 PopupMenu popup_sam,mode=1,value= #"V_getSAMList()" 1069 PopupMenu popup_bkg,pos={ 85,164},size={51,23},proc=V_BKGFilePopMenuProc1076 PopupMenu popup_bkg,pos={sc*85,164*sc},size={sc*51,23*sc},proc=V_BKGFilePopMenuProc 1070 1077 PopupMenu popup_bkg,mode=1,value= #"V_getBGDList()" 1071 PopupMenu popup_emp,pos={ 85,213},size={51,23},proc=V_EMPFilePopMenuProc1078 PopupMenu popup_emp,pos={sc*85,213*sc},size={sc*51,23*sc},proc=V_EMPFilePopMenuProc 1072 1079 PopupMenu popup_emp,mode=1,value= #"V_getEMPList()" 1073 PopupMenu popup_div,pos={ 85,263},size={51,23},proc=V_DIVFilePopMenuProc1080 PopupMenu popup_div,pos={sc*85,263*sc},size={sc*51,23*sc},proc=V_DIVFilePopMenuProc 1074 1081 PopupMenu popup_div,mode=1,value= #"V_getDIVList()" 1075 PopupMenu popup_msk,pos={ 85,356},size={51,23},proc=V_MSKFilePopMenuProc1082 PopupMenu popup_msk,pos={sc*85,356*sc},size={sc*51,23*sc},proc=V_MSKFilePopMenuProc 1076 1083 PopupMenu popup_msk,mode=1,value= #"V_getMSKList()" 1077 1084 1078 1085 1079 CheckBox prot_check,pos={ 6,163},size={74,14},title="Background"1086 CheckBox prot_check,pos={sc*6,163*sc},size={sc*74,14*sc},title="Background" 1080 1087 CheckBox prot_check,help={"If checked, the specified background file will be included in the data reduction. If the file name is \"ask\", then the user will be prompted for the file"} 1081 1088 CheckBox prot_check,value= 1 1082 CheckBox prot_check_1,pos={ 6,215},size={71,14},title="Empty Cell"1089 CheckBox prot_check_1,pos={sc*6,215*sc},size={sc*71,14*sc},title="Empty Cell" 1083 1090 CheckBox prot_check_1,help={"If checked, the specified empty cell file will be included in the data reduction. If the file name is \"ask\", then the user will be prompted for the file"} 1084 1091 CheckBox prot_check_1,value= 1 1085 CheckBox prot_check_2,pos={ 6,263},size={72,14},title="Sensitivity"1092 CheckBox prot_check_2,pos={sc*6,263*sc},size={sc*72,14*sc},title="Sensitivity" 1086 1093 CheckBox prot_check_2,help={"If checked, the specified detector sensitivity file will be included in the data reduction. If the file name is \"ask\", then the user will be prompted for the file"} 1087 1094 CheckBox prot_check_2,value= 1 1088 CheckBox prot_check_3,pos={ 6,356},size={43,14},title="Mask"1095 CheckBox prot_check_3,pos={sc*6,356*sc},size={sc*43,14*sc},title="Mask" 1089 1096 CheckBox prot_check_3,help={"If checked, the specified mask file will be included in the data reduction. If the file name is \"ask\", then the user will be prompted for the file"} 1090 1097 CheckBox prot_check_3,value= 1 1091 CheckBox prot_check_4,pos={ 6,70},size={53,14},title="Sample"1098 CheckBox prot_check_4,pos={sc*6,70*sc},size={sc*53,14*sc},title="Sample" 1092 1099 CheckBox prot_check_4,help={"If checked, the specified sample file will be included in the data reduction. If the file name is \"ask\", then the user will be prompted for the file"} 1093 1100 CheckBox prot_check_4,value= 1 1094 CheckBox prot_check_5,pos={ 6,399},size={56,14},title="Average"1101 CheckBox prot_check_5,pos={sc*6,399*sc},size={sc*56,14*sc},title="Average" 1095 1102 CheckBox prot_check_5,help={"If checked, the specified averaging will be performed at the end of the data reduction."} 1096 1103 CheckBox prot_check_5,value= 1 1097 CheckBox prot_check_9,pos={ 6,310},size={59,14},title="Absolute"1104 CheckBox prot_check_9,pos={sc*6,310*sc},size={sc*59,14*sc},title="Absolute" 1098 1105 CheckBox prot_check_9,help={"If checked, absolute calibration will be included in the data reduction. If the parameter list is \"ask\", then the user will be prompted for absolue parameters"} 1099 1106 CheckBox prot_check_9,value= 1 1100 1107 1101 1108 1102 // Button pick_sam,pos={ 214,28},size={70,20},proc=V_PickSAMButton,title="set SAM"1109 // Button pick_sam,pos={sc*214,28*sc},size={sc*70,20*sc},proc=V_PickSAMButton,title="set SAM" 1103 1110 // Button pick_sam,help={"This button will set the file selected in the File Catalog table to be the sample file"} 1104 // Button pick_bgd,pos={ 214,75},size={70,20},proc=V_PickBGDButton,title="set BGD"1111 // Button pick_bgd,pos={sc*214,75*sc},size={sc*70,20*sc},proc=V_PickBGDButton,title="set BGD" 1105 1112 // Button pick_bgd,help={"This button will set the file selected in the File Catalog table to be the background file."} 1106 // Button pick_emp,pos={ 214,125},size={70,20},proc=V_PickEMPButton,title="set EMP"1113 // Button pick_emp,pos={sc*214,125*sc},size={sc*70,20*sc},proc=V_PickEMPButton,title="set EMP" 1107 1114 // Button pick_emp,help={"This button will set the file selected in the File Catalog table to be the empty cell file."} 1108 // Button pick_DIV,pos={ 214,173},size={70,20},proc=V_PickDIVButton,title="set DIV"1115 // Button pick_DIV,pos={sc*214,173*sc},size={sc*70,20*sc},proc=V_PickDIVButton,title="set DIV" 1109 1116 // Button pick_DIV,help={"This button will set the file selected in the File Catalog table to be the sensitivity file."} 1110 Button pick_ABS,pos={ 264,308},size={80,20},proc=V_SetABSParamsButton,title="set ABS MF"1117 Button pick_ABS,pos={sc*264,308*sc},size={sc*80,20*sc},proc=V_SetABSParamsButton,title="set ABS MF" 1111 1118 Button pick_ABS,help={"This button will prompt the user for absolute scaling parameters"} 1112 1119 1113 Button pick_ABS_B,pos={ 264,330},size={80,20},proc=V_SetABSParamsButton,title="set ABS B"1120 Button pick_ABS_B,pos={sc*264,330*sc},size={sc*80,20*sc},proc=V_SetABSParamsButton,title="set ABS B" 1114 1121 Button pick_ABS_B,help={"This button will prompt the user for absolute scaling parameters"} 1115 // Button pick_MASK,pos={ 214,266},size={70,20},proc=V_PickMASKButton,title="set MASK"1122 // Button pick_MASK,pos={sc*214,266*sc},size={sc*70,20*sc},proc=V_PickMASKButton,title="set MASK" 1116 1123 // Button pick_MASK,help={"This button will set the file selected in the File Catalog table to be the mask file."} 1117 1124 1118 1125 1119 Button pick_AVE,pos={ 188,401},size={150,20},proc=V_SetAverageParamsButtonProc,title="set AVERAGE params"1126 Button pick_AVE,pos={sc*188,401*sc},size={sc*150,20*sc},proc=V_SetAverageParamsButtonProc,title="set AVERAGE params" 1120 1127 Button pick_AVE,help={"Prompts the user for the type of 1-D averaging to perform, as well as saving options"} 1121 1128 1122 1129 1123 Button pick_trim,pos={ 264,454},size={70,20},proc=V_TrimDataProtoButton,title="Trim"1130 Button pick_trim,pos={sc*264,454*sc},size={sc*70,20*sc},proc=V_TrimDataProtoButton,title="Trim" 1124 1131 Button pick_trim,help={"This button will prompt the user for trimming parameters"} 1125 1132 1126 1133 1127 SetVariable samStr,pos={ 6,90},size={250,15},title="file:"1134 SetVariable samStr,pos={sc*6,90*sc},size={sc*250,15*sc},title="file:" 1128 1135 SetVariable samStr,help={"Filename of the sample file(s) to be used in the data reduction"} 1129 1136 SetVariable samStr,limits={-Inf,Inf,0},value= root:Packages:NIST:VSANS:Globals:Protocols:gSAM 1130 SetVariable bgdStr,pos={ 7,186},size={250,15},title="file:"1137 SetVariable bgdStr,pos={sc*7,186*sc},size={sc*250,15*sc},title="file:" 1131 1138 SetVariable bgdStr,help={"Filename of the background file(s) to be used in the data reduction"} 1132 1139 SetVariable bgdStr,limits={-Inf,Inf,0},value= root:Packages:NIST:VSANS:Globals:Protocols:gBGD 1133 SetVariable empStr,pos={ 8,236},size={250,15},title="file:"1140 SetVariable empStr,pos={sc*8,236*sc},size={sc*250,15*sc},title="file:" 1134 1141 SetVariable empStr,help={"Filename of the empty cell file(s) to be used in the data reduction"} 1135 1142 SetVariable empStr,limits={-Inf,Inf,0},value= root:Packages:NIST:VSANS:Globals:Protocols:gEMP 1136 SetVariable divStr,pos={ 9,285},size={250,15},title="file:"1143 SetVariable divStr,pos={sc*9,285*sc},size={sc*250,15*sc},title="file:" 1137 1144 SetVariable divStr,help={"Filename of the detector sensitivity file to be used in the data reduction"} 1138 1145 SetVariable divStr,limits={-Inf,Inf,0},value= root:Packages:NIST:VSANS:Globals:Protocols:gDIV 1139 SetVariable maskStr,pos={ 9,377},size={250,15},title="file:"1146 SetVariable maskStr,pos={sc*9,377*sc},size={sc*250,15*sc},title="file:" 1140 1147 SetVariable maskStr,help={"Filename of the mask file to be used in the data reduction"} 1141 1148 SetVariable maskStr,limits={-Inf,Inf,0},value= root:Packages:NIST:VSANS:Globals:Protocols:gMASK 1142 SetVariable absStr,pos={ 7,331},size={250,15},title="parameters:"1149 SetVariable absStr,pos={sc*7,331*sc},size={sc*250,15*sc},title="parameters:" 1143 1150 SetVariable absStr,help={"Keyword-string of values necessary for absolute scaling of data. Remaining parameters are taken from the sample file."} 1144 1151 SetVariable absStr,limits={-Inf,Inf,0},value= root:Packages:NIST:VSANS:Globals:Protocols:gAbsStr 1145 SetVariable aveStr,pos={ 9,424},size={250,15},title="parameters:"1152 SetVariable aveStr,pos={sc*9,424*sc},size={sc*250,15*sc},title="parameters:" 1146 1153 SetVariable aveStr,help={"Keyword-string of choices used for averaging and saving the 1-D data files"} 1147 1154 SetVariable aveStr,limits={-Inf,Inf,0},value= root:Packages:NIST:VSANS:Globals:Protocols:gAVE 1148 1155 1149 SetVariable begStr,pos={ 9,464},size={250,15},title="Beg Trim:"1156 SetVariable begStr,pos={sc*9,464*sc},size={sc*250,15*sc},title="Beg Trim:" 1150 1157 SetVariable begStr,help={"Keyword-string of choices used for averaging and saving the 1-D data files"} 1151 1158 SetVariable begStr,limits={-Inf,Inf,0},value= root:Packages:NIST:VSANS:Globals:Protocols:gBegPtsStr 1152 SetVariable endStr,pos={ 9,484},size={250,15},title="End Trim:"1159 SetVariable endStr,pos={sc*9,484*sc},size={sc*250,15*sc},title="End Trim:" 1153 1160 SetVariable endStr,help={"Keyword-string of choices used for averaging and saving the 1-D data files"} 1154 1161 SetVariable endStr,limits={-Inf,Inf,0},value= root:Packages:NIST:VSANS:Globals:Protocols:gEndPtsStr … … 1158 1165 //only show DRK if user wants to see it 1159 1166 //if global = 1,then show => set disable = 0 1160 // CheckBox prot_check_6,pos={ 6,363},size={113,14},proc=DrkCheckProc,title="Use DRK correction"1167 // CheckBox prot_check_6,pos={sc*6,363*sc},size={sc*113,14*sc},proc=DrkCheckProc,title="Use DRK correction" 1161 1168 // CheckBox prot_check_6,help={"If checked, the selected file will be used for DRK correction. Typically this is NOT checked"} 1162 1169 // CheckBox prot_check_6,value= 0,disable = (!root:Packages:NIST:gAllowDRK) 1163 // SetVariable drkStr,pos={ 120,363},size={150,15},title="."1164 // SetVariable drkStr,help={"DRK detector count file" },disable = (!root:Packages:NIST:gAllowDRK)1170 // SetVariable drkStr,pos={sc*120,363*sc},size={sc*150,15*sc},title="." 1171 // SetVariable drkStr,help={"DRK detector count file"*sc},disable = (!root:Packages:NIST:gAllowDRK) 1165 1172 // SetVariable drkStr,limits={-Inf,Inf,0},value= root:Packages:NIST:VSANS:Globals:Protocols:gDRK 1166 1173 1167 1174 1168 Button export_button, size={ 120,20},pos={125,540},title="Export to Data",proc=V_ExportFileProtocol1175 Button export_button, size={sc*120,20*sc},pos={sc*125,540*sc},title="Export to Data",proc=V_ExportFileProtocol 1169 1176 Button export_button, help={"Exports the protocol to data file on disk for Importing into another experiment"} 1170 Button import_button, size={ 120,20},pos={125,562},title="Import from Data",proc=V_ImportFileProtocol1177 Button import_button, size={sc*120,20*sc},pos={sc*125,562*sc},title="Import from Data",proc=V_ImportFileProtocol 1171 1178 Button import_button,help={"Imports a protocol from a data file on disk for use in this experiment"} 1172 Button recallProt,pos={ 7,540},size={107,20},proc=V_RecallProtocolButton,title="Recall Protocol"1179 Button recallProt,pos={sc*7,540*sc},size={sc*107,20*sc},proc=V_RecallProtocolButton,title="Recall Protocol" 1173 1180 Button recallProt,help={"Resets the panel to the file choices in a previously saved protocol"} 1174 Button del_protocol,pos={ 7,562},size={110,20},proc=V_DeleteProtocolButton,title="Delete Protocol"1181 Button del_protocol,pos={sc*7,562*sc},size={sc*110,20*sc},proc=V_DeleteProtocolButton,title="Delete Protocol" 1175 1182 Button del_protocol,help={"Use this to delete a previously saved protocol."} 1176 Button done_protocol,pos={ 285,562},size={45,20},proc=V_DoneProtocolButton,title="Done"1183 Button done_protocol,pos={sc*285,562*sc},size={sc*45,20*sc},proc=V_DoneProtocolButton,title="Done" 1177 1184 Button done_protocol,help={"This button will close the panel. The panel can be recalled at any time from the SANS menu."} 1178 Button saveProtocol,pos={ 7,518},size={100,20},proc=V_SaveProtocolButton,title="Save Protocol"1185 Button saveProtocol,pos={sc*7,518*sc},size={sc*100,20*sc},proc=V_SaveProtocolButton,title="Save Protocol" 1179 1186 Button saveProtocol,help={"Saves the cerrent selections in the panel to a protocol which can be later recalled"} 1180 Button ReduceOne,pos={ 240,518},size={100,20},proc=V_ReduceOneButton,title="Reduce A File"1187 Button ReduceOne,pos={sc*240,518*sc},size={sc*100,20*sc},proc=V_ReduceOneButton,title="Reduce A File" 1181 1188 Button ReduceOne,help={"Using the panel selections, the specified sample file will be reduced. If none is specified, the user will be prompted for a sample file"} 1182 1189 … … 2682 2689 Function V_SelectABS_XYBox(x1,x2,y1,y2) 2683 2690 Variable &x1,&x2,&y1,&y2 2691 2692 2693 Variable sc = 1 2694 2695 NVAR gLaptopMode = root:Packages:NIST:VSANS:Globals:gLaptopMode 2696 2697 if(gLaptopMode == 1) 2698 sc = 0.7 2699 endif 2684 2700 2685 2701 Variable err=0 … … 2688 2704 Variable/G root:V_left,root:V_right,root:V_bottom,root:V_top //must be global for auto-update 2689 2705 DoWindow/F SANS_Data 2690 NewPanel/K=2 /W=(139 ,341,382,432) as "Select the primary beam"2706 NewPanel/K=2 /W=(139*sc,341*sc,382*sc,432*sc) as "Select the primary beam" 2691 2707 DoWindow/C junkWindow 2692 2708 AutoPositionWindow/E/M=1/R=SANS_Data 2693 2709 2694 Drawtext 21 ,20,"Select the primary beam with the"2695 DrawText 21 ,40, "marquee and press continue"2696 Button button0,pos={ 80,58},size={92,20},title="Continue"2710 Drawtext 21*sc,20*sc ,"Select the primary beam with the" 2711 DrawText 21*sc,40*sc, "marquee and press continue" 2712 Button button0,pos={sc*80,58*sc},size={sc*92,20*sc},title="Continue" 2697 2713 Button button0,proc=V_UserSelectBox_Continue 2698 2714 … … 2725 2741 2726 2742 Function V_UseStdOrEmpForABS() 2727 2728 NewPanel/K=2 /W=(139,341,402,448) as "Absolute Scaling" 2743 2744 Variable sc = 1 2745 2746 NVAR gLaptopMode = root:Packages:NIST:VSANS:Globals:gLaptopMode 2747 2748 if(gLaptopMode == 1) 2749 sc = 0.7 2750 endif 2751 2752 NewPanel/K=2 /W=(139*sc,341*sc,402*sc,448*sc) as "Absolute Scaling" 2729 2753 DoWindow/C junkABSWindow 2730 2754 ModifyPanel cbRGB=(57346,65535,49151) 2731 2755 SetDrawLayer UserBack 2732 2756 SetDrawEnv fstyle= 1 2733 DrawText 21 ,20,"Method of absolute calibration"2734 Button button0,pos={ 52,33},size={150,20},proc=V_UserSelectABS_Continue,title="Empty Beam Flux"2735 Button button1,pos={ 52,65},size={150,20},proc=V_UserSelectABS_Continue,title="Secondary Standard"2757 DrawText 21*sc,20*sc,"Method of absolute calibration" 2758 Button button0,pos={sc*52,33*sc},size={sc*150,20*sc},proc=V_UserSelectABS_Continue,title="Empty Beam Flux" 2759 Button button1,pos={sc*52,65*sc},size={sc*150,20*sc},proc=V_UserSelectABS_Continue,title="Secondary Standard" 2736 2760 2737 2761 PauseForUser junkABSWindow
Note: See TracChangeset
for help on using the changeset viewer.