Changeset 1912


Ignore:
Timestamp:
Jun 29, 2015 9:06:28 AM (7 years ago)
Author:
vondreele
Message:

more twin stuff - nonmerohedral mods
refl[3] now twin id not mul.

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASII.py

    r1910 r1912  
    843843                        H = hkl
    844844                    ref[4+Super] = np.sqrt(1./G2lat.calc_rDsq2(H,G))
    845                     iabsnt,ref[3+Super],Uniq,phi = G2spc.GenHKLf(H,SGData)
     845                    iabsnt,mul,Uniq,phi = G2spc.GenHKLf(H,SGData)
    846846                    if iabsnt:  #flag space gp. absences
    847847                        ref[3+Super] = 0
  • trunk/GSASIIpwdGUI.py

    r1911 r1912  
    31553155            [wg.GRID_VALUE_FLOAT+':10,3',]
    31563156        if HKLF:
    3157             colLabels = ['H','K','L','mul','d','Fosq','sig','Fcsq','FoTsq','FcTsq','phase','ExtC',]
     3157            colLabels = ['H','K','L','twin','d','Fosq','sig','Fcsq','FoTsq','FcTsq','phase','ExtC',]
    31583158            if 'T' in Inst['Type'][0]:
    3159                 colLabels = ['H','K','L','mul','d','Fosq','sig','Fcsq','FoTsq','FcTsq','phase','ExtC','wave','tbar']
     3159                colLabels = ['H','K','L','twin','d','Fosq','sig','Fcsq','FoTsq','FcTsq','phase','ExtC','wave','tbar']
    31603160                Types += 2*[wg.GRID_VALUE_FLOAT+':10,3',]
    31613161            if Super:
  • trunk/GSASIIstrMath.py

    r1910 r1912  
    853853        refl = refDict['RefList'][iBeg:iFin]    #array(blkSize,nItems)
    854854        H = refl.T[:3]                          #array(blkSize,3)
    855         H = np.squeeze(np.inner(H.T,TwinLaw))   #maybe array(blkSize,3,nTwins) or (blkSize,3)
     855        H = np.squeeze(np.inner(H.T,TwinLaw))   #maybe array(blkSize,nTwins,3) or (blkSize,3)
     856        TwMask = np.any(H,axis=2)
     857        if TwinLaw.shape[0] > 1 and TwinDict:
     858            for ir in range(blkSize):
     859                iref = ir+iBeg
     860                if iref in TwinDict:
     861                    for i in TwinDict[iref]:
     862                        H[ir][i] = TwinDict[iref][i]
     863            TwMask = np.any(H,axis=2)
    856864        SQ = 1./(2.*refl.T[4])**2               #array(blkSize)
    857865        SQfactor = 4.0*SQ*twopisq               #ditto prev.
  • trunk/imports/G2sfact.py

    r1910 r1912  
    117117                sigFo = float(sigFo)
    118118                # h,k,l,m,dsp,Fo2,sig,Fc2,Fot2,Fct2,phase,...
    119                 self.RefDict['RefList'].append([h,k,l,0,0,Fo,sigFo,0,Fo,0,0,0])
     119                self.RefDict['RefList'].append([h,k,l,1,0,Fo,sigFo,0,Fo,0,0,0])
    120120                #self.RefDict['FF'].append({}) # now done in OnImportSfact
    121121            self.errors = 'Error after reading reflections (unexpected!)'
     
    150150    def ContentsValidator(self, filepointer):
    151151        'Discover how many characters are in the SHELX file - could be 32-44 depending on satellites'
    152         numCols = 0
     152        numCols = 0     #this needs to be done differently
    153153        for i,line in enumerate(filepointer):
    154154            numCols = max(numCols,len(line.split()))
     
    175175                    h,k,l,m1 = [int(h),int(k),int(l),int(m1)]
    176176                Tw = Tw.strip()
    177                 if not any([h,k,l]):
    178                     break
    179                 if Tw not in ['','0','1']:
     177                if Tw in ['','0']:
     178                    Tw = '1'
     179                if not any([h,k,l]):
     180                    break
     181                if '-' in Tw:
    180182                    TwId = -int(Tw)-1
    181183                    TwMax = max(TwMax,TwId)
     
    189191                    # h,k,l,m,dsp,Fo2,sig,Fc2,Fot2,Fct2,phase,...
    190192                    if self.Super == 0:
    191                         self.RefDict['RefList'].append([h,k,l,0,0,Fo,sigFo,0,Fo,0,0,0])
     193                        self.RefDict['RefList'].append([h,k,l,int(Tw),0,Fo,sigFo,0,Fo,0,0,0])
    192194                    elif self.Super == 1:
    193                         self.RefDict['RefList'].append([h,k,l,m1,0,0,Fo,sigFo,0,Fo,0,0,0])
     195                        self.RefDict['RefList'].append([h,k,l,m1,int(Tw),0,Fo,sigFo,0,Fo,0,0,0])
    194196            self.errors = 'Error after reading reflections (unexpected!)'
    195197            self.RefDict['RefList'] = np.array(self.RefDict['RefList'])
Note: See TracChangeset for help on using the changeset viewer.