Changeset 1694 for trunk/GSASIIimage.py


Ignore:
Timestamp:
Mar 10, 2015 11:35:24 AM (7 years ago)
Author:
vondreele
Message:

some missing stuff in PWDR[0] dictionary
add new fxn to G2img - meanAZm - calc effective azimuth for a azm range for correct polarization calc.
fix some FlexGridSizers? in G2phsGUI
fix '+'/'=' key response for Anaconda vs Enthought versions; one sees '=' the other sees '+'!
fix L/R shifting in waterfall plots.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIimage.py

    r1665 r1694  
    4949npatand = lambda x: 180.*np.arctan(x)/np.pi
    5050npatan2d = lambda y,x: 180.*np.arctan2(y,x)/np.pi
    51    
    5251debug = False
    5352   
     
    428427    'Give azimuth value for detector x,y position; calibration info in data'
    429428    return GetTthAzmDsp(x,y,data)[1]
     429   
     430def meanAzm(a,b):
     431    AZM = lambda a,b: npacosd(0.5*(npsind(2.*b)-npsind(2.*a))/(np.pi*(b-a)/180.))/2.
     432    azm = AZM(a,b)
     433    quad = int((a+b)/180.)
     434    if quad == 1:
     435        azm = 180.-azm
     436    elif quad == 2:
     437        azm += 180.
     438    elif quad == 3:
     439        azm = 360-azm
     440    return azm     
    430441       
    431442def ImageCompress(image,scale):
Note: See TracChangeset for help on using the changeset viewer.