Changeset 3703


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

refactoring of GetSSfxuinel

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIconstrGUI.py

    r3699 r3703  
    12871287    UseList = newPhase['Histograms']
    12881288    detTrans = np.abs(nl.det(Trans))
    1289 #    invTrans = nl.inv(Trans)
    12901289    nAcof = G2lat.cell2A(newPhase['General']['Cell'][1:7])
    12911290   
     
    13051304    varyList = []
    13061305    xnames = ['dAx','dAy','dAz']
     1306#    invTrans = nl.inv(Trans)
    13071307#    Us = ['AU11','AU22','AU33','AU12','AU13','AU23']
    13081308#    Uids = [[0,0,'AU11'],[1,1,'AU22'],[2,2,'AU33'],[0,1,'AU12'],[0,2,'AU13'],[1,2,'AU23']]
     
    13561356#                    DepConsDict[Uid[2]].append([abs(nU%1.),G2obj.G2VarObj(parm)])
    13571357#        nUcof = atom[iu:iu+6]
     1358#        conStrings = []
    13581359#        for iU,Usi in enumerate(Us):
    13591360#            parm = '%d::%s;%d'%(npId,Usi,ia)
     
    13611362#            varyList.append(parm)
    13621363#            IndpCon = [1.0,G2obj.G2VarObj(parm)]
     1364#            conStr = str([IndpCon,DepConsDict[Usi]])
     1365#            if conStr in conStrings:
     1366#                continue
     1367#            conStrings.append(conStr)
    13631368#            if len(DepConsDict[Usi]) == 1:
    13641369#                if DepConsDict[Usi][0]:
  • trunk/GSASIIphsGUI.py

    r3693 r3703  
    50055005                            if waveTyp in ['ZigZag','Block','SawTooth','Crenel']:
    50065006                                nx = 1
    5007                             CSI = G2spc.GetSSfxuinel(waveTyp,Stype,1,xyz,SGData,SSGData,debug=True)[0]
     5007                            CSI = G2spc.GetSSfxuinel(waveTyp,Stype,1,xyz,SGData,SSGData)[0]
    50085008                        else:
    5009                             CSI = G2spc.GetSSfxuinel('Fourier',Stype,iwave+1-nx,xyz,SGData,SSGData)
     5009                            CSI = G2spc.GetSSfxuinel('Fourier',Stype,iwave+1-nx,xyz,SGData,SSGData)[0]
    50105010                        waveName = 'Fourier'
    50115011                        if Stype == 'Sfrac':
  • 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.