Ignore:
Timestamp:
Dec 3, 2008 12:49:15 PM (14 years ago)
Author:
srkline
Message:

Fixes from Lionel's bug in the calculation of Qx and Qy. Qx and Qy were not being properly calculated as components of Q and phi (azimuthal angle). Only an effect at the largest q-values (> 0.3) and even then, only in the 3rd decimal place.This incorrect calculation was only visible on the 2D data display, and in the QxQy? ASCII export. Not a terrible bug, not worth immediate release of a patch.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/WriteQIS.ipf

    r418 r459  
    737737         
    738738        Duplicate/O data,qx_val,qy_val,z_val 
     739         
     740//      Redimension/N=(pixelsX*pixelsY) qx_val,qy_val,z_val 
     741//      MyMat2XYZ(data,qx_val,qy_val,z_val)             //x and y are [p][q] indexes, not q-vals yet 
     742         
     743        qx_val = CalcQx(p+1,q+1,rw[16],rw[17],rw[18],rw[26],rw[13]/10)          //+1 converts to detector coordinate system 
     744        qy_val = CalcQy(p+1,q+1,rw[16],rw[17],rw[18],rw[26],rw[13]/10) 
     745 
    739746        Redimension/N=(pixelsX*pixelsY) qx_val,qy_val,z_val 
    740         MyMat2XYZ(data,qx_val,qy_val,z_val)             //x and y are [p][q] indexes, not q-vals yet 
    741          
    742         qx_val = CalcQx(qx_val+1,rw[16],rw[18],rw[26],rw[13]/10)                //+1 converts to detector coordinate system 
    743         qy_val = CalcQy(qy_val+1,rw[17],rw[18],rw[26],rw[13]/10) 
    744747 
    745748        //not demo-compatible, but approx 8x faster!!    
     
    762765 
    763766 
    764 Function MyMat2XYZ(mat,xw,yw,zw) 
    765         WAVE mat,xw,yw,zw 
    766  
    767         NVAR pixelsX = root:myGlobals:gNPixelsX 
    768         NVAR pixelsY = root:myGlobals:gNPixelsY 
    769          
    770         xw= mod(p,pixelsX)              // X varies quickly 
    771         yw= floor(p/pixelsY)    // Y varies slowly 
    772         zw= mat(xw[p])(yw[p]) 
    773  
    774 End 
     767//Function MyMat2XYZ(mat,xw,yw,zw) 
     768//      WAVE mat,xw,yw,zw 
     769// 
     770//      NVAR pixelsX = root:myGlobals:gNPixelsX 
     771//      NVAR pixelsY = root:myGlobals:gNPixelsY 
     772//       
     773//      xw= mod(p,pixelsX)              // X varies quickly 
     774//      yw= floor(p/pixelsY)    // Y varies slowly 
     775//      zw= mat(xw[p])(yw[p]) 
     776// 
     777//End 
    775778 
    776779//converts xyz triple to a matrix 
     
    843846        return outputPath 
    844847End 
    845  
Note: See TracChangeset for help on using the changeset viewer.