Changeset 826


Ignore:
Timestamp:
Jan 11, 2013 12:43:34 PM (9 years ago)
Author:
vondreele
Message:

fixes to restraints - texture now works

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIImath.py

    r824 r826  
    197197        XYZ.append([parmDict[name]+parmDict[dname] for name,dname in zip(names,dnames)])
    198198    return XYZ
     199
     200def GetSHCoeff(pId,parmDict,SHkeys):
     201    SHCoeff = {}
     202    for shkey in SHkeys:
     203        shname = str(pId)+'::'+shkey
     204        SHCoeff[shkey] = parmDict[shname]
     205    return SHCoeff
    199206       
    200207def getMass(generalData):
  • trunk/GSASIIstruct.py

    r825 r826  
    20962096                        pWt.append(wt/esd**2)                   
    20972097                elif name == 'Texture':
    2098                     SHCoef = textureData['SH Coeff'][1]
     2098                    SHkeys = textureData['SH Coeff'][1].keys()
     2099                    SHCoef = G2mth.GetSHCoeff(pId,parmDict,SHkeys)
    20992100                    shModels = ['cylindrical','none','shear - 2/m','rolling - mmm']
    21002101                    SamSym = dict(zip(shModels,['0','-1','2/m','mmm']))
     
    21422143        textureData = General['SH Texture']
    21432144
    2144         SHCoef = textureData['SH Coeff'][1]
     2145        SHkeys = textureData['SH Coeff'][1].keys()
     2146        SHCoef = G2mth.GetSHCoeff(pId,parmDict,SHkeys)
    21452147        shModels = ['cylindrical','none','shear - 2/m','rolling - mmm']
    21462148        SamSym = dict(zip(shModels,['0','-1','2/m','mmm']))
     
    21552157            if pId == int(pnames[0]):
    21562158                name = pnames[1]
    2157                 if not name:        #empty for Pawley restraints; pName has '::' in it - skip the rest
     2159                if not name:        #empty for Pawley restraints; pName has '::' in it
     2160                    pDerv[varyList.index(pName)][ip] += 1.
    21582161                    continue
    21592162                id = int(pnames[2])
     
    22172220                    except ValueError:
    22182221                        pass
    2219     for i,item in enumerate(varyList):
    2220         if item in pNames:
    2221             pDerv[i][pNames.index(item)] += 1.
     2222    print np.sum(pDerv),pDerv.shape
    22222223    return pDerv
    22232224
Note: See TracChangeset for help on using the changeset viewer.