Changeset 433
- Timestamp:
- Oct 29, 2008 1:36:20 PM (14 years ago)
- Location:
- sans/Dev/trunk/NCNR_User_Procedures
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
sans/Dev/trunk/NCNR_User_Procedures/Common/NCNR_Package_Loader.ipf
r428 r433 39 39 SVAR gMenuStr1b = root:Packages:NCNRItemStr1b 40 40 41 String SANSAna_WinList = "wrapperPanel;Procedure_List;" 41 42 strswitch(itemStr) // string switch 42 43 case "Load NCNR Analysis Macros": … … 82 83 break 83 84 case "Hide NCNR Analysis Macros": 84 DoWindow wrapperPanel 85 if(V_Flag) 86 DoWindow/HIDE=1 wrapperPanel 87 endif 88 DoWindow Procedure_List 89 If(V_Flag) 90 DoWindow/HIDE=1 Procedure_List 91 endif 85 HideShowWindowsInList(SANSAna_WinList,1) 92 86 93 87 gMenuStr1a = "Show NCNR Analysis Macros" … … 97 91 98 92 break 99 case "Show NCNR Analysis Macros": 100 DoWindow wrapperPanel 101 if(V_Flag) 102 DoWindow/HIDE=0 wrapperPanel 103 endif 104 DoWindow Procedure_List 105 If(V_Flag) 106 DoWindow/HIDE=0 Procedure_List 107 endif 93 case "Show NCNR Analysis Macros": 94 HideShowWindowsInList(SANSAna_WinList,0) 108 95 109 96 gMenuStr1a = "Hide NCNR Analysis Macros" … … 134 121 SVAR gMenuStr2b = root:Packages:NCNRItemStr2b 135 122 123 String SANSRed_WinList = "Main_Panel;" 136 124 strswitch(itemStr) // string switch 137 125 case "Load NCNR SANS Reduction Macros": … … 161 149 162 150 break 163 case "Hide NCNR SANS Reduction Macros": 164 DoWindow Main_Panel 165 if(V_Flag) 166 DoWindow/HIDE=1 Main_Panel 167 endif 151 case "Hide NCNR SANS Reduction Macros": 152 HideShowWindowsInList(SANSRed_WinList,1) 168 153 169 154 gMenuStr2a = "Show NCNR SANS Reduction Macros" … … 174 159 break 175 160 case "Show NCNR SANS Reduction Macros": 176 DoWindow Main_Panel 177 if(V_Flag) 178 DoWindow/HIDE=0 Main_Panel 179 endif 161 HideShowWindowsInList(SANSRed_WinList,0) 180 162 181 163 gMenuStr2a = "Hide NCNR SANS Reduction Macros" … … 205 187 SVAR gMenuStr3b = root:Packages:NCNRItemStr3b 206 188 189 String USANS_WinList = "USANS_Panel;COR_Graph;RawDataWin;Desmear_Graph;" 190 207 191 strswitch(itemStr) // string switch 208 192 case "Load NCNR USANS Reduction Macros": … … 233 217 break 234 218 case "Hide NCNR USANS Reduction Macros": 235 DoWindow USANS_Panel 236 if(V_Flag) 237 DoWindow/HIDE=1 USANS_Panel 238 endif 219 HideShowWindowsInList(USANS_WinList,1) 239 220 240 221 gMenuStr3a = "Show NCNR USANS Reduction Macros" … … 244 225 245 226 break 246 case "Show NCNR USANS Reduction Macros": 247 DoWindow USANS_Panel 248 if(V_Flag) 249 DoWindow/HIDE=0 USANS_Panel 250 endif 251 227 case "Show NCNR USANS Reduction Macros": 228 HideShowWindowsInList(USANS_WinList,0) 229 252 230 gMenuStr3a = "Hide NCNR USANS Reduction Macros" 253 231 // gMenuStr3b = "Unload NCNR USANS Reduction Macros" … … 262 240 end 263 241 242 // 1 = hide, 0 = show 243 Function HideShowWindowsInList(list,hide) 244 String list 245 Variable hide 246 247 String item 248 Variable ii,num=ItemsinList(list) 249 for(ii=0;ii<num;ii+=1) 250 item = StringFromList(ii, list , ";") 251 DoWindow $item 252 if(V_Flag) 253 DoWindow/HIDE=(hide) $item 254 endif 255 endfor 256 return(0) 257 End -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/USANS/COR_Graph.ipf
r404 r433 29 29 if(V_flag==0) 30 30 //draw the blank window and the control bar 31 Display /W=(5,42,450,5 00) /K=131 Display /W=(5,42,450,550) /K=1 32 32 DoWindow/C COR_Graph 33 ControlBar 1 0033 ControlBar 150 34 34 SetVariable gTransWide,pos={210,12},size={135,15},title="Trans - Wide",format="%5.4f" 35 35 SetVariable gTransWide,help={"Average counts on transmssion detector at wide angles"} … … 71 71 ValDisplay valdispEMP,help={"Displays the peak angle the raw EMP data, determined automatically"} 72 72 73 CheckBox check0 title="Log X-axis",proc=LogLinToggleCheckProc 74 CheckBox check0 pos={12,100},value=0,mode=0 75 SetVariable setvar0,pos={210,100},size={120,20},title="Trock/Twide",format="%5.4f" 76 SetVariable setVar0,help={"fraction of unscattered neutrons"} 77 SetVariable setVar0,limits={0,2,0},value= $(USANSFolder+":Globals:MainPanel:gTransRatio") 78 73 79 Legend 74 80 Endif … … 364 370 Variable/G $(USANSFolder+":Globals:MainPanel:gTransRock")=samRock/empRock 365 371 372 TransRatio() //calculate the ratio and update 373 366 374 return(0) 367 375 End … … 403 411 RePlotWithUserAngle(type,newPkAngle) 404 412 End 413 414 Function TransRatio() 415 NVAR tr = root:Packages:NIST:USANS:Globals:MainPanel:gTransRock 416 NVAR tw = root:Packages:NIST:USANS:Globals:MainPanel:gTransWide 417 NVAR rat = root:Packages:NIST:USANS:Globals:MainPanel:gTransRatio 418 419 rat = tr/tw 420 if(rat < 0.9) 421 SetVariable setVar0 labelBack=(65535,32768,32768) 422 else 423 SetVariable setVar0 labelBack=0 424 endif 425 return(0) 426 End 427 428 Function LogLinToggleCheckProc(cba) : CheckBoxControl 429 STRUCT WMCheckboxAction &cba 430 431 switch( cba.eventCode ) 432 case 2: // mouse up 433 Variable checked = cba.checked 434 if(checked) 435 ModifyGraph log(bottom)=1 436 else 437 ModifyGraph log(bottom)=0 438 endif 439 break 440 endswitch 441 442 return 0 443 End 444 405 445 406 446 //returns the peak location found (and used) for zero angle -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/USANS/Main_USANS.ipf
r432 r433 82 82 Variable/G gThick = 0.1 83 83 Variable/G gTypeCheck=1 84 Variable/G gTransRatio=1 84 85 //Text filter for data files AJJ Sept 06 85 86 String/G FilterStr
Note: See TracChangeset
for help on using the changeset viewer.