Changeset 2192


Ignore:
Timestamp:
Apr 1, 2016 1:35:44 PM (7 years ago)
Author:
vondreele
Message:

fix bug in absorption correction in image integration

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIimgGUI.py

    r2184 r2192  
    8484            backImage += darkImage*darkScale               
    8585        sumImg += backImage*backScale
    86     sumImg -= data['Flat Bkg']
     86    sumImg -= data.get('Flat Bkg',0.)
    8787    return sumImg
    8888   
  • trunk/GSASIIpwd.py

    r2191 r2192  
    131131    '''
    132132   
    133     def muRunder3(Sth2):
     133    def muRunder3(MuR,Sth2):
    134134        T0 = 16.0/(3.*np.pi)
    135135        T1 = (25.99978-0.01911*Sth2**0.25)*np.exp(-0.024551*Sth2)+ \
     
    141141        return np.exp(Trns)
    142142   
    143     def muRover3(Sth2):
     143    def muRover3(MuR,Sth2):
    144144        T1 = 1.433902+11.07504*Sth2-8.77629*Sth2*Sth2+ \
    145145            10.02088*Sth2**3-3.36778*Sth2**4
     
    155155    Cth2 = 1.-Sth2
    156156    if 'Cylinder' in Geometry:      #Lobanov & Alte da Veiga for 2-theta = 0; beam fully illuminates sample
    157         if MuR <= 3.0:
    158             return muRunder3(Sth2)
     157        if 'array' in str(type(MuR)):
     158            MuRSTh2 = np.concatenate((MuR,Sth2))
     159            AbsCr = np.where(MuRSTh2[0]<=3.0,muRunder3(MuRSTh2[0],MuRSTh2[1]),muRover3(MuRSTh2[0],MuRSTh2[1]))
     160            return AbsCr
    159161        else:
    160             return muRover3(Sth2)
     162            if MuR <= 3.0:
     163                return muRunder3(MuR,Sth2)
     164            else:
     165                return muRover3(MuR,Sth2)
    161166    elif 'Bragg' in Geometry:
    162167        return 1.0
Note: See TracChangeset for help on using the changeset viewer.