Changeset 827


Ignore:
Timestamp:
Aug 1, 2011 4:05:48 PM (11 years ago)
Author:
srkline
Message:

changed the line endings on Auto_fit.ipf so that diff will work properly

Changed the 2D resolution calculation to match the style and variables used in the JAC paper w/ David and John. No effect on the calculation, just for consistency.

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

Legend:

Unmodified
Added
Removed
  • sans/Dev/trunk/NCNR_User_Procedures/Analysis/Alpha/Auto_Fit.ipf

    r826 r827  
    2222// -- Comprehensive instructions (after features are finalized) 
    2323// 
    24  
     24// -- savePath seems to be obsolete. Report saving is sent to the procedure defined in Wrapper.ipf, and uses the home path 
     25// 
    2526 
    2627 
     
    19341935        return(0) 
    19351936End 
     1937 
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/NCNR_Utils.ipf

    r813 r827  
    293293 
    294294 
    295 ///////// in terms of Q_parallel ("x") and Q_perp ("y") - this works, since parallel is in the direction of Q and I 
     295        // the detector pixel is square, so correct for phi 
     296        proj_DDet = DDet*cos(phi) + DDet*sin(phi) 
     297 
     298 
     299///////// OLD - don't use --- 
     300//in terms of Q_parallel ("x") and Q_perp ("y") - this works, since parallel is in the direction of Q and I 
    296301// can calculate that from the QxQy (I just need the projection) 
    297  
    298  
    299302//// for test case with no gravity, set a_val = 0 
    300303//// note that gravity has no wavelength dependence. the lambda^4 cancels out. 
     
    303306////    a_val_l2 = 0 
    304307// 
    305 //      // the detector pixel is square, so correct for phi 
    306 //      proj_DDet = DDet*cos(phi) + DDet*sin(phi) 
    307308//       
    308309//      // this is really sigma_Q_parallel 
     
    321322///////////////////////////////////////////////// 
    322323/////    
    323 //      ////// this is all experimental, inclusion of gravity effect into the parallel component 
     324//      ////// this is all new, inclusion of gravity effect into the parallel component 
     325//       perpendicular component is purely geometric, no gravity component 
    324326////    // 
    325327        Variable yg_d,acc,sdd,ssd,lambda0,DL_L,sig_l 
    326         Variable var_qlx,var_qly,var_ql,qx,qy,sig_perp,sig_para 
     328        Variable var_qlx,var_qly,var_ql,qx,qy,sig_perp,sig_para, sig_para_new 
    327329        G = 981.  //!   ACCELERATION OF GRAVITY, CM/SEC^2 
    328330        acc = vz_1              //      3.956E5 //!     CONVERT WAVELENGTH TO VELOCITY CM/SEC 
     
    340342         
    341343        FindQxQy(inQ,phi,qx,qy) 
    342          
    343         VAR_QLY = SIG_L^2 * (QY+4*PI*YG_d/(2*SDD*LAMBDA0))^2 
    344         VAR_QLX = (SIG_L*QX)^2 
    345         VAR_QL = VAR_QLY + VAR_QLX  //! WAVELENGTH CONTRIBUTION TO VARIANCE 
    346         sig_para = (sig_perp^2 + VAR_QL)^0.5 
     344 
     345// missing a factor of 2 here, and the form is different than the paper, so re-write     
     346//      VAR_QLY = SIG_L^2 * (QY+4*PI*YG_d/(2*SDD*LAMBDA0))^2 
     347//      VAR_QLX = (SIG_L*QX)^2 
     348//      VAR_QL = VAR_QLY + VAR_QLX  //! WAVELENGTH CONTRIBUTION TO VARIANCE 
     349//      sig_para = (sig_perp^2 + VAR_QL)^0.5 
     350         
     351        // r_dist is passed in, [=]cm 
     352        // from the paper 
     353        a_val = 0.5*G*SDD*(SSD+SDD)*m_h^2 * 1e-16               //units now are cm /(A^2) 
     354         
     355        var_QL = 1/6*(kap/SDD)^2*(DL_L)^2*(r_dist^2 - 4*r_dist*a_val*lambda0^2*sin(phi) + 4*a_val^2*lambda0^4) 
     356        sig_para_new = (sig_perp^2 + VAR_QL)^0.5 
     357         
    347358         
    348359///// return values PBR  
    349         SigmaQX = sig_para 
     360        SigmaQX = sig_para_new 
    350361        SigmaQy = sig_perp 
    351362         
Note: See TracChangeset for help on using the changeset viewer.