Ignore:
Timestamp:
Jan 7, 2009 1:17:09 PM (14 years ago)
Author:
srkline
Message:

Final fixes, w/Charles Dewhurst, to finally calculate Qx and Qy correctly as vector components of the vector Q, as it is projected onto the XY planar detector. An additional function has been added to calculate Qz as well, but is not written out anywhere. This calculation only has an effect at the highest q-values, for QxQy? export. At a Q ~ 0.45, the correct Qx and Qy are about 2% different than the old calculation. |Q| has always been correct.

File:
1 edited

Legend:

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

    r459 r467  
    736736//      Endif 
    737737         
    738         Duplicate/O data,qx_val,qy_val,z_val 
     738        Duplicate/O data,qx_val,qy_val,z_val,qval,qz_val 
    739739         
    740740//      Redimension/N=(pixelsX*pixelsY) qx_val,qy_val,z_val 
     
    743743        qx_val = CalcQx(p+1,q+1,rw[16],rw[17],rw[18],rw[26],rw[13]/10)          //+1 converts to detector coordinate system 
    744744        qy_val = CalcQy(p+1,q+1,rw[16],rw[17],rw[18],rw[26],rw[13]/10) 
    745  
     745         
    746746        Redimension/N=(pixelsX*pixelsY) qx_val,qy_val,z_val 
     747         
     748        // un-comment these if you want to write out qz_val and qval too, then use the proper save command 
     749//      qval = CalcQval(p+1,q+1,rw[16],rw[17],rw[18],rw[26],rw[13]/10) 
     750//      qz_val = CalcQz(p+1,q+1,rw[16],rw[17],rw[18],rw[26],rw[13]/10) 
     751//      Redimension/N=(pixelsX*pixelsY) qz_val,qval 
    747752 
    748753        //not demo-compatible, but approx 8x faster!!    
    749754#if(cmpstr(stringbykey("IGORKIND",IgorInfo(0),":",";"),"pro") == 0)      
    750         Save/G/M="\r\n" labelWave,qx_val,qy_val,z_val as fullpath       // /M=termStr specifies terminator 
     755        Save/G/M="\r\n" labelWave,qx_val,qy_val,z_val as fullpath       // /M=termStr specifies terminator       
     756//      Save/G/M="\r\n" labelWave,qx_val,qy_val,qz_val,qval,z_val as fullpath   // for debugging, write out everything 
    751757#else 
    752758        Open refNum as fullpath 
     
    757763#endif 
    758764         
    759         Killwaves/Z spWave,labelWave,qx_val,qy_val,z_val 
     765        Killwaves/Z spWave,labelWave,qx_val,qy_val,z_val,qval,qz_val 
    760766         
    761767        Print "QxQy_Export File written: ", GetFileNameFromPathNoSemi(fullPath) 
Note: See TracChangeset for help on using the changeset viewer.