Changeset 827 for sans/Dev/trunk/NCNR_User_Procedures/Reduction
- Timestamp:
- Aug 1, 2011 4:05:48 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/NCNR_Utils.ipf
r813 r827 293 293 294 294 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 296 301 // can calculate that from the QxQy (I just need the projection) 297 298 299 302 //// for test case with no gravity, set a_val = 0 300 303 //// note that gravity has no wavelength dependence. the lambda^4 cancels out. … … 303 306 //// a_val_l2 = 0 304 307 // 305 // // the detector pixel is square, so correct for phi306 // proj_DDet = DDet*cos(phi) + DDet*sin(phi)307 308 // 308 309 // // this is really sigma_Q_parallel … … 321 322 ///////////////////////////////////////////////// 322 323 ///// 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 324 326 //// // 325 327 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 327 329 G = 981. //! ACCELERATION OF GRAVITY, CM/SEC^2 328 330 acc = vz_1 // 3.956E5 //! CONVERT WAVELENGTH TO VELOCITY CM/SEC … … 340 342 341 343 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 347 358 348 359 ///// return values PBR 349 SigmaQX = sig_para 360 SigmaQX = sig_para_new 350 361 SigmaQy = sig_perp 351 362
Note: See TracChangeset
for help on using the changeset viewer.