Changeset 1088 for sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS
- Timestamp:
- Feb 26, 2018 3:31:01 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/SASCALC.ipf
r940 r1088 2326 2326 // all of this is bypassed if the lenses are in 2327 2327 // 2328 // returns beam diameter in [cm] 2329 // 2328 2330 Function beamDiameter(direction) 2329 2331 String direction … … 2371 2373 2372 2374 //on NG3 and NG7, allowable sizes are 1,2,3,4" diameter 2375 // 2376 // at the NGB-10m instrument, allowable sizes are 1, 1.5, 2, 3 (inches) ( SRK 2018) 2377 // 2373 2378 //will return values larger than 4.0*2.54 if a larger beam is needed 2374 2379 // … … 2378 2383 NVAR yesLens = root:Packages:NIST:SAS:gUsingLenses 2379 2384 Variable bm=0 2380 Variable bs=0.0 2385 Variable bs=0.0,pass=0 2386 2387 SVAR selInstr = root:Packages:NIST:SAS:gInstStr // "NG3","NG7","NGB" 2381 2388 2382 2389 if(yesLens) … … 2386 2393 bm = beamDiameter("maximum") 2387 2394 do 2388 bs += 1 2395 if(cmpstr(selInstr,"NGB") == 0) 2396 pass +=1 2397 if(pass == 1) 2398 bs = 1 2399 endif 2400 if(pass == 2) 2401 bs = 1.5 2402 endif 2403 if(pass == 3) 2404 bs = 2 2405 endif 2406 if(pass == 4) 2407 bs = 3 2408 endif 2409 if(pass > 4) 2410 bs += 1 2411 endif 2412 2413 else 2414 bs += 1 // always add 1" at a time to the beam stop (NG3B-30m and NG7) 2415 endif 2416 2389 2417 while ( (bs*2.54 < bm) || (bs > 30.0)) //30 = ridiculous limit to avoid inf loop 2390 2418 endif … … 2394 2422 rw[21] = bs*25.4 //store the BS diameter in mm 2395 2423 2396 2424 return (bs*2.54) //return diameter in cm, not inches for txt 2397 2425 End 2398 2426
Note: See TracChangeset
for help on using the changeset viewer.