Changeset 2014
- Timestamp:
- Oct 16, 2015 2:03:54 PM (7 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIImath.py
r2009 r2014 926 926 ################################################################################ 927 927 928 def Modulation(waveTypes,H, Phi,FSSdata,XSSdata,USSdata,Mast):928 def Modulation(waveTypes,H,FSSdata,XSSdata,USSdata,Mast): 929 929 ''' 930 930 H: array nRefBlk x ops X hklt … … 985 985 return np.array([cosHA,sinHA]) # 2 x refBlk x SGops x atoms 986 986 987 def ModulationDerv(waveTypes,H, Phi,Hij,FSSdata,XSSdata,USSdata,Mast):987 def ModulationDerv(waveTypes,H,Hij,FSSdata,XSSdata,USSdata,Mast): 988 988 ''' 989 989 H: array ops X hklt … … 996 996 nxs = np.newaxis 997 997 numeric = True 998 cosHA,sinHA = Modulation(waveTypes,np.array([H,]), np.array([Phi,]),FSSdata,XSSdata,USSdata,Mast)998 cosHA,sinHA = Modulation(waveTypes,np.array([H,]),FSSdata,XSSdata,USSdata,Mast) 999 999 Mf = [H.shape[0],]+list(FSSdata.T.shape) #ops x atoms x waves x 2 (sin+cos frac mods) 1000 1000 dGdMfC = np.zeros(Mf) -
trunk/GSASIIstrMath.py
r2006 r2014 1066 1066 fa = np.array([np.reshape(((FF+FP).T-Bab).T,cosp.shape)*cosp*Tcorr,-Flack*FPP*sinp*Tcorr]) 1067 1067 fb = np.array([Flack*FPP*cosp*Tcorr,np.reshape(((FF+FP).T-Bab).T,sinp.shape)*sinp*Tcorr]) 1068 GfpuA = G2mth.Modulation(waveTypes,Uniq, Phi,FSSdata,XSSdata,USSdata,Mast) #2 x refBlk x sym X atoms1068 GfpuA = G2mth.Modulation(waveTypes,Uniq,FSSdata,XSSdata,USSdata,Mast) #2 x refBlk x sym X atoms 1069 1069 fag = fa*GfpuA[0]-fb*GfpuA[1] #real; 2 x refBlk x sym x atoms 1070 1070 fbg = fb*GfpuA[0]+fa*GfpuA[1] … … 1197 1197 fot = (FF+FP-Bab)*Tcorr #ops x atoms 1198 1198 fotp = FPP*Tcorr #ops x atoms 1199 GfpuA,dGdf,dGdx,dGdu = G2mth.ModulationDerv(waveTypes,Uniq, Phi,Hij,FSSdata,XSSdata,USSdata,Mast)1199 GfpuA,dGdf,dGdx,dGdu = G2mth.ModulationDerv(waveTypes,Uniq,Hij,FSSdata,XSSdata,USSdata,Mast) 1200 1200 # derivs are: ops x atoms x waves x 1,3,or 6 parms as [real,imag] parts 1201 1201 fa = np.array([((FF+FP).T-Bab).T*cosp*Tcorr,-Flack*FPP*sinp*Tcorr]) # array(2,nTwin,nEqv,nAtoms)
Note: See TracChangeset
for help on using the changeset viewer.