Changeset 3982 for trunk/GSASIImath.py


Ignore:
Timestamp:
May 17, 2019 2:19:25 PM (3 years ago)
Author:
vondreele
Message:

begin work on MEM interface to Dysnomia
Change fourier/cf "Resolution" to "GridStep?"; GridStep? now the real step size (Resolution was 2X th estep size)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIImath.py

    r3964 r3982  
    30683068        return
    30693069    mapData = generalData['Map']
    3070     dmin = mapData['Resolution']
     3070    dmin = mapData['GridStep']*2.
    30713071    SGData = generalData['SGData']
    30723072    SGMT = np.array([ops[0].T for ops in SGData['SGOps']])
     
    31193119    mapData['rhoMax'] = max(np.max(mapData['rho']),-np.min(mapData['rho']))
    31203120    mapData['minmax'] = [np.max(mapData['rho']),np.min(mapData['rho'])]
    3121     print ('Omit map time: %.4f no. elements: %d'%(time.time()-time0,Fhkl.size))
     3121    print ('Omit map time: %.4f no. elements: %d dimensions: %s'%(time.time()-time0,Fhkl.size,str(Fhkl.shape)))
    31223122    return mapData
    31233123   
     
    31323132    generalData = data['General']
    31333133    mapData = generalData['Map']
    3134     dmin = mapData['Resolution']
     3134    dmin = mapData['GridStep']*2.
    31353135    SGData = generalData['SGData']
    31363136    SGMT = np.array([ops[0].T for ops in SGData['SGOps']])
     
    31853185                    Fhkl[h,k,l] = complex(Fosq,0.)
    31863186    rho = fft.fftn(fft.fftshift(Fhkl))/cell[6]
    3187     print ('Fourier map time: %.4f'%(time.time()-time0),'no. elements: %d'%(Fhkl.size))
     3187    print ('Fourier map time: %.4f no. elements: %d dimensions: %s'%(time.time()-time0,Fhkl.size,str(Fhkl.shape)))
    31883188    mapData['Type'] = reflDict['Type']
    31893189    mapData['rho'] = np.real(rho)
     
    32023202    map4DData = generalData['4DmapData']
    32033203    mapData = generalData['Map']
    3204     dmin = mapData['Resolution']
     3204    dmin = mapData['GridStep']*2.
    32053205    SGData = generalData['SGData']
    32063206    SSGData = generalData['SSGData']
     
    32563256    mapData['rhoMax'] = max(np.max(mapData['rho']),-np.min(mapData['rho']))
    32573257    mapData['minmax'] = [np.max(mapData['rho']),np.min(mapData['rho'])]
    3258     print ('Fourier map time: %.4f'%(time.time()-time0),'no. elements: %d'%(Fhkl.size))
     3258    print ('Fourier map time: %.4f no. elements: %d dimensions: %s'%(time.time()-time0,Fhkl.sizestr(Fhkl.shape)))
    32593259
    32603260# map printing for testing purposes
     
    33733373            if ff['Symbol'] == normElem:
    33743374                FFtable.update(ff)
    3375     dmin = flipData['Resolution']
     3375    dmin = flipData['GridStep']*2.
    33763376    SGData = generalData['SGData']
    33773377    SGMT = np.array([ops[0].T for ops in SGData['SGOps']])
     
    35403540            if ff['Symbol'] == normElem:
    35413541                FFtable.update(ff)
    3542     dmin = flipData['Resolution']
     3542    dmin = flipData['GridStep']*2.
    35433543    SGData = generalData['SGData']
    35443544    SSGData = generalData['SSGData']
     
    37733773            rho = copy.copy(mapData['rho'])     #don't mess up original
    37743774        mapHalf = np.array(rho.shape)/2
    3775         res = mapData['Resolution']
     3775        res = mapData['GridStep']*2.
    37763776        incre = np.array(rho.shape,dtype=np.float)
    37773777        step = max(1.0,1./res)+1
     
    39013901            Ind.append(ind)
    39023902    return Ind
     3903
     3904################################################################################
     3905##### Dysnomia setup & return stuff
     3906################################################################################
     3907   
     3908
    39033909   
    39043910################################################################################
Note: See TracChangeset for help on using the changeset viewer.