 Timestamp:
 Sep 23, 2015 8:24:30 AM (7 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/VC_DetectorBinning_Q.ipf
r955 r963 104 104 Function V_CalculateQFrontPanels() 105 105 106 Variable xCtr,yCtr,sdd,lam,pixSizeX,pixSizeY 106 Variable xCtr,yCtr,sdd,lam,pixSizeX,pixSizeY,nPix_X,nPix_Y 107 107 Variable F_LR_sep,F_TB_sep,F_offset,F_sdd_offset 108 108 … … 126 126 127 127 SetDataFolder root:Packages:NIST:VSANS:VCALC:Front 128 Wave det_FL,det_FR // these are (48, 256)128 Wave det_FL,det_FR // these are (48,128) (nominal, may change) 129 129 Wave det_FT,det_FB // these are (128,48) 130 130 … … 142 142 // pixSizeX = 0.8 // 0.8 cm/pixel along width 143 143 // pixSizeY = 0.4 // approx 0.4 cm/pixel along length 144 145 xCtr = 48+(F_LR_sep/2/pixSizeX) // TODO  check  starting from 47 rather than 48 (but I'm in pixel units for centers)?? 146 yCtr = 127 144 nPix_X = VCALC_get_nPix_X("FL") 145 nPix_Y = VCALC_get_nPix_Y("FL") 146 147 xCtr = nPix_X+(F_LR_sep/2/pixSizeX) // TODO  check  starting from 47 rather than 48 (but I'm in pixel units for centers)?? 148 yCtr = nPix_Y/2 147 149 V_Detector_2Q(det_FL,qTot_FL,qx_FL,qy_FL,qz_FL,xCtr,yCtr,sdd,lam,pixSizeX,pixSizeY) 148 150 // Print "xy for FL = ",xCtr,yCtr … … 168 170 pixSizeX = VCALC_getPixSizeX("FR") 169 171 pixSizeY = VCALC_getPixSizeY("FR") 172 nPix_X = VCALC_get_nPix_X("FR") 173 nPix_Y = VCALC_get_nPix_Y("FR") 170 174 171 175 xCtr = (F_LR_sep/2/pixSizeX)1 172 yCtr = 127176 yCtr = nPix_Y/2 173 177 V_Detector_2Q(det_FR,qTot_FR,qx_FR,qy_FR,qz_FR,xCtr,yCtr,sdd,lam,pixSizeX,pixSizeY) 174 178 // Print "xy for FR = ",xCtr,yCtr … … 189 193 pixSizeX = VCALC_getPixSizeX("FT") 190 194 pixSizeY = VCALC_getPixSizeY("FT") 191 192 xCtr = 64 195 nPix_X = VCALC_get_nPix_X("FT") 196 nPix_Y = VCALC_get_nPix_Y("FT") 197 198 xCtr = nPix_X/2 193 199 yCtr = (F_TB_sep/2/pixSizeY)1 194 200 // global sdd_offset is in (mm), convert to meters here for the Qcalculation … … 211 217 pixSizeX = VCALC_getPixSizeX("FB") 212 218 pixSizeY = VCALC_getPixSizeY("FB") 213 214 xCtr = 64 215 yCtr = 48+(F_TB_sep/2/pixSizeY) // TODO  check  starting from 47 rather than 48 (but I'm in pixel units for centers)?? 219 nPix_X = VCALC_get_nPix_X("FB") 220 nPix_Y = VCALC_get_nPix_Y("FB") 221 222 xCtr = nPix_X/2 223 yCtr = nPix_Y+(F_TB_sep/2/pixSizeY) // TODO  check  starting from 47 rather than 48 (but I'm in pixel units for centers)?? 216 224 // global sdd_offset is in (mm), convert to meters here for the Qcalculation 217 225 V_Detector_2Q(det_FB,qTot_FB,qx_FB,qy_FB,qz_FB,xCtr,yCtr,sdd+F_sdd_offset/1000,lam,pixSizeX,pixSizeY) … … 234 242 String folderStr,type 235 243 236 Variable LR_sep,nPix,xCtr,ii,jj,numCol,pixSizeX,pixSizeY 244 Variable LR_sep,nPix,xCtr,ii,jj,numCol,pixSizeX,pixSizeY,nPix_X,nPix_Y 237 245 238 246 /// !! type passed in will be FT, FB, MT, MB, so I can't ask for the panel separation  or I'll get the TB separation... … … 259 267 pixSizeY = VCALC_getPixSizeY(type) 260 268 269 nPix_X = VCALC_get_nPix_X(type) 270 nPix_Y = VCALC_get_nPix_Y(type) 271 261 272 //TODO  get this from a global 262 xCtr = 64273 xCtr = nPix_X/2 263 274 nPix = trunc(LR_sep/2/pixSizeX) // approx # of pixels Left/right of center that are not obscured by L/R panels 264 275 … … 442 453 Function V_CalculateQMiddlePanels() 443 454 444 Variable xCtr,yCtr,sdd,lam,pixSizeX,pixSizeY 455 Variable xCtr,yCtr,sdd,lam,pixSizeX,pixSizeY,nPix_X,nPix_Y 445 456 Variable M_LR_sep,M_TB_sep,M_offset, M_sdd_offset 446 457 … … 462 473 463 474 SetDataFolder root:Packages:NIST:VSANS:VCALC:Middle 464 Wave det_ML,det_MR // these are (48, 256)475 Wave det_ML,det_MR // these are (48,128) nominal, may change 465 476 Wave det_MT,det_MB // these are (128,48) 466 477 … … 476 487 pixSizeX = VCALC_getPixSizeX("ML") 477 488 pixSizeY = VCALC_getPixSizeY("ML") 478 479 xCtr = 48+(M_LR_sep/2/pixSizeX) // TODO  check  starting from 47 rather than 48 (but I'm in pixel units for centers)?? 480 yCtr = 127 489 nPix_X = VCALC_get_nPix_X("ML") 490 nPix_Y = VCALC_get_nPix_Y("ML") 491 492 xCtr = nPix_X+(M_LR_sep/2/pixSizeX) // TODO  check  starting from 47 rather than 48 (but I'm in pixel units for centers)?? 493 yCtr = nPix_Y/2 481 494 V_Detector_2Q(det_ML,qTot_ML,qx_ML,qy_ML,qz_ML,xCtr,yCtr,sdd,lam,pixSizeX,pixSizeY) 482 495 // Print "xy for ML = ",xCtr,yCtr … … 503 516 pixSizeX = VCALC_getPixSizeX("MR") 504 517 pixSizeY = VCALC_getPixSizeY("MR") 518 519 nPix_X = VCALC_get_nPix_X("MR") 520 nPix_Y = VCALC_get_nPix_Y("MR") 505 521 506 522 xCtr = (M_LR_sep/2/pixSizeX)1 507 yCtr = 127523 yCtr = nPix_Y/2 508 524 V_Detector_2Q(det_MR,qTot_MR,qx_MR,qy_MR,qz_MR,xCtr,yCtr,sdd,lam,pixSizeX,pixSizeY) 509 525 // Print "xy for MR = ",xCtr,yCtr … … 524 540 pixSizeX = VCALC_getPixSizeX("MT") 525 541 pixSizeY = VCALC_getPixSizeY("MT") 526 527 xCtr = 64 542 nPix_X = VCALC_get_nPix_X("MT") 543 nPix_Y = VCALC_get_nPix_Y("MT") 544 545 xCtr = nPix_X/2 528 546 yCtr = (M_TB_sep/2/pixSizeY)1 529 547 // global sdd_offset is in (mm), convert to meters here for the Qcalculation … … 546 564 pixSizeX = VCALC_getPixSizeX("MB") 547 565 pixSizeY = VCALC_getPixSizeY("MB") 548 549 xCtr = 64 550 yCtr = 48+(M_TB_sep/2/pixSizeY) // TODO  check  starting from 47 rather than 48 (but I'm in pixel units for centers)?? 566 nPix_X = VCALC_get_nPix_X("MB") 567 nPix_Y = VCALC_get_nPix_Y("MB") 568 569 xCtr = nPix_X/2 570 yCtr = nPix_Y+(M_TB_sep/2/pixSizeY) // TODO  check  starting from 47 rather than 48 (but I'm in pixel units for centers)?? 551 571 // global sdd_offset is in (mm), convert to meters here for the Qcalculation 552 572 V_Detector_2Q(det_MB,qTot_MB,qx_MB,qy_MB,qz_MB,xCtr,yCtr,sdd+M_sdd_offset/1000,lam,pixSizeX,pixSizeY)
Note: See TracChangeset
for help on using the changeset viewer.