 Timestamp:
 Dec 11, 2017 11:05:48 AM (5 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/VC_DetectorBinning_Slit.ipf
r1076 r1077 4 4 ////////////////// 5 5 // 6 // Procedures to average data taken in "slit" apertu ere geometry. The fake data on the detector panels6 // Procedures to average data taken in "slit" aperture geometry. The fake data on the detector panels 7 7 // is as would be collected in PINHOLE geometry  I do not currently have a simulation for slit 8 8 // apertures (this would need to be MonteCarlo)  the I(q) averaging here gives the I(q) that you … … 14 14 // TODO  big question about averaging in this way... 15 15 // can the T/B panels really be used at all for slit mode?  since there's a big "hole" in the scattering data 16 // collected  you're not getting the full column of data covering a wide range of Qy. L/R panels should be fine. 16 // collected  you're not getting the full column of data covering a wide range of Qy. L/R panels should be fine, 17 // although the different carriages cover very different "chunks" of Qy 17 18 // 18 19 //  best answer so far is to skip the T/B panels, and simply not use them 19 20 // 20 // TODO  be sure that the absolute scaling of this is correct. I have no guarantee that 21 // it'll be correct. 21 // TODO  be sure that the absolute scaling of this is correct. Right now, something is off. 22 //  so write up the documentaiton for this operation, and try to find the error in the process... 23 // 22 24 // 23 25 ///////////////// … … 26 28 // TODO: 27 29 //  verify the error calculation 28 //  add in functionality to handle FLR and MLR cases (2 panels of data)30 //  ? add in functionality to handle FLR and MLR cases (2 panels of data) 29 31 // 30 32 // seems backwards to call this "byRows", but this is the way that Igor indexes … … 195 197 endif 196 198 endfor 197 iBin_qxqy[ii] = sum_inten 199 iBin_qxqy[ii] = sum_inten/sum_n //the average value 198 200 199 201 avesq = sum_inten … … 208 210 endfor 209 211 210 qBin_qxqy = qx[p][npix/2] //TODO: use only the Qx component in the ycenter of the detector, not Qtotal 211 212 // if the detectors are "L", then the values are all negative... 213 qBin_qxqy = abs(qx[p][0]) 212 //TODO: use only the Qx component in the ycenter 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) 214 217 215 218 // for the L panels, sort the qvalues (and data) after the abs() step, otherwise the data is reversed … … 217 220 Sort qBin_qxqy, qBin_qxqy,iBin_qxqy,eBin_qxqy 218 221 219 //now get the scaling correct 220 // qintegration (rectangular), matrixOp simply summed, so I need to multiply by dy (pixelSizeY > as Qy?) 221 222 // delQy = abs(qy[0][1]  qy[0][0]) // this is only one pixel 222 // not needed to corrrect data, but put in the file??? 223 223 delQy = abs(qy[0][npix1]  qy[0][0]) // TODO: do I use dQ for the height of the panel? 224 225 iBin_qxqy *= delQy 226 eBin_qxqy *= delQy 224 // iBin_qxqy *= delQy 225 // eBin_qxqy *= delQy 227 226 228 227 229 228 /// TODO  this is not necessary, but just for getting the I(Q) display to look "pretty" 230 229 // clean out the nearzero Q point in the T/B and Back detectors 231 qBin_qxqy = (abs(qBin_qxqy[p][q]) < 1e5) ? NaN : qBin_qxqy[p][q]230 // qBin_qxqy = (abs(qBin_qxqy[p][q]) < 1e5) ? NaN : qBin_qxqy[p][q] 232 231 233 232
Note: See TracChangeset
for help on using the changeset viewer.