- Timestamp:
- Jan 5, 2018 10:32:55 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/VC_DetectorBinning_Slit.ipf
r1077 r1078 175 175 // eBin_qxqy = tmp[0][p] 176 176 177 Variable ii,jj,ntube,n pix,sum_inten, sum_n, sum_inten2,avesq,aveisq,var,mask_val177 Variable ii,jj,ntube,nYpix,sum_inten, sum_n, sum_inten2,avesq,aveisq,var,mask_val 178 178 ntube = DimSize(inten,0) 179 n pix = DimSize(inten,1)179 nYpix = DimSize(inten,1) 180 180 181 181 for(ii=0;ii<ntube;ii+=1) … … 184 184 sum_inten2 = 0 185 185 186 for(jj=0;jj<n pix;jj+=1)186 for(jj=0;jj<nYpix;jj+=1) 187 187 val = inten[ii][jj] 188 188 if(isVCALC || maskMissing) // mask_val == 0 == keep, mask_val == 1 = YES, mask out the point … … 199 199 iBin_qxqy[ii] = sum_inten/sum_n //the average value 200 200 201 avesq = sum_inten201 avesq = (sum_inten/sum_n)^2 202 202 aveisq = sum_inten2/sum_n 203 203 var = aveisq-avesq … … 211 211 212 212 //TODO: use only the Qx component in the y-center of the detector, not Qtotal 213 qBin_qxqy = abs(qx[p][npix/2]) 214 215 // if the detectors are "L", then the values are all negative... 216 qBin_qxqy = abs(qBin_qxqy) 213 // if the detectors are "L", then the values are all negative, so take the absolute value here 214 qBin_qxqy = abs(qx[p][nYpix/2]) 217 215 218 216 // for the L panels, sort the q-values (and data) after the abs() step, otherwise the data is reversed 219 // won't hurt to sort the R data217 // won't hurt to sort the R panel data 220 218 Sort qBin_qxqy, qBin_qxqy,iBin_qxqy,eBin_qxqy 221 222 // not needed to corrrect data, but put in the file??? 223 delQy = abs(qy[0][npix-1] - qy[0][0]) // TODO: do I use dQ for the height of the panel? 219 220 221 // TODO: do I use dQ for the height of the panel? 222 // TODO : do I use 1/2 of dQ due to the symmetry of my smearing calculation? 223 delQy = abs(qy[0][nYpix-1] - qy[0][0]) 224 224 225 // iBin_qxqy *= delQy 225 226 // eBin_qxqy *= delQy … … 247 248 // DeletePoints 0, val, iBin_qxqy,qBin_qxqy,eBin_qxqy 248 249 249 250 // TODO:251 // -- calculate the slit resolution here. don't really have any idea how to represent this in VSANS252 // since it's not an infinite slit, and not anything that I expect could be represented as a Gaussian253 250 254 251 // TODO: … … 266 263 Wave fsubs = $(folderPath+":"+"fSubS_qxqy_"+detStr) 267 264 268 // TODO 269 // -- these are DUMMY VALUES!!! 270 sigmaq = -delQy 271 qbar = -delQy 272 fsubs = -delQy 265 // TODO: 266 // -- calculate the slit resolution here. don't really have any idea how to represent this in VSANS 267 // since it's not an infinite slit, and not anything that I expect could be represented as a Gaussian 268 // -- there is also wavelength smearing present 269 270 // ASSUMPTION: As a first approximation, ignore the wavelength smearing component 271 // TODO : do I use 1/2 of dQy due to the symmetry of my smearing calculation? 272 sigmaq = -delQy/2 273 qbar = -delQy/2 274 fsubs = -delQy/2 273 275 274 276
Note: See TracChangeset
for help on using the changeset viewer.