Changeset 738 for trunk/GSASIImath.py
 Timestamp:
 Aug 26, 2012 12:54:17 PM (11 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/GSASIImath.py
r736 r738 938 938 rho[rMM[0]:rMP[0],rMM[1]:rMP[1],rMM[2]:rMP[2]] = peakFunc(x1,rX,rY,rZ,rhoPeak,res,SGData['SGLaue']) 939 939 rho = np.roll(np.roll(np.roll(rho,rMI[2],axis=2),rMI[1],axis=1),rMI[0],axis=0) 940 if SGData['SGInv']: #check origin location & fix it if needed  centrosymmetric only941 Ocheck = np.zeros_like(rho)942 for ipeak in peaks:943 for opeak in peaks:944 dx = ((opeakipeak)*incre)%incre945 if np.any(dx): #avoid self vector946 Ocheck[dx[0],dx[1],dx[2]] += 1947 dxMax = np.unravel_index(np.argmax(Ocheck),rho.shape)948 print 'Inversion at:',dxMax,' shift by ;',dxMaxmapHalf,' map size:',rho.shape949 rho = np.roll(np.roll(np.roll(rho,dxMax[2],axis=2),dxMax[1],axis=1),dxMax[0],axis=0)950 for peak in peaks:951 peak = (peak(dxMax+mapHalf)/incre)%1.0940 # if SGData['SGInv']: #check origin location & fix it if needed  centrosymmetric only 941 # Ocheck = np.zeros_like(rho) 942 # for ipeak in peaks: 943 # for opeak in peaks: 944 # dx = ((opeakipeak)*incre)%incre 945 # if np.any(dx): #avoid self vector 946 # Ocheck[dx[0],dx[1],dx[2]] += 1 947 # dxMax = np.unravel_index(np.argmax(Ocheck),rho.shape) 948 # print 'Inversion at:',dxMax,' shift by ;',dxMaxmapHalf,' map size:',rho.shape 949 # rho = np.roll(np.roll(np.roll(rho,dxMax[2],axis=2),dxMax[1],axis=1),dxMax[0],axis=0) 950 # for peak in peaks: 951 # peak = (peak(dxMax+mapHalf)/incre)%1.0 952 952 953 953 return np.array(peaks),np.array([mags,]).T,np.array([dzeros,]).T
Note: See TracChangeset
for help on using the changeset viewer.