Changeset 3435 for trunk/GSASIIspc.py


Ignore:
Timestamp:
Jun 14, 2018 3:31:10 PM (4 years ago)
Author:
vondreele
Message:

make new routine GetSpGrpfromUser? & use it inGeneral & Transform fo space group input
modify getHKLpeak to check for magnetic space group extinctions - passes hkl that is allowed by either.
modify G2pwdGUI to retain SGData in Unit Cell data (in ssopts dict)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIspc.py

    r3434 r3435  
    19601960def checkHKLextc(HKL,SGData):
    19611961    '''
    1962     Checks if reflection extinct
     1962    Checks if reflection extinct - does not check centering
    19631963
    19641964    :param HKL:  [h,k,l]
    19651965    :param SGData: space group data obtained from SpcGroup
    1966     :returns: False if  extinct; True if allowed
     1966    :returns: True if extinct; False if allowed
    19671967
    19681968    '''
     
    19781978        else:
    19791979            if phkl%1.:
    1980                 return False
    1981     return True
     1980                return True
     1981    return False
    19821982
    19831983def checkMagextc(HKL,SGData):
    19841984    '''
    1985     Checks if reflection magnetically extinct;
     1985    Checks if reflection magnetically extinct; does fullcheck (centering, too)
    19861986    uses algorthm from Gallego, et al., J. Appl. Cryst. 45, 1236-1247 (2012)
    19871987
    19881988    :param HKL:  [h,k,l]
    19891989    :param SGData: space group data obtained from SpcGroup; must have magnetic symmetry SpnFlp data
    1990     :returns: False if magnetically extinct; True if allowed
     1990    :returns: True if magnetically extinct; False if allowed (to match GenHKLf)
    19911991
    19921992    '''
     
    19951995    OpM = np.array([op[0] for op in Ops])
    19961996    OpT = np.array([op[1] for op in Ops])
    1997     if SGData['SGInv']:
     1997    if SGData['SGInv'] and not SGData['SGFixed']:
    19981998        OpM = np.vstack((OpM,-OpM))
    19991999        OpT = np.vstack((OpT,-OpT))%1.
     
    20172017            Psum += pterm
    20182018    if nsum/nA > 1.:        #only need to look at nA=1 frok eq(8)
     2019        return False
     2020    if np.allclose(Psum,np.zeros(3)):
    20192021        return True
    2020     if np.allclose(Psum,np.zeros(3)):
    2021         return False
    20222022    else:
    20232023        if np.inner(HKL,Psum):
    2024             return False
    2025         return True
     2024            return True
     2025        return False
    20262026   
    20272027def checkSSextc(HKL,SSGData):
Note: See TracChangeset for help on using the changeset viewer.