Changeset 2228


Ignore:
Timestamp:
Apr 26, 2016 12:35:00 PM (6 years ago)
Author:
vondreele
Message:

fixes to Transform of unit cell contents

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIgrid.py

    r2219 r2228  
    415415                SGTxt.SetValue(self.Phase['General']['SGData']['SpGrp'])
    416416                msg = 'Space Group Information'
    417                 SGMessageBox(self.panel,msg,text,table).Show()
     417                dlg = SGMessageBox(self.panel,msg,text,table)
     418                dlg.Show()
     419                dlg.Destroy()
    418420#            if self.Phase['General']['Type'] in ['modulated',]:
    419421#                self.Phase['General']['SuperSg'] = SetDefaultSSsymbol()
  • trunk/GSASIIlattice.py

    r2219 r2228  
    243243    invTrans = nl.inv(Trans)
    244244    newAtoms = FillUnitCell(oldPhase)
     245    Unit = [int(max(unit))-1 for unit in Trans]
     246    for i,unit in enumerate(Unit):
     247        if unit > 0:
     248            for j in range(unit):
     249                moreAtoms = copy.deepcopy(newAtoms)
     250                for atom in moreAtoms:
     251                    atom[cx+i] += 1.
     252                newAtoms += moreAtoms
    245253    for atom in newAtoms:
    246254        atom[cx:cx+3] = TransformXYZ(atom[cx:cx+3],invTrans.T,Vec)
     
    259267    SGData = Phase['General']['SGData']
    260268    cx,ct,cs,cia = Phase['General']['AtomPtrs']
     269    unit = np.zeros(3)
    261270    for atom in Atoms:
    262271        XYZ = np.array(atom[cx:cx+3])
     
    268277            for item in result:
    269278                if item[0][2] >= .95: item[0][2] -= 1.
    270                 atom[cx:cx+3] = item[0]+unit
     279                atom[cx:cx+3] = item[0]
    271280                atom[cia+2:cia+8] = item[1]
    272281                atomData.append(atom[:cia+9])  #not SS stuff
    273282        else:
    274             result = G2spc.GenAtom(XYZ,SGData,False,Move=True)
     283            result = G2spc.GenAtom(xyz,SGData,False,Move=True)
    275284            for item in result:
    276285                if item[0][2] >= .95: item[0][2] -= 1.
    277                 atom[cx:cx+3] = item[0]+unit
     286                atom[cx:cx+3] = item[0]
    278287                atomData.append(atom[:cia+9])  #not SS stuff
    279288    return atomData
     
    296305    XYZ = {}
    297306    for ind in range(Ind):
    298         XYZ[ind] = np.array(Atoms[ind][cx:cx+3])
     307        XYZ[ind] = np.array(Atoms[ind][cx:cx+3])%1.
    299308        Indx[ind] = True
    300309    for ind in range(Ind):
  • trunk/imports/G2img_GE.py

    r2227 r2228  
    4747    def Reader(self,filename,filepointer, ParentFrame=None, **kwarg):
    4848        '''Read using GE file reader, :func:`GetGEsumData`
    49         should this read all blocks & sum them if desired?
    5049        '''
    5150        #rdbuffer = kwarg.get('buffer')
     
    8685    def Reader(self,filename,filepointer, ParentFrame=None, **kwarg):
    8786        '''Read using GE file reader, :func:`GetGEsumData`
    88         should this read all blocks & sum them if desired?
    8987        '''
    9088        #rdbuffer = kwarg.get('buffer')
     
    9997        return True
    10098
    101 def GetGEsumData(filename,imagenum=1,sum=False):  #
     99def GetGEsumData(filename,imagenum=1,sum=False):
    102100    '''Read G.E. detector images from various files as produced at 1-ID and
    103101    with Detector Pool detector. Also sums multiple image files if desired
Note: See TracChangeset for help on using the changeset viewer.