- 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_RealTimeUpdate.ipf
r1242 r1246 126 126 //draws the RT panel and enforces bounds on the SetVariable controls for update period and timeout 127 127 // 128 Proc VSANS_RT_Panel() 128 Proc VSANS_RT_Panel() 129 Variable sc = 1 130 131 if(root:Packages:NIST:VSANS:Globals:gLaptopMode == 1) 132 sc = 0.7 133 endif 134 129 135 PauseUpdate; Silent 1 // building window... 130 NewPanel /W=(300 ,350,602,580) /K=2 // force the user to close using done136 NewPanel /W=(300*sc,350*sc,602*sc,580*sc) /K=2 // force the user to close using done 131 137 DoWindow/C VSANS_RT_Panel 132 138 DoWindow/T RT_Panel,"Real Time Display Controls" 133 139 ModifyPanel cbRGB=(65535,52428,6168) 134 140 SetDrawLayer UserBack 135 SetDrawEnv fstyle= 1 136 DrawText 26 ,21,"Enter values for real-time display"137 Button bkgStart,pos={ 171,54},size={120,20},proc=V_UpdateHSTButton,title="Start Updating"141 SetDrawEnv fstyle= 1,fsize=14*sc 142 DrawText 26*sc,21*sc,"Enter values for real-time display" 143 Button bkgStart,pos={sc*171,54*sc},size={sc*120,20*sc},proc=V_UpdateHSTButton,title="Start Updating" 138 144 Button bkgStart,help={"Starts or stops the updating of the real-time SANS image"} 139 // SetVariable setvar_0,pos={ 15,29},size={100,15},proc=RT_Param_SetVarProc,title="X Center"145 // SetVariable setvar_0,pos={sc*15,29*sc},size={sc*100,15*sc},proc=RT_Param_SetVarProc,title="X Center" 140 146 // SetVariable setvar_0,help={"Set this to the current beamcenter x-coordinate (in pixels)"} 141 147 // SetVariable setvar_0,limits={0,128,0},value= root:myGlobals:RT:xCtr 142 // SetVariable setvar_1,pos={ 14,46},size={100,15},proc=RT_Param_SetVarProc,title="Y Center"148 // SetVariable setvar_1,pos={sc*14,46*sc},size={sc*100,15*sc},proc=RT_Param_SetVarProc,title="Y Center" 143 149 // SetVariable setvar_1,help={"Set this to the current beamcenter y-coordinate (in pixels)"} 144 150 // SetVariable setvar_1,limits={0,128,0},value= root:myGlobals:RT:yCtr 145 // SetVariable setvar_2,pos={ 14,64},size={100,15},proc=RT_Param_SetVarProc,title="SDD (m)"151 // SetVariable setvar_2,pos={sc*14,64*sc},size={sc*100,15*sc},proc=RT_Param_SetVarProc,title="SDD (m)" 146 152 // SetVariable setvar_2,help={"Set this to the sample-to-detector distance of the current instrument configuration"} 147 153 // SetVariable setvar_2,limits={0,1600,0},value= root:myGlobals:RT:SDD 148 // SetVariable setvar_3,pos={ 15,82},size={100,15},proc=RT_Param_SetVarProc,title="Lambda (A)"154 // SetVariable setvar_3,pos={sc*15,82*sc},size={sc*100,15*sc},proc=RT_Param_SetVarProc,title="Lambda (A)" 149 155 // SetVariable setvar_3,help={"Set this to the wavelength of the current instrument configuration"} 150 156 // SetVariable setvar_3,limits={0,30,0},value= root:myGlobals:RT:lambda 151 SetVariable setvar_4,pos={ 11,31},size={150,20},proc=V_UpdateInt_SetVarProc,title="Update Interval (s)"157 SetVariable setvar_4,pos={sc*11,31*sc},size={sc*150,20*sc},proc=V_UpdateInt_SetVarProc,title="Update Interval (s)" 152 158 SetVariable setvar_4,help={"This is the period of the update"} 153 159 SetVariable setvar_4,limits={1,3600,0},value= root:Packages:NIST:VSANS:Globals:RT:updateInt 154 // SetVariable setvar_5,pos={ 11,56},size={150,20},title="Timeout Interval (s)"160 // SetVariable setvar_5,pos={sc*11,56*sc},size={sc*150,20*sc},title="Timeout Interval (s)" 155 161 // SetVariable setvar_5,help={"After the timeout interval has expired, the update process will automatically stop"} 156 162 // SetVariable setvar_5,limits={1,3600,0},value= root:myGlobals:RT:timeout 157 Button button_1,pos={ 170,29},size={120,20},proc=V_LoadRTButtonProc,title="Load Live Data"163 Button button_1,pos={sc*170,29*sc},size={sc*120,20*sc},proc=V_LoadRTButtonProc,title="Load Live Data" 158 164 Button button_1,help={"Load the data file for real-time display"} 159 Button button_2,pos={ 250,2},size={30,20},proc=V_RT_HelpButtonProc,title="?"165 Button button_2,pos={sc*250,2*sc},size={sc*30,20*sc},proc=V_RT_HelpButtonProc,title="?" 160 166 Button button_2,help={"Display the help file for real-time controls"} 161 Button button_3,pos={ 230,200},size={60,20},proc=V_RT_DoneButtonProc,title="Done"167 Button button_3,pos={sc*230,200*sc},size={sc*60,20*sc},proc=V_RT_DoneButtonProc,title="Done" 162 168 Button button_3,help={"Closes the panel and stops the updating process"} 163 SetVariable setvar_6,pos={ 11,105},size={250,20},title="Total Detector Counts"169 SetVariable setvar_6,pos={sc*11,105*sc},size={sc*250,20*sc},title="Total Detector Counts" 164 170 SetVariable setvar_6,help={"Total counts on the detector, as displayed"},noedit=1 165 171 SetVariable setvar_6,limits={0,Inf,0},value= root:Packages:NIST:VSANS:Globals:RT:totalCounts 166 SetVariable setvar_7,pos={ 11,82},size={250,20},title=" Count Time"172 SetVariable setvar_7,pos={sc*11,82*sc},size={sc*250,20*sc},title=" Count Time" 167 173 SetVariable setvar_7,help={"Count time, as displayed"},noedit=1 168 174 SetVariable setvar_7,limits={0,Inf,0},value= root:Packages:NIST:VSANS:Globals:RT:countTime 169 SetVariable setvar_8,pos={ 11,127},size={250,20},title=" Detector Count Rate"175 SetVariable setvar_8,pos={sc*11,127*sc},size={sc*250,20*sc},title=" Detector Count Rate" 170 176 SetVariable setvar_8,help={"Count rate, as displayed"},noedit=1 171 177 SetVariable setvar_8,limits={0,Inf,0},value= root:Packages:NIST:VSANS:Globals:RT:countRate 172 SetVariable setvar_9,pos={ 11,149},size={250,20},title=" Monitor Counts"178 SetVariable setvar_9,pos={sc*11,149*sc},size={sc*250,20*sc},title=" Monitor Counts" 173 179 SetVariable setvar_9,help={"Count rate, as displayed"},noedit=1 174 180 SetVariable setvar_9,limits={0,Inf,0},value= root:Packages:NIST:VSANS:Globals:RT:monitorCounts 175 SetVariable setvar_10,pos={ 11,171},size={250,20},title=" Monitor Count Rate"181 SetVariable setvar_10,pos={sc*11,171*sc},size={sc*250,20*sc},title=" Monitor Count Rate" 176 182 SetVariable setvar_10,help={"Count rate, as displayed"},noedit=1 177 183 SetVariable setvar_10,limits={0,Inf,0},value= root:Packages:NIST:VSANS:Globals:RT:monitorCountRate … … 515 521 Function V_ShowOnlineReductionPanel() 516 522 523 Variable sc = 1 524 525 NVAR gLaptopMode = root:Packages:NIST:VSANS:Globals:gLaptopMode 526 527 if(gLaptopMode == 1) 528 sc = 0.7 529 endif 530 517 531 //check for the path 518 532 PathInfo catPathName … … 536 550 // panel 537 551 PauseUpdate; Silent 1 538 NewPanel /W=(300 ,350,702,481) /K=2 //K=2 to force exit using "done" button to exit the background procedure552 NewPanel /W=(300*sc,350*sc,702*sc,481*sc) /K=2 //K=2 to force exit using "done" button to exit the background procedure 539 553 540 554 DoWindow/C V_ORPanel … … 546 560 547 561 // filename 548 GroupBox group_Flename pos={ 6,top}, size={groupWidth,18+26}, title="select file for online reduction:"549 PopupMenu popup_Filename pos={ 12,top+18}, size={groupWidth-12-0,20}, title=""550 PopupMenu popup_Filename mode=1, value=V_GetRawDataFileList(), bodyWidth= groupWidth-12-0562 GroupBox group_Flename pos={sc*6,top*sc}, size={sc*groupWidth,(18+26)*sc}, title="select file for online reduction:" 563 PopupMenu popup_Filename pos={sc*12,(top+18)*sc}, size={sc*(groupWidth-12-0),20*sc}, title="" 564 PopupMenu popup_Filename mode=1, value=V_GetRawDataFileList(), bodyWidth=sc*(groupWidth-12-0) 551 565 PopupMenu popup_Filename proc=V_ORPopupSelectFileProc 552 566 … … 561 575 562 576 // protocol 563 GroupBox group_Protocol pos={ 6,top}, size={groupWidth,18+22}, title="select protocol for online reduction:"564 SetVariable setvar_Protocol pos={ 12,top+18}, size={groupWidth-12-18,0}, title=" "577 GroupBox group_Protocol pos={sc*6,top*sc}, size={sc*groupWidth,(18+22)*sc}, title="select protocol for online reduction:" 578 SetVariable setvar_Protocol pos={sc*12,(top+18)*sc}, size={sc*(groupWidth-12-18),0*sc}, title=" " 565 579 SetVariable setvar_Protocol value=root:Packages:NIST:VSANS:Globals:OnlineReduction:Protocol 566 580 567 Button button_SelectProtocol pos={ 12+groupWidth-12-18,top+18-1}, size={18,18}, title="...", proc=V_ORButtonSelectProtocolProc581 Button button_SelectProtocol pos={sc*(12+groupWidth-12-18),(top+18-1)*sc}, size={sc*18,18*sc}, title="...", proc=V_ORButtonSelectProtocolProc 568 582 569 583 top += 18+22+7 … … 571 585 572 586 // sart, stop, done 573 Button button_Start pos={ left + 70 * 0, top}, size={60,20}, title="Start", proc=V_ORButtonStartProc574 Button button_Stop pos={ left + 70 * 1, top}, size={60,20}, title="Stop", proc=V_ORButtonStopProc, disable=2575 Button button_Done pos={ left + 70 * 2, top}, size={60,20}, title="Done", proc=V_ORButtonDoneProc587 Button button_Start pos={sc*(left + 70 * 0), top*sc}, size={sc*60,20*sc}, title="Start", proc=V_ORButtonStartProc 588 Button button_Stop pos={sc*(left + 70 * 1), top*sc}, size={sc*60,20*sc}, title="Stop", proc=V_ORButtonStopProc, disable=2 589 Button button_Done pos={sc*(left + 70 * 2), top*sc}, size={sc*60,20*sc}, title="Done", proc=V_ORButtonDoneProc 576 590 577 591 end
Note: See TracChangeset
for help on using the changeset viewer.