- Timestamp:
- Nov 5, 2009 2:11:20 PM (13 years ago)
- Location:
- sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/MultScatter_MonteCarlo_2D.ipf
r596 r597 1238 1238 t0 = (stopMSTimer(-2) - t0)*1e-6 1239 1239 t0 *= imon/1000/ThreadProcessorCount //projected time, in seconds (using threads for the calculation) 1240 inputWave[0] = imon //reset 1240 1241 // to correct for detector efficiency, send only the fraction of neutrons that are actually counted 1242 NVAR detectorEff = root:Packages:NIST:SAS:g_detectorEff 1243 1244 inputWave[0] = imon * detectorEff //reset number of input neutrons before full simulation 1241 1245 1242 1246 if(t0>10) … … 1687 1691 NVAR estTrans = root:Packages:NIST:SAS:g_1DEstTrans // estimated transmission of sample 1688 1692 NVAR mScat = root:Packages:NIST:SAS:g_MultScattFraction 1693 NVAR detectorEff = root:Packages:NIST:SAS:g_detectorEff 1689 1694 1690 1695 WAVE rw=root:Packages:NIST:SAS:realsRead … … 1749 1754 1750 1755 // aveint = (Imon)*prob_i / circle_fraction / nCells_expected 1751 aveint = (Imon)*prob_i 1756 // added correction for detector efficiency, since SASCALC is flux on sample 1757 aveint = (Imon)*prob_i*detectorEff 1752 1758 1753 1759 countsInAnnulus = aveint*nCells -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/SASCALC.ipf
r596 r597 136 136 Variable/G root:Packages:NIST:SAS:g_1D_AddNoise = 1 137 137 Variable/G root:Packages:NIST:SAS:g_MultScattFraction=0 138 Variable/G root:Packages:NIST:SAS:g_detectorEff=0.75 //averag value for most wavelengths 138 139 139 140 //tick labels for SDD slider … … 165 166 Variable/G del_r = 0.5 166 167 Variable/G det_width = 64.0 167 Variable/G phi_0 = 2.95e13168 168 Variable/G lambda_t = 5.50 169 169 Variable/G l2r_lower = 132.3 … … 179 179 Variable/G guide_width = 6.0 180 180 Variable/G idmax = 100.0 181 Variable/G b = 0.023 182 Variable/G c = 0.023 181 // //old values, from 3/2002 182 // Variable/G phi_0 = 2.95e13 183 // Variable/G b = 0.023 184 // Variable/G c = 0.023 185 186 //new values, from 2/2009 187 Variable/G phi_0 = 3.4e13 188 Variable/G b = 0.0185 189 Variable/G c = 0.0135 183 190 184 191 //fwhm values (new variables) (+3, 0, -3, calibrated 2009) … … 219 226 Variable/G del_r = 0.5 220 227 Variable/G det_width = 64.0 221 Variable/G phi_0 = 2.3e13222 228 Variable/G lambda_t = 5.50 223 229 Variable/G l2r_lower = 100 … … 233 239 Variable/G guide_width = 5.0 234 240 Variable/G idmax = 100.0 235 Variable/G b = 0.028 236 Variable/G c = 0.028 241 242 // //old values, from 3/2002 243 // Variable/G phi_0 = 2.3e13 244 // Variable/G b = 0.028 245 // Variable/G c = 0.028 246 247 //new values, from 6/2009 248 Variable/G phi_0 = 3.2e13 249 Variable/G b = 0.0448 250 Variable/G c = 0.0463 237 251 238 252 //fwhm values (new variables) 239 253 Variable/G fwhm_narrow = 0.09 240 Variable/G fwhm_mid = 0.11 254 Variable/G fwhm_mid = 0.115 //2009 241 255 Variable/G fwhm_wide = 0.22 242 256 … … 484 498 endswitch 485 499 486 dlStr = "0.09;0.11 ;0.22;"500 dlStr = "0.09;0.115;0.22;" 487 501 Slider SC_Slider_1,limits={100,1531,1},userTicks={root:Packages:NIST:SAS:tickSDDNG7,root:Packages:NIST:SAS:lblSDDNG7 } 488 502 SetVariable setvar0,limits={100,1531,1} … … 1982 1996 End 1983 1997 1984 1998 // updated with new flux numbers from John Barker 1999 // NG3 - Feb 2009 2000 // NG7 - July 2009 2001 // 2002 // guide loss has been changed to 0.95 rather than the old value of 0.95 2003 // 2004 // other values are changed in the initialization routines 2005 // 1985 2006 Function beamIntensity() 1986 2007 1987 2008 Variable alpha,f,t,t4,t5,t6,as,solid_angle,l1,d2_phi 1988 Variable a1,a2,retVal 2009 Variable a1,a2,retVal,guide_loss=0.95 1989 2010 SetDataFolder root:Packages:NIST:SAS 1990 2011 NVAR l_gap=l_gap,guide_width =guide_width,ng = gNg … … 2001 2022 f = l_gap*alpha/(2*guide_width) 2002 2023 t4 = (1-f)*(1-f) 2003 t5 = exp(ng*ln( 0.96)) // trans losses of guides in pre-sample flight2024 t5 = exp(ng*ln(guide_loss)) // trans losses of guides in pre-sample flight 2004 2025 t6 = 1 - lambda*(b-(ng/8)*(b-c)) //experimental correction factor 2005 2026 t = t1*t2*t3*t4*t5*t6
Note: See TracChangeset
for help on using the changeset viewer.