 Timestamp:
 Mar 28, 2019 11:12:06 AM (4 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/VC_DetectorBinning_Utils.ipf
r1134 r1137 153 153 //////////////////// 154 154 155 prob_i = trans*thick*pixSizeX*pixSizeY/(sdd)^2*tmpInten //probability of a neutron in qbin(i)155 MultiThread prob_i = trans*thick*pixSizeX*pixSizeY/(sdd)^2*tmpInten //probability of a neutron in qbin(i) 156 156 157 157 tmpInten = (imon)*prob_i //tmpInten is not the model calculation anymore!! … … 159 159 160 160 /// **** can I safely assume a Gaussian error in the count rate?? 161 tmpSig = sqrt(tmpInten) // corrected based on John's memo, from 8/9/99162 163 tmpInten += gnoise(tmpSig)164 tmpInten = (tmpInten[p][q] < 0) ? 0 : tmpInten[p][q] // MAR 2013  is this the right thing to do161 MultiThread tmpSig = sqrt(tmpInten) // corrected based on John's memo, from 8/9/99 162 163 MultiThread tmpInten += gnoise(tmpSig) 164 MultiThread tmpInten = (tmpInten[p][q] < 0) ? 0 : tmpInten[p][q] // MAR 2013  is this the right thing to do 165 165 tmpInten = trunc(tmpInten) 166 166 … … 205 205 // loop over the array and calculate the values  this is done as a wave assignment 206 206 // TODO  be sure that it's p,q  or maybe p+1,q+1 as used in WriteQIS.ipf 207 qTot = VC_CalcQval(p,q,xctr,yctr,sdd,lam,pixSizeX,pixSizeY)208 qx = VC_CalcQX(p,q,xctr,yctr,sdd,lam,pixSizeX,pixSizeY)209 qy = VC_CalcQY(p,q,xctr,yctr,sdd,lam,pixSizeX,pixSizeY)210 qz = VC_CalcQZ(p,q,xctr,yctr,sdd,lam,pixSizeX,pixSizeY)207 MultiThread qTot = VC_CalcQval(p,q,xctr,yctr,sdd,lam,pixSizeX,pixSizeY) 208 MultiThread qx = VC_CalcQX(p,q,xctr,yctr,sdd,lam,pixSizeX,pixSizeY) 209 MultiThread qy = VC_CalcQY(p,q,xctr,yctr,sdd,lam,pixSizeX,pixSizeY) 210 MultiThread qz = VC_CalcQZ(p,q,xctr,yctr,sdd,lam,pixSizeX,pixSizeY) 211 211 212 212 return(0) … … 411 411 // 412 412 // 413 Function VC_CalcQval(xaxval,yaxval,xctr,yctr,sdd,lam,pixSizeX,pixSizeY)413 Threadsafe Function VC_CalcQval(xaxval,yaxval,xctr,yctr,sdd,lam,pixSizeX,pixSizeY) 414 414 Variable xaxval,yaxval,xctr,yctr,sdd,lam,pixSizeX,pixSizeY 415 415 … … 438 438 // now properly accounts for qz 439 439 // 440 Function VC_CalcQX(xaxval,yaxval,xctr,yctr,sdd,lam,pixSizeX,pixSizeY)440 Threadsafe Function VC_CalcQX(xaxval,yaxval,xctr,yctr,sdd,lam,pixSizeX,pixSizeY) 441 441 Variable xaxval,yaxval,xctr,yctr,sdd,lam,pixSizeX,pixSizeY 442 442 … … 468 468 // now properly accounts for qz 469 469 // 470 Function VC_CalcQY(xaxval,yaxval,xctr,yctr,sdd,lam,pixSizeX,pixSizeY)470 Threadsafe Function VC_CalcQY(xaxval,yaxval,xctr,yctr,sdd,lam,pixSizeX,pixSizeY) 471 471 Variable xaxval,yaxval,xctr,yctr,sdd,lam,pixSizeX,pixSizeY 472 472 … … 497 497 // not actually used, but here for completeness if anyone asks 498 498 // 499 Function VC_CalcQZ(xaxval,yaxval,xctr,yctr,sdd,lam,pixSizeX,pixSizeY)499 Threadsafe Function VC_CalcQZ(xaxval,yaxval,xctr,yctr,sdd,lam,pixSizeX,pixSizeY) 500 500 Variable xaxval,yaxval,xctr,yctr,sdd,lam,pixSizeX,pixSizeY 501 501
Note: See TracChangeset
for help on using the changeset viewer.