Changeset 1913


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

fix sfact importers so twin id=1 by default
GUI details for twins fixed

Location:
trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASII.BAT

    r1611 r1913  
    1111@echo ========================================================================
    1212@
    13 @REM Get this script's directory; make sure that the path ends
    14 @REM    with a single backslash
    15 @set gsasloc=%~dp0\*
    16 @set gsasloc=%gsasloc:\\*=\*%
    17 @set gsasloc=%gsasloc:\*=\%
    18 @rem one can use a specific reference to a python via, e.g.:
    19 @set pythonloc=%D:\Python27\python%
    20 %pythonloc% "%gsasloc%\GSASII.py" %1
     13D:\Python27\python.exe d:\GSASII\GSASII.py "%~1"
    2114@REM To keep the window from disappearing with any error messages
    2215pause
  • trunk/GSASII.py

    r1912 r1913  
    834834                G,g = G2lat.cell2Gmat(generalData['Cell'][1:7])
    835835                UseList[histoName]['Twins'] = [[np.array([[1,0,0],[0,1,0],[0,0,1]]),[1.0,False]],]
    836                 for iT in range(reflData['TwMax']):
     836                for iT in range(reflData.get('TwMax',0)):
    837837                    UseList[histoName]['Twins'].append([[],0.0])
    838838                for iref,ref in enumerate(reflData['RefList']):
  • trunk/GSASIIddataGUI.py

    r1910 r1913  
    795795                uvw = UseList[G2frame.hist]['Twins'][it][0][im]
    796796            UseList[G2frame.hist]['Twins'][it][0][im] = uvw
    797             Obj.SetValue('%d %d %d'%(uvw[0],uvw[1],uvw[2]))
     797            Obj.SetValue('%3d %3d %3d'%(uvw[0],uvw[1],uvw[2]))
    798798           
    799799        def OnTwinVal(event):
  • trunk/GSASIIpwdGUI.py

    r1912 r1913  
    31983198        G2frame.dataFrame.SetLabel('Reflection List for '+phaseName)
    31993199        if HKLF:
    3200             Status.SetStatusText('abs(DF)/sig > 10 red; > 3 yellow; mul < 0 (user rejected) red; mul=0 (sp. gp. absent) red')
     3200            Status.SetStatusText('abs(DF)/sig > 10 red; > 3 yellow; twin < 0 (user rejected) red; twin=0 (sp. gp. absent) red')
    32013201        else:
    32023202            Status.SetStatusText('Prfo < 0. in red')
  • trunk/GSASIIstrMath.py

    r1912 r1913  
    854854        H = refl.T[:3]                          #array(blkSize,3)
    855855        H = np.squeeze(np.inner(H.T,TwinLaw))   #maybe array(blkSize,nTwins,3) or (blkSize,3)
    856         TwMask = np.any(H,axis=2)
     856        TwMask = np.any(H,axis=-1)
    857857        if TwinLaw.shape[0] > 1 and TwinDict:
    858858            for ir in range(blkSize):
     
    861861                    for i in TwinDict[iref]:
    862862                        H[ir][i] = TwinDict[iref][i]
    863             TwMask = np.any(H,axis=2)
     863            TwMask = np.any(H,axis=-1)
    864864        SQ = 1./(2.*refl.T[4])**2               #array(blkSize)
    865865        SQfactor = 4.0*SQ*twopisq               #ditto prev.
  • trunk/imports/G2sfact.py

    r1912 r1913  
    7171                sigFo = float(sigFo)
    7272                # h,k,l,m,dsp,Fo2,sig,Fc2,Fot2,Fct2,phase,...
    73                 self.RefDict['RefList'].append([h,k,l,0,0,Fo**2,2.*Fo*sigFo,0,Fo**2,0,0,0])
     73                self.RefDict['RefList'].append([h,k,l,1,0,Fo**2,2.*Fo*sigFo,0,Fo**2,0,0,0])
    7474            self.errors = 'Error after reading reflections (unexpected!)'
    7575            self.RefDict['RefList'] = np.array(self.RefDict['RefList'])
     
    265265                # h,k,l,m,dsp,Fo2,sig,Fc2,Fot2,Fct2,phase,...
    266266                if self.Super == 0:
    267                     self.RefDict['RefList'].append([h,k,l,0,0,Fo,sigFo,0,Fo,0,0,0])
     267                    self.RefDict['RefList'].append([h,k,l,1,0,Fo,sigFo,0,Fo,0,0,0])
    268268                elif self.Super == 1:
    269                     self.RefDict['RefList'].append([h,k,l,m1,0,0,Fo,sigFo,0,Fo,0,0,0])
     269                    self.RefDict['RefList'].append([h,k,l,m1,1,0,Fo,sigFo,0,Fo,0,0,0])
    270270            self.errors = 'Error after reading reflections (unexpected!)'
    271271            self.RefDict['RefList'] = np.array(self.RefDict['RefList'])
     
    329329                tbar = float(tbar)
    330330                if len(self.Banks):
    331                     self.Banks[int(bN)-1]['RefDict']['RefList'].append([h,k,l,0,0,Fo,sigFo,0,Fo,0,0,0,wave,tbar])
     331                    self.Banks[int(bN)-1]['RefDict']['RefList'].append([h,k,l,1,0,Fo,sigFo,0,Fo,0,0,0,wave,tbar])
    332332                else:
    333333                # h,k,l,m,dsp,Fo2,sig,Fc2,Fot2,Fct2,phase,...
    334                     self.RefDict['RefList'].append([h,k,l,0,0,Fo,sigFo,0,Fo,0,0,0,wave,tbar])
     334                    self.RefDict['RefList'].append([h,k,l,1,0,Fo,sigFo,0,Fo,0,0,0,wave,tbar])
    335335            if len(self.Banks):
    336336                self.UpdateParameters(Type='SNT',Wave=None) # histogram type
     
    399399                tbar = float(tbar)
    400400                if len(self.Banks):
    401                     self.Banks[int(bN)-1]['RefDict']['RefList'].append([h,k,l,0,0,Fo,sigFo,0,Fo,0,0,0,wave,tbar])
     401                    self.Banks[int(bN)-1]['RefDict']['RefList'].append([h,k,l,1,0,Fo,sigFo,0,Fo,0,0,0,wave,tbar])
    402402                else:
    403403                # h,k,l,m,dsp,Fo2,sig,Fc2,Fot2,Fct2,phase,...
    404                     self.RefDict['RefList'].append([h,k,l,0,0,Fo,sigFo,0,Fo,0,0,0,wave,tbar])
     404                    self.RefDict['RefList'].append([h,k,l,1,0,Fo,sigFo,0,Fo,0,0,0,wave,tbar])
    405405            if len(self.Banks):
    406406                self.UpdateParameters(Type='SNT',Wave=None) # histogram type
     
    471471                tbar = float(tbar)
    472472                if len(self.Banks):
    473                     self.Banks[int(bN)-1]['RefDict']['RefList'].append([h,k,l,0,0,Fo,sigFo,0,Fo,0,0,0,wave,tbar])
     473                    self.Banks[int(bN)-1]['RefDict']['RefList'].append([h,k,l,1,0,Fo,sigFo,0,Fo,0,0,0,wave,tbar])
    474474                else:
    475475                # h,k,l,m,dsp,Fo2,sig,Fc2,Fot2,Fct2,phase,...
    476                     self.RefDict['RefList'].append([h,k,l,0,0,Fo,sigFo,0,Fo,0,0,0,wave,tbar])
     476                    self.RefDict['RefList'].append([h,k,l,1,0,Fo,sigFo,0,Fo,0,0,0,wave,tbar])
    477477            if len(self.Banks):
    478478                self.UpdateParameters(Type='SNT',Wave=None) # histogram type
  • trunk/imports/G2sfact_CIF.py

    r1880 r1913  
    266266                    #h,k,l,m,dsp,Fo2,sig,Fc2,Fot2,Fct2,phase,Ext
    267267                    if im:
    268                         ref = HKL+[0,0,0,0,0, 0,0,0,0,0, 0,0]
     268                        ref = HKL+[1,0,0,0,0, 0,0,0,0,0, 0,0]
    269269                    else:
    270                         ref = HKL+[0,0,0,0,0, 0,0,0,0,0, 0]
     270                        ref = HKL+[1,0,0,0,0, 0,0,0,0,0, 0]
    271271                    if F2dn:
    272272                        F2 = item[itemkeys[F2dn]]
Note: See TracChangeset for help on using the changeset viewer.