- Timestamp:
- Jun 24, 2013 4:29:54 PM (10 years ago)
- Location:
- sans/Dev/trunk/NCNR_User_Procedures/Reduction/Polarization
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
sans/Dev/trunk/NCNR_User_Procedures/Reduction/Polarization/Pol_FlipperPanel.ipf
r867 r915 40 40 DrawFlipperPanel() 41 41 endif 42 // be sure that the panel is onscreen 43 DoIgorMenu "Control","Retrieve Window" 42 44 end 43 45 … … 62 64 63 65 PauseUpdate; Silent 1 // building window... 64 NewPanel /W=( 1023,44,1832,526)/N=FlipperPanel/K=1 as "Flipper and Supermirror"66 NewPanel /W=(250,44,1056,480)/N=FlipperPanel/K=1 as "Flipper and Supermirror" 65 67 ModifyPanel cbRGB=(1,52428,26586) 66 68 67 PopupMenu popup_0,pos={ 32,18},size={49,20},title="Field Condition",proc=FlipperPanelPopMenuProc69 PopupMenu popup_0,pos={13,8},size={49,20},title="Field Condition",proc=FlipperPanelPopMenuProc 68 70 PopupMenu popup_0,mode=1,value= #"D_ConditionNameList()" 69 71 70 Button button_0,pos={ 42,310},size={100,20},proc=FlipperAverageButtonProc,title="Do Average"71 72 GroupBox group_0,pos={ 39,350},size={335,103},title="AVERAGED RESULTS",fSize=1072 Button button_0,pos={18,288},size={100,20},proc=FlipperAverageButtonProc,title="Do Average" 73 74 GroupBox group_0,pos={18,316},size={290,102},title="AVERAGED RESULTS",fSize=10 73 75 GroupBox group_0,fStyle=1 74 SetVariable setvar_0,pos={ 49,385},size={250,15},title="Sam_depol*Psm*Pf"76 SetVariable setvar_0,pos={33,351},size={250,15},title="Sam_depol*Psm*Pf" 75 77 SetVariable setvar_0,fStyle=1 76 78 SetVariable setvar_0,limits={0,0,0},value= root:Packages:NIST:Polarization:Cells:gPsmPf 77 SetVariable setvar_1,pos={ 49,417},size={250,15},title="Sam_depol*Psm",fStyle=179 SetVariable setvar_1,pos={33,383},size={250,15},title="Sam_depol*Psm",fStyle=1 78 80 SetVariable setvar_1,limits={0,0,0},value= root:Packages:NIST:Polarization:Cells:gPsm 79 81 // SetVariable setvar_2,pos={560,518},size={200,13},title="Gamma (h)",fStyle=1 … … 84 86 85 87 86 Button button_1,pos={320,17},size={120,20},proc=AddFlipperConditionButton,title="Add Condition" 87 Button button_2,pos={403,295},size={110,20},proc=ClearAllFlipperWavesButton,title="Clear Table" 88 Button button_3,pos={183,310},size={120,20},proc=ShowFlipperCalcButton,title="Show Calc" 89 Button button_4,pos={540,295},size={110,20},proc=ClearFlipperRowButton,title="Clear Row" 90 Button button_5,pos={620,18},size={30,20},proc=FlipperHelpParButtonProc,title="?" 91 Button button_6,pos={488,418},size={100,20},proc=WindowSnapshotButton,title="Snapshot" 92 Button button_7,pos={488,380},size={130,20},proc=ManualEnterPfPsmButton,title="Manual Entry" 93 88 Button button_1,pos={322,8},size={120,20},proc=AddFlipperConditionButton,title="Add Condition" 89 Button button_2,pos={482,323},size={110,20},proc=ClearAllFlipperWavesButton,title="Clear Table" 90 Button button_3,pos={330,288},size={110,20},proc=ShowFlipperCalcButton,title="Show Calc" 91 Button button_4,pos={482,288},size={110,20},proc=ClearFlipperRowButton,title="Clear Row" 92 Button button_5,pos={759,8},size={30,20},proc=FlipperHelpParButtonProc,title="?" 93 Button button_6,pos={328,358},size={110,20},proc=WindowSnapshotButton,title="Snapshot" 94 Button button_7,pos={331,323},size={110,20},proc=ManualEnterPfPsmButton,title="Manual Entry" 95 96 Button button_8,pos={615,288},size={110,20},proc=SaveFlipperPanelButton,title="Save State" 97 Button button_9,pos={615,323},size={110,20},proc=RestoreFlipperPanelButton,title="Restore State" 98 94 99 // table 95 Edit/W=(14, 55,794,275)/HOST=#100 Edit/W=(14,40,794,275)/HOST=# 96 101 ModifyTable format=1,width=0 97 102 RenameWindow #,T0 … … 101 106 return(0) 102 107 End 108 109 Function SaveFlipperPanelButton(ba) : ButtonControl 110 STRUCT WMButtonAction &ba 111 112 switch( ba.eventCode ) 113 case 2: // mouse up 114 // click code here 115 SaveFlipperTable() 116 break 117 case -1: // control being killed 118 break 119 endswitch 120 121 return 0 122 End 123 124 Function RestoreFlipperPanelButton(ba) : ButtonControl 125 STRUCT WMButtonAction &ba 126 127 switch( ba.eventCode ) 128 case 2: // mouse up 129 // click code here 130 RestoreFlipperTable() 131 break 132 case -1: // control being killed 133 break 134 endswitch 135 136 return 0 137 End 138 103 139 104 140 // now, this does not depend on the cell, just the condition … … 1117 1153 1118 1154 Variable refnum 1119 String fname="CellParamSaveState .itx"1155 String fname="CellParamSaveState" 1120 1156 // WAVE w=root:testMat 1121 1157 WAVE/T cellName=root:Packages:NIST:Polarization:Cells:CellName … … 1126 1162 WAVE err_mu=root:Packages:NIST:Polarization:Cells:err_mu 1127 1163 1128 Open/P=home refnum //as fname // creates a new file, or overwrites the existing file 1164 // get the full path to the new file name before creating it 1165 fname = DoSaveFileDialog("Save the Cell Table",fname=fname,suffix=".itx") 1166 If(cmpstr(fname,"")==0) 1167 //user cancel, don't write out a file 1168 Close/A 1169 Abort "no data file was written" 1170 Endif 1171 1172 Open/P=home refnum as fname // creates a new file, or overwrites the existing file 1173 1129 1174 fprintf refNum,"IGOR\r" 1130 1175 … … 1179 1224 Variable num,ii,refnum 1180 1225 1181 fname = "CellDecayPanelSaveState .itx"1226 fname = "CellDecayPanelSaveState" 1182 1227 1183 1228 // get a list of the Decay waves … … 1186 1231 // print listStr 1187 1232 1188 Open/P=home refnum // as fname // creates a new file, or overwrites the existing file 1233 // get the full path to the new file name before creating it 1234 fname = DoSaveFileDialog("Save the Cell Decay Table",fname=fname,suffix=".itx") 1235 If(cmpstr(fname,"")==0) 1236 //user cancel, don't write out a file 1237 Close/A 1238 Abort "no data file was written" 1239 Endif 1240 1241 Open/P=home refnum as fname // creates a new file, or overwrites the existing file 1189 1242 fprintf refNum,"IGOR\r" 1190 1243 … … 1284 1337 Variable num,ii,refnum 1285 1338 1286 fname = "FlipperPanelSaveState .itx"1339 fname = "FlipperPanelSaveState" 1287 1340 1288 1341 // get a list of the "Condition" waves … … 1291 1344 // print listStr 1292 1345 1346 // get the full path to the new file name before creating it 1347 fname = DoSaveFileDialog("Save the Flipper State Table",fname=fname,suffix=".itx") 1348 If(cmpstr(fname,"")==0) 1349 //user cancel, don't write out a file 1350 Close/A 1351 Abort "no data file was written" 1352 Endif 1353 1293 1354 Open/P=home refnum // as fname // creates a new file, or overwrites the existing file 1294 1355 fprintf refNum,"IGOR\r" -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/Polarization/Pol_PolarizationCorrection.ipf
r867 r915 82 82 restore=Initialize_PolCorPanel() 83 83 PolCor_Panel() 84 85 // be sure that the panel is onscreen 86 DoIgorMenu "Control","Retrieve Window" 87 84 88 SetWindow PolCor_Panel hook(kill)=PolCorPanelHook //to save the state when panel is killed 85 89 //disable the controls on other tabs … … 131 135 Variable num,ii,refnum 132 136 133 fname = "PolCorPanelSaveState .itx"137 fname = "PolCorPanelSaveState" 134 138 135 139 // get a list of the List waves … … 138 142 // print listStr 139 143 144 145 // get the full path to the new file name before creating it 146 fname = DoSaveFileDialog("Save the Pol_Cor Panel State",fname=fname,suffix=".itx") 147 If(cmpstr(fname,"")==0) 148 //user cancel, don't write out a file 149 Close/A 150 Abort "no data file was written" 151 Endif 152 153 140 154 Open/P=home refnum// as fname // creates a new file, or overwrites the existing file 141 155 fprintf refNum,"IGOR\r" … … 327 341 Window PolCor_Panel() 328 342 PauseUpdate; Silent 1 // building window... 329 NewPanel /W=( 925,44,1662,800) /K=1343 NewPanel /W=(300,44,1036,624) /K=1 as "Polarization Correction" 330 344 ModifyPanel cbRGB=(64349,63913,44660) 331 345 // ShowTools/A 332 346 SetDrawEnv linethick= 2.00 333 DrawLine 1 0,510,600,510334 335 TabControl PolCorTab,pos={15,2 7},size={708,401},proc=PolCorTabProc347 DrawLine 11,427,696,427 348 349 TabControl PolCorTab,pos={15,20},size={515,360},proc=PolCorTabProc 336 350 TabControl PolCorTab,tabLabel(0)="SAM",tabLabel(1)="EMP",tabLabel(2)="BGD" 337 351 TabControl PolCorTab,value= 0 338 352 339 353 // always visible 340 Button button0,pos={26,445},size={80,20},proc=LoadRawPolarizedButton,title="Load ..." 341 Button button1,pos={26,473},size={130,20},proc=PolCorButton,title="Pol Correct Data" 342 Button button2,pos={222,445},size={130,20},proc=ShowPolMatrixButton,title="Show Coef Matrix" 343 Button button3,pos={222,473},size={160,20},proc=ChangeDisplayedPolData,title="Change Displayed Data" 344 Button button4,pos={620,18},size={30,20},proc=PolCorHelpParButtonProc,title="?" 345 Button button12,pos={440,473},size={120,20},proc=Display4XSButton,title="Display 4 XS" 346 Button button13,pos={440,446},size={120,20},proc=ClearPolCorEntries,title="Clear Entries" 347 348 349 350 TitleBox title0,pos={100,66},size={24,24},title="\\f01UU or + +",fSize=12 351 TitleBox title1,pos={430,66},size={24,24},title="\\f01DU or - +",fSize=12 352 TitleBox title2,pos={100,250},size={25,24},title="\\f01DD or - -",fSize=12 353 TitleBox title3,pos={430,250},size={24,24},title="\\f01UD or + -",fSize=12 354 Button button0,pos={23,396},size={80,20},proc=LoadRawPolarizedButton,title="Load ..." 355 Button button1,pos={136,397},size={130,20},proc=PolCorButton,title="Pol Correct Data" 356 Button button2,pos={546,92},size={130,20},proc=ShowPolMatrixButton,title="Show Coef Matrix" 357 Button button3,pos={546,151},size={160,20},proc=ChangeDisplayedPolData,title="Change Display Data" 358 Button button4,pos={503,9},size={30,20},proc=PolCorHelpParButtonProc,title="?" 359 Button button12,pos={546,121},size={120,20},proc=Display4XSButton,title="Display 4 XS" 360 Button button13,pos={360,9},size={110,20},proc=ClearPolCorEntries,title="Clear Entries" 361 362 363 TitleBox title0,pos={100,48},size={24,24},title="\\f01UU or + +",fSize=12 364 TitleBox title1,pos={380,48},size={24,24},title="\\f01DU or - +",fSize=12 365 TitleBox title2,pos={100,210},size={25,24},title="\\f01DD or - -",fSize=12 366 TitleBox title3,pos={380,210},size={24,24},title="\\f01UD or + -",fSize=12 354 367 355 368 // bits to set up reduction protocol 356 Button button5,pos={12 6,560},size={100,20},proc=PickDIVButton,title="set DIV file"369 Button button5,pos={129,458},size={100,20},proc=PickDIVButton,title="set DIV file" 357 370 Button button5,help={"This button will set the file selected in the File Catalog table to be the sensitivity file."} 358 Button button6,pos={12 6,590},size={100,20},proc=PickMASKButton,title="set MASK file"371 Button button6,pos={129,482},size={100,20},proc=PickMASKButton,title="set MASK file" 359 372 Button button6,help={"This button will set the file selected in the File Catalog table to be the mask file."} 360 Button button7,pos={12 6,620},size={110,20},proc=SetABSParamsButton,title="set ABS params"373 Button button7,pos={129,506},size={110,20},proc=SetABSParamsButton,title="set ABS params" 361 374 Button button7,help={"This button will prompt the user for absolute scaling parameters"} 362 Button button8,pos={12 6,650},size={150,20},proc=SetAverageParamsButtonProc,title="set AVERAGE params"375 Button button8,pos={129,530},size={150,20},proc=SetAverageParamsButtonProc,title="set AVERAGE params" 363 376 Button button8,help={"Prompts the user for the type of 1-D averaging to perform, as well as saving options"} 364 Button button9,pos={ 80,690},size={120,20},proc=ReducePolCorDataButton,title="Reduce Data"377 Button button9,pos={581,515},size={120,20},proc=ReducePolCorDataButton,title="Reduce Data" 365 378 Button button9,help={"Reduce PolCor data"} 366 Button button10,pos={ 226,690},size={120,20},proc=SavePolCorProtocolButton,title="Save Protocol"379 Button button10,pos={581,460},size={120,20},proc=SavePolCorProtocolButton,title="Save Protocol" 367 380 Button button10,help={"Save the PolCor protocol, within this experiment only"} 368 Button button11,pos={ 370,690},size={120,20},proc=RecallPolCorProtocolButton,title="Recall Protocol"369 Button button11,help={"Recall a PolCor protocol from memory"} 370 Button button14,pos={ 226,720},size={120,20},proc=ExportPolCorProtocolButton,title="Export Protocol"381 Button button11,pos={546,333},size={120,20},proc=RecallPolCorProtocolButton,title="Recall Protocol" 382 Button button11,help={"Recall a PolCor protocol from memory"} 383 Button button14,pos={546,303},size={120,20},proc=ExportPolCorProtocolButton,title="Export Protocol" 371 384 Button button14,help={"Export the PolCor protocol, saving it on disk"} 372 Button button15,pos={ 370,720},size={120,20},proc=ImportPolCorProtocolButton,title="Import Protocol"385 Button button15,pos={546,363},size={120,20},proc=ImportPolCorProtocolButton,title="Import Protocol" 373 386 Button button15,help={"Import a PolCor protocol from a protocol previously saved to disk"} 374 375 SetVariable setvar0,pos={322,560},size={250,15},title="file:" 387 Button button16,pos={546,216},size={110,20},proc=SavePolCorPanelButton,title="Save State" 388 Button button16,help={"Save the state of the panel for later recall"} 389 Button button17,pos={546,245},size={110,20},proc=RestorePolCorPanelButton,title="Restore State" 390 Button button17,help={"Recall a saved state of the Pol_Cor panel"} 391 392 SetVariable setvar0,pos={303,458},size={250,15},title="file:" 376 393 SetVariable setvar0,help={"Filename of the detector sensitivity file to be used in the data reduction"} 377 SetVariable setvar0,limits={- Inf,Inf,0},value= root:myGlobals:Protocols:gDIV378 SetVariable setvar1,pos={3 22,590},size={250,15},title="file:"394 SetVariable setvar0,limits={-inf,inf,0},value= root:myGlobals:Protocols:gDIV 395 SetVariable setvar1,pos={303,483},size={250,15},title="file:" 379 396 SetVariable setvar1,help={"Filename of the mask file to be used in the data reduction"} 380 SetVariable setvar1,limits={- Inf,Inf,0},value= root:myGlobals:Protocols:gMASK381 SetVariable setvar2,pos={3 22,620},size={250,15},title="parameters:"397 SetVariable setvar1,limits={-inf,inf,0},value= root:myGlobals:Protocols:gMASK 398 SetVariable setvar2,pos={303,509},size={250,15},title="parameters:" 382 399 SetVariable setvar2,help={"Keyword-string of values necessary for absolute scaling of data. Remaining parameters are taken from the sample file."} 383 SetVariable setvar2,limits={- Inf,Inf,0},value= root:myGlobals:Protocols:gAbsStr384 SetVariable setvar3,pos={3 22,650},size={250,15},title="parameters:"400 SetVariable setvar2,limits={-inf,inf,0},value= root:myGlobals:Protocols:gAbsStr 401 SetVariable setvar3,pos={303,535},size={250,15},title="parameters:" 385 402 SetVariable setvar3,help={"Keyword-string of choices used for averaging and saving the 1-D data files"} 386 SetVariable setvar3,limits={- Inf,Inf,0},value= root:myGlobals:Protocols:gAVE387 388 CheckBox check0,pos={1 0,560},size={72,14},title="Sensitivity"403 SetVariable setvar3,limits={-inf,inf,0},value= root:myGlobals:Protocols:gAVE 404 405 CheckBox check0,pos={13,463},size={63,14},title="Sensitivity" 389 406 CheckBox check0,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"} 390 407 CheckBox check0,value= 1 391 CheckBox check1,pos={10,590},size={72,14},title="Mask" 392 CheckBox check1,help={""} 393 CheckBox check1,value= 1 394 CheckBox check2,pos={10,620},size={72,14},title="Absolute Scale" 395 CheckBox check2,help={""} 396 CheckBox check2,value= 1 397 CheckBox check3,pos={10,650},size={72,14},title="Average and Save" 398 CheckBox check3,help={""} 399 CheckBox check3,value= 1 400 CheckBox check4,pos={10,530},size={72,14},title="Use EMP?" 401 CheckBox check4,help={""} 402 CheckBox check4,value= 1 403 CheckBox check5,pos={100,530},size={72,14},title="Use BGD?" 404 CheckBox check5,help={""} 405 CheckBox check5,value= 1 406 408 CheckBox check1,pos={13,486},size={39,14},title="Mask",value= 1 409 CheckBox check2,pos={13,509},size={82,14},title="Absolute Scale",value= 1 410 CheckBox check3,pos={13,532},size={96,14},title="Average and Save",value= 1 411 CheckBox check4,pos={13,436},size={59,14},title="Use EMP?",value= 1 412 CheckBox check5,pos={103,436},size={60,14},title="Use BGD?",value= 1 407 413 408 414 409 415 // SAM Tab 410 PopupMenu popup_0_1,pos={ 230,60},size={102,20},title="Condition"416 PopupMenu popup_0_1,pos={190,45},size={102,20},title="Condition" 411 417 PopupMenu popup_0_1, mode=1,popvalue="none",value= #"P_GetConditionNameList()" 412 418 // UU 413 ListBox ListBox_0_UU,pos={34, 102},size={200,130},proc=PolCor_FileListBoxProc,frame=2419 ListBox ListBox_0_UU,pos={34,80},size={200,120},proc=PolCor_FileListBoxProc,frame=2 414 420 ListBox ListBox_0_UU,listWave=root:Packages:NIST:Polarization:ListWave_0_UU,titleWave=root:Packages:NIST:Polarization:lbTitles 415 421 ListBox ListBox_0_UU,selWave=root:Packages:NIST:Polarization:lbSelWave_0_UU,mode= 6,selRow= 0,selCol= 0,editStyle= 2 … … 436 442 437 443 // DU 438 ListBox ListBox_0_DU,pos={3 68,102},size={200,130},proc=PolCor_FileListBoxProc,frame=2444 ListBox ListBox_0_DU,pos={310,80},size={200,120},proc=PolCor_FileListBoxProc,frame=2 439 445 ListBox ListBox_0_DU,listWave=root:Packages:NIST:Polarization:ListWave_0_DU,titleWave=root:Packages:NIST:Polarization:lbTitles 440 446 ListBox ListBox_0_DU,selWave=root:Packages:NIST:Polarization:lbSelWave_0_DU,mode= 6,selRow= 0,selCol= 0,editStyle= 2 … … 461 467 462 468 // DD 463 ListBox ListBox_0_DD,pos={33,2 86},size={200,130},proc=PolCor_FileListBoxProc,frame=2469 ListBox ListBox_0_DD,pos={33,245},size={200,120},proc=PolCor_FileListBoxProc,frame=2 464 470 ListBox ListBox_0_DD,listWave=root:Packages:NIST:Polarization:ListWave_0_DD,titleWave=root:Packages:NIST:Polarization:lbTitles 465 471 ListBox ListBox_0_DD,selWave=root:Packages:NIST:Polarization:lbSelWave_0_DD,mode= 6,selRow= 0,selCol= 0,editStyle= 2 … … 486 492 487 493 // UD 488 ListBox ListBox_0_UD,pos={3 68,286},size={200,130},proc=PolCor_FileListBoxProc,frame=2494 ListBox ListBox_0_UD,pos={310,245},size={200,120},proc=PolCor_FileListBoxProc,frame=2 489 495 ListBox ListBox_0_UD,listWave=root:Packages:NIST:Polarization:ListWave_0_UD,titleWave=root:Packages:NIST:Polarization:lbTitles 490 496 ListBox ListBox_0_UD,selWave=root:Packages:NIST:Polarization:lbSelWave_0_UD,mode= 6,selRow= 0,selCol= 0,editStyle= 2 … … 512 518 513 519 // EMP Tab 514 PopupMenu popup_1_1,pos={ 230,60},size={102,20},title="Condition"520 PopupMenu popup_1_1,pos={190,45},size={102,20},title="Condition" 515 521 PopupMenu popup_1_1, mode=1,popvalue="none",value= #"P_GetConditionNameList()" 516 522 // UU 517 ListBox ListBox_1_UU,pos={34, 102},size={200,130},proc=PolCor_FileListBoxProc,frame=2523 ListBox ListBox_1_UU,pos={34,80},size={200,120},proc=PolCor_FileListBoxProc,frame=2 518 524 ListBox ListBox_1_UU,listWave=root:Packages:NIST:Polarization:ListWave_1_UU,titleWave=root:Packages:NIST:Polarization:lbTitles 519 525 ListBox ListBox_1_UU,selWave=root:Packages:NIST:Polarization:lbSelWave_1_UU,mode= 6,selRow= 0,selCol= 0,editStyle= 2 … … 540 546 541 547 // DU 542 ListBox ListBox_1_DU,pos={3 68,102},size={200,130},proc=PolCor_FileListBoxProc,frame=2548 ListBox ListBox_1_DU,pos={310,80},size={200,120},proc=PolCor_FileListBoxProc,frame=2 543 549 ListBox ListBox_1_DU,listWave=root:Packages:NIST:Polarization:ListWave_1_DU,titleWave=root:Packages:NIST:Polarization:lbTitles 544 550 ListBox ListBox_1_DU,selWave=root:Packages:NIST:Polarization:lbSelWave_1_DU,mode= 6,selRow= 0,selCol= 0,editStyle= 2 … … 565 571 566 572 // DD 567 ListBox ListBox_1_DD,pos={33,2 86},size={200,130},proc=PolCor_FileListBoxProc,frame=2573 ListBox ListBox_1_DD,pos={33,245},size={200,120},proc=PolCor_FileListBoxProc,frame=2 568 574 ListBox ListBox_1_DD,listWave=root:Packages:NIST:Polarization:ListWave_1_DD,titleWave=root:Packages:NIST:Polarization:lbTitles 569 575 ListBox ListBox_1_DD,selWave=root:Packages:NIST:Polarization:lbSelWave_1_DD,mode= 6,selRow= 0,selCol= 0,editStyle= 2 … … 590 596 591 597 // UD 592 ListBox ListBox_1_UD,pos={3 68,286},size={200,130},proc=PolCor_FileListBoxProc,frame=2598 ListBox ListBox_1_UD,pos={310,245},size={200,120},proc=PolCor_FileListBoxProc,frame=2 593 599 ListBox ListBox_1_UD,listWave=root:Packages:NIST:Polarization:ListWave_1_UD,titleWave=root:Packages:NIST:Polarization:lbTitles 594 600 ListBox ListBox_1_UD,selWave=root:Packages:NIST:Polarization:lbSelWave_1_UD,mode= 6,selRow= 0,selCol= 0,editStyle= 2 … … 618 624 // file is necessary - this is "incorrectly" labeled as UU. I'll get around to changing this in the future... 619 625 // 620 TitleBox title_2_UU,pos={ 350,100},size={400,48},title="\\f01BGD files are independent of polarization\rEnter all as UU",fSize=12626 TitleBox title_2_UU,pos={250,100},size={400,48},title="\\f01BGD files are independent of polarization\rEnter all as UU",fSize=12 621 627 622 628 623 629 // UU 624 ListBox ListBox_2_UU,pos={34, 102},size={200,130},proc=PolCor_FileListBoxProc,frame=2630 ListBox ListBox_2_UU,pos={34,80},size={200,120},proc=PolCor_FileListBoxProc,frame=2 625 631 ListBox ListBox_2_UU,listWave=root:Packages:NIST:Polarization:ListWave_2_UU,titleWave=root:Packages:NIST:Polarization:lbTitles 626 632 ListBox ListBox_2_UU,selWave=root:Packages:NIST:Polarization:lbSelWave_2_UU,mode= 6,selRow= 0,selCol= 0,editStyle= 2 … … 722 728 723 729 EndMacro 730 731 Function SavePolCorPanelButton(ba) : ButtonControl 732 STRUCT WMButtonAction &ba 733 734 switch( ba.eventCode ) 735 case 2: // mouse up 736 // click code here 737 SavePolCorPanelState() 738 break 739 case -1: // control being killed 740 break 741 endswitch 742 743 return 0 744 End 745 746 Function RestorePolCorPanelButton(ba) : ButtonControl 747 STRUCT WMButtonAction &ba 748 749 switch( ba.eventCode ) 750 case 2: // mouse up 751 // click code here 752 RestorePolCorPanelState() 753 break 754 case -1: // control being killed 755 break 756 endswitch 757 758 return 0 759 End 760 761 724 762 725 763 // action procedure for the list box that allows the popup menu -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/Polarization/Pol_PolarizationPanels.ipf
r867 r915 144 144 DrawCellParamPanel() 145 145 endif 146 146 // be sure that the panel is onscreen 147 DoIgorMenu "Control","Retrieve Window" 147 148 end 148 149 … … 282 283 283 284 PauseUpdate; Silent 1 // building window... 284 NewPanel /W=( 775,44,1375,377)/N=CellParamPanel/K=1 as "Fundamental Cell Parameters"285 NewPanel /W=(150,44,750,377)/N=CellParamPanel/K=1 as "Fundamental Cell Parameters" 285 286 ModifyPanel cbRGB=(65535,49151,55704) 286 287 ModifyPanel fixedSize=1 … … 289 290 Button button_0,pos={10,10},size={90,20},proc=AddCellButtonProc,title="Add Cell" 290 291 Button button_1,pos={118,10},size={160,20},proc=SaveCellParButtonProc,title="Update Parameters" 291 Button button_2,pos={ 300,10},size={130,20},proc=RevertCellParButtonProc,title="Revert Parameters"292 Button button_2,pos={118,35},size={130,20},proc=RevertCellParButtonProc,title="Revert Parameters" 292 293 Button button_3,pos={520,10},size={35,20},proc=CellHelpParButtonProc,title="?" 293 294 294 295 Edit/W=(14,55,582,318)/HOST=# 295 Button button_4,pos={324,10},size={100,20},proc=SaveCellPanelButton,title="Save State" 296 Button button_5,pos={324,35},size={100,20},proc=RestoreCellPanelButton,title="Restore State" 297 298 Edit/W=(14,60,582,318)/HOST=# 296 299 ModifyTable width(Point)=0 297 300 RenameWindow #,T0 … … 306 309 return(0) 307 310 End 311 312 313 Function SaveCellPanelButton(ba) : ButtonControl 314 STRUCT WMButtonAction &ba 315 316 switch( ba.eventCode ) 317 case 2: // mouse up 318 // click code here 319 SaveCellParameterTable() 320 break 321 case -1: // control being killed 322 break 323 endswitch 324 325 return 0 326 End 327 328 Function RestoreCellPanelButton(ba) : ButtonControl 329 STRUCT WMButtonAction &ba 330 331 switch( ba.eventCode ) 332 case 2: // mouse up 333 // click code here 334 RestoreCellParameterTable() 335 break 336 case -1: // control being killed 337 break 338 endswitch 339 340 return 0 341 End 342 343 344 308 345 309 346 Function CellHelpParButtonProc(ba) : ButtonControl … … 415 452 DecayParamPanel() 416 453 endif 454 // be sure that the panel is onscreen 455 DoIgorMenu "Control","Retrieve Window" 417 456 end 418 457 … … 441 480 442 481 PauseUpdate; Silent 1 // building window... 443 NewPanel /W=( 759,44,1572,713)/N=DecayPanel/K=1 as "Cell Decay Parameters"482 NewPanel /W=(200,44,1013,664)/N=DecayPanel/K=1 as "Cell Decay Parameters" 444 483 ModifyPanel cbRGB=(32768,54615,65535) 445 484 // Button button_3,pos={505,16},size={35,20},proc=DecayHelpParButtonProc,title="?" 446 PopupMenu popup_0,pos={32, 18},size={49,20},title="Cell",proc=DecayPanelPopMenuProc485 PopupMenu popup_0,pos={32,8},size={49,20},title="Cell",proc=DecayPanelPopMenuProc 447 486 PopupMenu popup_0,mode=1,value= #"D_CellNameList()" 448 487 449 Button button_0,pos={5 84,365},size={70,20},proc=DecayFitButtonProc,title="Do Fit"450 451 GroupBox group_0,pos={5 50,399},size={230,149},title="FIT RESULTS",fSize=10488 Button button_0,pos={560,294},size={70,20},proc=DecayFitButtonProc,title="Do Fit" 489 490 GroupBox group_0,pos={560,329},size={230,149},title="FIT RESULTS",fSize=10 452 491 GroupBox group_0,fStyle=1 453 SetVariable setvar_0,pos={5 60,428},size={200,13},title="muPo of 3He"492 SetVariable setvar_0,pos={570,358},size={200,13},title="muPo of 3He" 454 493 SetVariable setvar_0,fStyle=1,limits={0,0,0},barmisc={0,1000} 455 494 SetVariable setvar_0,value= root:Packages:NIST:Polarization:Cells:gMuPo 456 SetVariable setvar_1,pos={5 60,460},size={200,13},title="Po of 3He"495 SetVariable setvar_1,pos={570,390},size={200,13},title="Po of 3He" 457 496 SetVariable setvar_1,fStyle=1,limits={0,0,0},barmisc={0,1000} 458 497 SetVariable setvar_1,value= root:Packages:NIST:Polarization:Cells:gPo 459 SetVariable setvar_2,pos={5 60,518},size={200,13},title="Gamma (h)",fStyle=1498 SetVariable setvar_2,pos={570,448},size={200,13},title="Gamma (h)",fStyle=1 460 499 SetVariable setvar_2,limits={0,0,0},barmisc={0,1000} 461 500 SetVariable setvar_2,value= root:Packages:NIST:Polarization:Cells:gGamma 462 SetVariable setvar_3,pos={5 60,488},size={200,15},title="T0",fStyle=1501 SetVariable setvar_3,pos={570,418},size={200,13},title="T0",fStyle=1 463 502 SetVariable setvar_3,limits={0,0,0},value= root:Packages:NIST:Polarization:Cells:gT0 464 503 465 504 466 Button button_1,pos={579,294},size={120,20},proc=CalcRowParamButton,title="Calculate Rows" 467 Button button_2,pos={307,18},size={110,20},proc=ClearDecayWavesButton,title="Clear Table" 468 Button button_3,pos={579,333},size={120,20},proc=ShowCalcRowButton,title="Show Calc" 469 Button button_4,pos={440,18},size={110,20},proc=ClearDecayWavesRowButton,title="Clear Row" 470 Button button_5,pos={620,18},size={40,20},proc=DecayHelpParButtonProc,title="?" 471 Button button_6,pos={620,620},size={100,20},proc=WindowSnapshotButton,title="Snapshot" 472 Button button_7,pos={620,580},size={130,20},proc=ManualEnterDecayButton,title="Manual Entry" 473 CheckBox check0,mode=0,pos={600,550},title="Overrride T0?",value=0 505 Button button_1,pos={560,262},size={120,20},proc=CalcRowParamButton,title="Calculate Rows" 506 Button button_2,pos={307,8},size={110,20},proc=ClearDecayWavesButton,title="Clear Table" 507 Button button_3,pos={560,519},size={110,20},proc=ShowCalcRowButton,title="Show Calc" 508 Button button_4,pos={440,8},size={110,20},proc=ClearDecayWavesRowButton,title="Clear Row" 509 Button button_5,pos={620,8},size={40,20},proc=DecayHelpParButtonProc,title="?" 510 Button button_6,pos={560,574},size={110,20},proc=WindowSnapshotButton,title="Snapshot" 511 Button button_7,pos={560,547},size={110,20},proc=ManualEnterDecayButton,title="Manual Entry" 512 Button button_8,pos={690,547},size={110,20},proc=SaveDecayPanelButton,title="Save State" 513 Button button_9,pos={690,574},size={110,20},proc=RestoreDecayPanelButton,title="Restore State" 514 CheckBox check0,mode=0,pos={560,480},title="Overrride T0?",value=0 474 515 475 516 476 517 // table 477 Edit/W=(14, 55,794,275)/HOST=#518 Edit/W=(14,35,794,240)/HOST=# 478 519 ModifyTable format=1,width=0 479 520 RenameWindow #,T0 … … 481 522 482 523 // graph 483 Display/W=(15,2 91,540,652)/HOST=# //root:yy vs root:xx524 Display/W=(15,250,540,610)/HOST=# //root:yy vs root:xx 484 525 ModifyGraph frameStyle=2 485 526 ModifyGraph mode=4 … … 1422 1463 End 1423 1464 1465 Function SaveDecayPanelButton(ba) : ButtonControl 1466 STRUCT WMButtonAction &ba 1467 1468 switch( ba.eventCode ) 1469 case 2: // mouse up 1470 // click code here 1471 SaveCellDecayTable() 1472 break 1473 case -1: // control being killed 1474 break 1475 endswitch 1476 1477 return 0 1478 End 1479 1480 Function RestoreDecayPanelButton(ba) : ButtonControl 1481 STRUCT WMButtonAction &ba 1482 1483 switch( ba.eventCode ) 1484 case 2: // mouse up 1485 // click code here 1486 RestoreCellDecayTable() 1487 break 1488 case -1: // control being killed 1489 break 1490 endswitch 1491 1492 return 0 1493 End 1494 1424 1495 // null condition is not right. if the loop fails, then the 1425 1496 // retStr will be ";;;;", not zero length. What's the proper test?
Note: See TracChangeset
for help on using the changeset viewer.