Changeset 1978 for trunk/GSASIImath.py


Ignore:
Timestamp:
Sep 24, 2015 4:34:39 PM (8 years ago)
Author:
vondreele
Message:

fix to update reflections in HKLplot
remove ZigZag? from incommensurate list
add pylab to G2math if in debug mode
revisions to modulations anticipating Crenel & Sawtooth
fixes to SS structure factor calcs. Some success.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIImath.py

    r1977 r1978  
    3535import scipy.optimize as so
    3636import pypowder as pwd
     37if GSASIIpath.GetConfigValue('debug'):
     38    import pylab as pl
    3739
    3840sind = lambda x: np.sin(x*np.pi/180.)
     
    939941            nf = 0
    940942            nx = 0
    941             XmodZ = 0
    942             FmodZ = 0
     943            XmodZ = np.zeros((Ax.shape[0],Ax.shape[1],3,32))
     944            FmodZ = np.zeros((Af.shape[0],Af.shape[1],32))
    943945            if 'Crenel' in waveTypes:
     946                nC = np.where('Crenel' in waveTypes)
    944947                nf = 1
    945                 FmodC = 0   #replace
     948                #FmodZ = 0   replace
    946949        else:
    947950            nx = 1
    948951            if 'Sawtooth' in waveTypes:
    949                 XmodZ = 0   #replace
    950             else:
    951                 XmodZ = 0   #replace (use?)
     952                nS = np.where('Sawtooth' in waveTypes)
     953                #XmodZ = 0   replace
    952954        if Af.shape[1]:
    953955            tauF = np.arange(1.,Af.shape[1]+1-nf)[:,nxs]*glTau  #Fwaves x 32
    954             FmodA = Af[:,nf:,nxs]*np.sin(twopi*tauF[nxs,:,:])
     956            FmodA = Af[:,nf:,nxs]*np.sin(twopi*tauF[nxs,:,:])   #atoms X Fwaves X 32
    955957            FmodB = Bf[:,nf:,nxs]*np.cos(twopi*tauF[nxs,:,:])
    956             Fmod = np.sum(FmodA+FmodB+FmodC,axis=1)
     958            Fmod = np.sum(FmodA+FmodB+FmodC,axis=1)             #atoms X 32; sum waves
    957959        else:
    958960            Fmod = 1.0           
Note: See TracChangeset for help on using the changeset viewer.