Ignore:
Timestamp:
Feb 26, 2018 3:31:01 PM (5 years ago)
Author:
srkline
Message:

corrected bad logic in reduction when reducing to 2D. Nothing was wrong, just a meaningless error dialog was presented.

updated the beamstop sizes in SASCALC for the NGB-10m SANS instrument. Now the 4 beamstops are 1", 1.5", 2" and 3".

File:
1 edited

Legend:

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

    r940 r1088  
    23262326// all of this is bypassed if the lenses are in 
    23272327// 
     2328// returns beam diameter in [cm] 
     2329// 
    23282330Function beamDiameter(direction) 
    23292331        String direction 
     
    23712373 
    23722374//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// 
    23732378//will return values larger than 4.0*2.54 if a larger beam is needed 
    23742379// 
     
    23782383        NVAR yesLens = root:Packages:NIST:SAS:gUsingLenses 
    23792384        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" 
    23812388    
    23822389        if(yesLens) 
     
    23862393                bm = beamDiameter("maximum") 
    23872394                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                 
    23892417           while ( (bs*2.54 < bm) || (bs > 30.0))                       //30 = ridiculous limit to avoid inf loop 
    23902418        endif 
     
    23942422        rw[21] = bs*25.4                //store the BS diameter in mm 
    23952423         
    2396     return (bs*2.54)            //return diameter in cm, not inches for txt 
     2424   return (bs*2.54)             //return diameter in cm, not inches for txt 
    23972425End 
    23982426 
Note: See TracChangeset for help on using the changeset viewer.