Changeset 3435 for trunk/GSASIIspc.py
- Timestamp:
- Jun 14, 2018 3:31:10 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIspc.py
r3434 r3435 1960 1960 def checkHKLextc(HKL,SGData): 1961 1961 ''' 1962 Checks if reflection extinct 1962 Checks if reflection extinct - does not check centering 1963 1963 1964 1964 :param HKL: [h,k,l] 1965 1965 :param SGData: space group data obtained from SpcGroup 1966 :returns: False if extinct; True if allowed1966 :returns: True if extinct; False if allowed 1967 1967 1968 1968 ''' … … 1978 1978 else: 1979 1979 if phkl%1.: 1980 return False1981 return True1980 return True 1981 return False 1982 1982 1983 1983 def checkMagextc(HKL,SGData): 1984 1984 ''' 1985 Checks if reflection magnetically extinct; 1985 Checks if reflection magnetically extinct; does fullcheck (centering, too) 1986 1986 uses algorthm from Gallego, et al., J. Appl. Cryst. 45, 1236-1247 (2012) 1987 1987 1988 1988 :param HKL: [h,k,l] 1989 1989 :param SGData: space group data obtained from SpcGroup; must have magnetic symmetry SpnFlp data 1990 :returns: False if magnetically extinct; True if allowed1990 :returns: True if magnetically extinct; False if allowed (to match GenHKLf) 1991 1991 1992 1992 ''' … … 1995 1995 OpM = np.array([op[0] for op in Ops]) 1996 1996 OpT = np.array([op[1] for op in Ops]) 1997 if SGData['SGInv'] :1997 if SGData['SGInv'] and not SGData['SGFixed']: 1998 1998 OpM = np.vstack((OpM,-OpM)) 1999 1999 OpT = np.vstack((OpT,-OpT))%1. … … 2017 2017 Psum += pterm 2018 2018 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)): 2019 2021 return True 2020 if np.allclose(Psum,np.zeros(3)):2021 return False2022 2022 else: 2023 2023 if np.inner(HKL,Psum): 2024 return False2025 return True2024 return True 2025 return False 2026 2026 2027 2027 def checkSSextc(HKL,SSGData):
Note: See TracChangeset
for help on using the changeset viewer.