Ignore:
Timestamp:
Jun 21, 2011 1:07:46 PM (11 years ago)
Author:
srkline
Message:

Fixed comparison bug in NSORT / MRED / CatTable?

Fixed bug in writing of RAW VAX files (only used in simulation) that incorrectly converted 32 bit integer to 16 bit integer before compression, leading to negative counts for n ~> 37000.

Added source aperture and gravity to the MC simulation for a realistic beam profile.

File:
1 edited

Legend:

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

    r801 r811  
    320320 
    321321///////////////////////////////////////////////// 
    322 ///      
    323         ////// this is all experimental, inclusion of gravity effect into the parallel component 
    324         // 
    325         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 
     322/////    
     323//      ////// this is all experimental, inclusion of gravity effect into the parallel component 
     324////    // 
     325//      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 
    327327//      G = 981.  //!   ACCELERATION OF GRAVITY, CM/SEC^2 
    328         acc = vz_1              //      3.956E5 //!     CONVERT WAVELENGTH TO VELOCITY CM/SEC 
    329         SDD = L2                //1317 
    330         SSD = L1                //1627          //cm 
    331         lambda0 = lambda                //              15 
    332         DL_L = lambdaWidth              //0.236 
    333         SIG_L = DL_L/sqrt(6) 
    334         YG_d = -0.5*G*SDD*(SSD+SDD)*(LAMBDA0/acc)^2 
    335 //      Print "DISTANCE BEAM FALLS DUE TO GRAVITY (CM) = ",YG 
    336          
    337         sig_perp = kap*kap/12 * (3*(S1/L1)^2 + 3*(S2/LP)^2 + (proj_DDet/L2)^2) 
    338         sig_perp = sqrt(sig_perp) 
    339          
    340          
    341         FindQxQy(inQ,phi,qx,qy) 
    342          
    343         VAR_QLY = SIG_L^2 * (QY+4*PI*YG_d/(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 
    347          
    348 //return values PBR      
    349         SigmaQX = sig_para 
    350         SigmaQy = sig_perp 
    351          
     328//      acc = vz_1              //      3.956E5 //!     CONVERT WAVELENGTH TO VELOCITY CM/SEC 
     329//      SDD = L2                //1317 
     330//      SSD = L1                //1627          //cm 
     331//      lambda0 = lambda                //              15 
     332//      DL_L = lambdaWidth              //0.236 
     333//      SIG_L = DL_L/sqrt(6) 
     334//      YG_d = -0.5*G*SDD*(SSD+SDD)*(LAMBDA0/acc)^2 
     335/////// Print "DISTANCE BEAM FALLS DUE TO GRAVITY (CM) = ",YG 
    352336//       
     337//      sig_perp = kap*kap/12 * (3*(S1/L1)^2 + 3*(S2/LP)^2 + (proj_DDet/L2)^2) 
     338//      sig_perp = sqrt(sig_perp) 
     339//       
     340//       
     341//      FindQxQy(inQ,phi,qx,qy) 
     342//       
     343//      VAR_QLY = SIG_L^2 * (QY+4*PI*YG_d/(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 
     347//       
     348/////// return values PBR        
     349//      SigmaQX = sig_para 
     350//      SigmaQy = sig_perp 
     351//       
     352//////   
    353353         
    354354        results = "success" 
Note: See TracChangeset for help on using the changeset viewer.