Changeset 835 for sans/Dev/trunk/NCNR_User_Procedures/Reduction/Polarization/Pol_PolarizationCorrection.ipf
- Timestamp:
- Feb 6, 2012 12:19:28 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sans/Dev/trunk/NCNR_User_Procedures/Reduction/Polarization/Pol_PolarizationCorrection.ipf
r829 r835 75 75 76 76 // main entry to the PolCor Panel 77 MacroShowPolCorSetup()77 Proc ShowPolCorSetup() 78 78 79 79 Variable restore=0 … … 269 269 Button button4,pos={620,18},size={30,20},proc=PolCorHelpParButtonProc,title="?" 270 270 Button button12,pos={440,473},size={120,20},proc=Display4XSButton,title="Display 4 XS" 271 Button button13,pos={440,446},size={120,20},proc=ClearPolCorEntries,title="Clear Entries" 271 272 272 273 PopupMenu popup1,pos={210,24},size={102,20},title="Condition" … … 1015 1016 1016 1017 Variable row,Psm, PsmPf, PCell,err_Psm, err_PsmPf, err_PCell 1017 Variable ii,jj,muPo,err_muPo,gam,err_gam,monCts,t1,num 1018 Variable ii,jj,muPo,err_muPo,gam,err_gam,monCts,t1,num,fileCount 1018 1019 1019 1020 Variable ea_uu, ea_ud, ea_dd, ea_du … … 1057 1058 1058 1059 // loop over the (10) rows in the listWave 1060 fileCount=0 1059 1061 for(ii=0;ii<num;ii+=1) 1060 1062 runStr = lb[ii][0] //the run number 1061 1063 if(cmpstr(runStr, "" ) != 0) 1062 1064 1065 fileCount += 1 //one more file is added 1063 1066 // get run number (str) 1064 1067 // get file name … … 1085 1088 // get file info (monitor counts) 1086 1089 monCts = getMonitorCount(fname) 1087 monCts /= 1e8 // just to get reasonable values1090 monCts /= 1e8 //to get a normalized value to add proportionally 1088 1091 1089 1092 Variable err_monCts … … 1209 1212 // can't take the SQRT here, since the matrix won't necessarily be full yet, 1210 1213 1211 1214 // but now need to re-normalize the row based on the number of files that were added 1215 // pType has only one value as passed in, so the row has already been set. It would be more correct 1216 // to switch based on pType... 1217 1218 matA[row][0] /= fileCount 1219 matA[row][1] /= fileCount 1220 matA[row][2] /= fileCount 1221 matA[row][3] /= fileCount 1222 1223 matA_err[row][0] /= fileCount 1224 matA_err[row][1] /= fileCount 1225 matA_err[row][2] /= fileCount 1226 matA_err[row][3] /= fileCount 1227 1212 1228 SetDataFolder root: 1213 1229 return(0) … … 2449 2465 End 2450 2466 2467 // clear the entries for all 4 XS for the currently selected Tab only 2468 // clears both the run numbers and the cell assignments 2469 // 2470 Function ClearPolCorEntries(ba) : ButtonControl 2471 STRUCT WMButtonAction &ba 2472 2473 switch( ba.eventCode ) 2474 case 2: // mouse up 2475 // click code here 2476 // 2477 // String type 2478 Variable tabNum 2479 ControlInfo/W=PolCor_Panel PolCorTab 2480 // type = S_value 2481 // Print "selected data type = ",type,V_Value 2482 tabNum = V_Value 2483 2484 WAVE/T twDD = $("root:Packages:NIST:Polarization:ListWave_"+num2str(tabNum)+"_DD") 2485 WAVE/T twUU = $("root:Packages:NIST:Polarization:ListWave_"+num2str(tabNum)+"_UU") 2486 WAVE/T twUD = $("root:Packages:NIST:Polarization:ListWave_"+num2str(tabNum)+"_UD") 2487 WAVE/T twDU = $("root:Packages:NIST:Polarization:ListWave_"+num2str(tabNum)+"_DU") 2488 2489 twDD = "" 2490 twUU = "" 2491 twUD = "" 2492 twDU = "" 2493 2494 break 2495 case -1: // control being killed 2496 break 2497 endswitch 2498 2499 return 0 2500 End 2451 2501 2452 2502
Note: See TracChangeset
for help on using the changeset viewer.