Changeset 3703 for trunk/GSASIIspc.py


Ignore:
Timestamp:
Oct 24, 2018 4:30:34 PM (3 years ago)
Author:
vondreele
Message:

refactoring of GetSSfxuinel

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIspc.py

    r3681 r3703  
    25572557       
    25582558    def DoFrac():
    2559         dF = None
    2560         dFTP = None
     2559        delt2 = np.eye(2)*0.001
     2560        dF = fracFourier(tau,nH,delt2[:1],delt2[1:]).squeeze()
     2561        dFTP = []
    25612562        if siteSym == '1':
    25622563            CSI = [[1,0],[2,0]],2*[[1.,0.],]
     
    25642565            CSI = [[1,0],[0,0]],2*[[1.,0.],]
    25652566        else:
    2566             delt2 = np.eye(2)*0.001
    25672567            FSC = np.ones(2,dtype='i')
    25682568            CSI = [np.zeros((2),dtype='i'),np.zeros(2)]
     
    26152615       
    26162616    def DoXYZ():
    2617         dX,dXTP = None,None
     2617        delt4 = np.ones(4)*0.001
     2618        delt5 = np.ones(5)*0.001
     2619        delt6 = np.eye(6)*0.001
     2620        if 'Fourier' in waveType:
     2621            dX = posFourier(tau,nH,delt6[:3],delt6[3:]) #+np.array(XYZ)[:,nxs,nxs]
     2622              #3x6x12 modulated position array (X,Spos,tau)& force positive
     2623        elif waveType == 'Sawtooth':
     2624            dX = posSawtooth(tau,delt4[0],delt4[1:])
     2625        elif waveType in ['ZigZag','Block']:
     2626            if waveType == 'ZigZag':
     2627                dX = posZigZag(tau,delt5[:2],delt5[2:])
     2628            else:
     2629                dX = posBlock(tau,delt5[:2],delt5[2:])
     2630        dXTP = []
    26182631        if siteSym == '1':
    26192632            CSI = [[1,0,0],[2,0,0],[3,0,0], [4,0,0],[5,0,0],[6,0,0]],6*[[1.,0.,0.],]
     
    26212634            CSI = [[1,0,0],[2,0,0],[3,0,0], [0,0,0],[0,0,0],[0,0,0]],3*[[1.,0.,0.],]+3*[[0.,0.,0.],]
    26222635        else:
    2623             delt4 = np.ones(4)*0.001
    2624             delt5 = np.ones(5)*0.001
    2625             delt6 = np.eye(6)*0.001
    26262636            if 'Fourier' in waveType:
    2627                 dX = posFourier(tau,nH,delt6[:3],delt6[3:]) #+np.array(XYZ)[:,nxs,nxs]
    2628                   #3x6x12 modulated position array (X,Spos,tau)& force positive
    26292637                CSI = [np.zeros((6,3),dtype='i'),np.zeros((6,3))]
    26302638            elif waveType == 'Sawtooth':
    2631                 dX = posSawtooth(tau,delt4[0],delt4[1:])
    26322639                CSI = [np.array([[1,0,0],[2,0,0],[3,0,0],[4,0,0]]),
    26332640                    np.array([[1.0,.0,.0],[1.0,.0,.0],[1.0,.0,.0],[1.0,.0,.0]])]
    26342641            elif waveType in ['ZigZag','Block']:
    2635                 if waveType == 'ZigZag':
    2636                     dX = posZigZag(tau,delt5[:2],delt5[2:])
    2637                 else:
    2638                     dX = posBlock(tau,delt5[:2],delt5[2:])
    26392642                CSI = [np.array([[1,0,0],[2,0,0],[3,0,0],[4,0,0],[5,0,0]]),
    26402643                    np.array([[1.0,.0,.0],[1.0,.0,.0],[1.0,.0,.0],[1.0,.0,.0],[1.0,.0,.0]])]
     
    27172720       
    27182721    def DoUij():
    2719         dU,dUTP = None,None
     2722        delt12 = np.eye(12)*0.0001
     2723        dU = posFourier(tau,nH,delt12[:6],delt12[6:])                  #Uij modulations - 6x12x12 array
     2724        dUTP = []
    27202725        if siteSym == '1':
    27212726            CSI = [[1,0,0],[2,0,0],[3,0,0],[4,0,0],[5,0,0],[6,0,0],
     
    27252730                6*[[0.,0.,0.],]+[[1.,0.,0.],[1.,0.,0.],[1.,0.,0.],[1.,0.,0.],[1.,0.,0.],[1.,0.,0.]]
    27262731        else:
    2727             tau = np.linspace(0,1,49,True)
    2728             delt12 = np.eye(12)*0.0001
    2729             dU = posFourier(tau,nH,delt12[:6],delt12[6:])                  #Uij modulations - 6x12x12 array
    27302732            CSI = [np.zeros((12,3),dtype='i'),np.zeros((12,3))]
    27312733            USC = np.ones(12,dtype='i')
     
    28302832   
    28312833    def DoMag():
    2832         dM = []
     2834        delt6 = np.eye(6)*0.001
     2835        dM = posFourier(tau,nH,delt6[:3],delt6[3:]) #+np.array(Mxyz)[:,nxs,nxs]
    28332836        dMTP = []
    28342837        CSI = [[1,0,0],[2,0,0],[3,0,0], [4,0,0],[5,0,0],[6,0,0]],6*[[1.,0.,0.],]
     
    28382841            CSI = 3*[[0,0,0],]+[[1,0,0],[2,0,0],[3,0,0]],3*[[0.,0.,0.],]+3*[[1.,0.,0.],]
    28392842        else:
    2840             tau = np.linspace(0,1,49,True)
    2841             delt6 = np.eye(6)*0.001
    2842             dM = posFourier(tau,nH,delt6[:3],delt6[3:]) #+np.array(Mxyz)[:,nxs,nxs]
    28432843              #3x6x12 modulated moment array (M,Spos,tau)& force positive
    28442844            CSI = [np.zeros((6,3),dtype='i'),np.zeros((6,3))]
     
    29552955        return CSI,dF,dFTP
    29562956    else:
    2957         return CSI
     2957        return CSI,[],[]
    29582958   
    29592959def MustrainNames(SGData):
Note: See TracChangeset for help on using the changeset viewer.