Ignore:
Timestamp:
Dec 11, 2017 11:05:48 AM (5 years ago)
Author:
srkline
Message:

more attempts to correct the slit binning - to get the absolute scaling correct - still in progress.

Location:
sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/VC_DetectorBinning_Slit.ipf

    r1076 r1077  
    44////////////////// 
    55// 
    6 // Procedures to average data taken in "slit" apertuere geometry. The fake data on the detector panels 
     6// Procedures to average data taken in "slit" aperture geometry. The fake data on the detector panels 
    77//  is as would be collected in PINHOLE geometry - I do not currently have a simulation for slit 
    88//  apertures (this would need to be MonteCarlo) - the I(q) averaging here gives the I(q) that you 
     
    1414// TODO - big question about averaging in this way... 
    1515// 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 
    1718// 
    1819// - best answer so far is to skip the T/B panels, and simply not use them 
    1920// 
    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// 
    2224// 
    2325///////////////// 
     
    2628// TODO: 
    2729// -- 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) 
    2931// 
    3032// seems backwards to call this "byRows", but this is the way that Igor indexes 
     
    195197                                endif 
    196198                endfor 
    197                 iBin_qxqy[ii] = sum_inten 
     199                iBin_qxqy[ii] = sum_inten/sum_n         //the average value 
    198200                 
    199201                avesq = sum_inten 
     
    208210        endfor 
    209211 
    210         qBin_qxqy =  qx[p][npix/2]              //TODO:  use only the Qx component in the y-center 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 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) 
    214217 
    215218// for the L panels, sort the q-values (and data) after the abs() step, otherwise the data is reversed 
     
    217220        Sort qBin_qxqy, qBin_qxqy,iBin_qxqy,eBin_qxqy 
    218221         
    219         //now get the scaling correct 
    220         // q-integration (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??? 
    223223        delQy = abs(qy[0][npix-1] - 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 
    227226         
    228227 
    229228/// TODO -- this is not necessary, but just for getting the I(Q) display to look "pretty" 
    230229// clean out the near-zero Q point in the T/B  and Back detectors 
    231         qBin_qxqy = (abs(qBin_qxqy[p][q]) < 1e-5) ? NaN : qBin_qxqy[p][q]                        
     230//      qBin_qxqy = (abs(qBin_qxqy[p][q]) < 1e-5) ? NaN : qBin_qxqy[p][q]                        
    232231 
    233232 
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_WorkFolderUtils.ipf

    r1075 r1077  
    736736 
    737737                        // do the calculation right here. It's a simple scaling and not worth sending to another function.       
    738                         //scale the data and error to the default montor counts 
     738                        //scale the data and error to the default monitor counts 
    739739                 
    740740// 
Note: See TracChangeset for help on using the changeset viewer.