Changeset 3765 for trunk/GSASIIspc.py


Ignore:
Timestamp:
Dec 15, 2018 1:42:13 PM (5 years ago)
Author:
vondreele
Message:

allow a selected data copy of 'newLeBail' flag - facilitates sequential LeBail?
remove SawTooth? as modulation fxn - duplicates ZigZag?

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIspc.py

    r3754 r3765  
    25842584        return A+B   
    25852585
    2586     def posSawtooth(tau,Toff,slopes):
    2587         Tau = (tau-Toff)%1.
    2588         A = slopes[:,nxs]*Tau
    2589         return A
    2590    
    25912586    def posZigZag(tau,Tmm,XYZmax):
    25922587        DT = Tmm[1]-Tmm[0]
     
    26652660            dX = posFourier(tau,nH,delt6[:3],delt6[3:]) #+np.array(XYZ)[:,nxs,nxs]
    26662661              #3x6x12 modulated position array (X,Spos,tau)& force positive
    2667         elif waveType == 'Sawtooth':
    2668             dX = posSawtooth(tau,delt4[0],delt4[1:])
    26692662        elif waveType in ['ZigZag','Block']:
    26702663            if waveType == 'ZigZag':
     
    26802673            if 'Fourier' in waveType:
    26812674                CSI = [np.zeros((6,3),dtype='i'),np.zeros((6,3))]
    2682             elif waveType == 'Sawtooth':
    2683                 CSI = [np.array([[1,0,0],[2,0,0],[3,0,0],[4,0,0]]),
    2684                     np.array([[1.0,.0,.0],[1.0,.0,.0],[1.0,.0,.0],[1.0,.0,.0]])]
    26852675            elif waveType in ['ZigZag','Block']:
    26862676                CSI = [np.array([[1,0,0],[2,0,0],[3,0,0],[4,0,0],[5,0,0]]),
     
    26952685                if 'Fourier' in waveType:
    26962686                    dXT = posFourier(np.sort(tauT),nH,delt6[:3],delt6[3:])   #+np.array(XYZ)[:,nxs,nxs]
    2697                 elif waveType == 'Sawtooth':
    2698                     dXT = posSawtooth(tauT,delt4[0],delt4[1:])+np.array(XYZ)[:,nxs,nxs]
    26992687                elif waveType == 'ZigZag':
    27002688                    dXT = posZigZag(tauT,delt5[:2],delt5[2:])+np.array(XYZ)[:,nxs,nxs]
     
    27502738                                CSI[1][:2] = [[1.,0,0],[mul,0,0]]
    27512739                                xsc[:2] = 0
     2740                else:
     2741                    for i in range(3):
     2742                        if not np.allclose(dX[:,i],dXT[i,:,i]):
     2743                            xsc[i] = 0
    27522744                XSC &= xsc
    27532745                if debug: print (SSMT2text(ssop).replace(' ',''),sdet,ssdet,epsinv,xsc)
Note: See TracChangeset for help on using the changeset viewer.