Changeset 1335 for trunk/GSASIIobj.py


Ignore:
Timestamp:
May 7, 2014 2:38:30 PM (8 years ago)
Author:
toby
Message:

Redo pseudovar computation to handle constraint-generated vars

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIobj.py

    r1332 r1335  
    18481848        not evaluation of expression.)
    18491849        '''
    1850        
     1850        # Patch: for old-style expressions with a (now removed step size)
     1851        for v in self.eObj.assgnVars:
     1852            if not isinstance(self.eObj.assgnVars[v], basestring):
     1853                self.eObj.assgnVars[v] = self.eObj.assgnVars[v][0]
     1854
    18511855    def SetupCalc(self,parmDict):
    18521856        '''Do all preparations to use the expression for computation.
     
    19151919        for var,val in zip(varList,valList):
    19161920            self.exprDict[self.lblLookup.get(var,'undefined: '+var)] = val
     1921
     1922    def UpdateDict(self,parmDict):
     1923        '''Update the dict for the expression with values in a dict
     1924        :param list parmDict: a dict of values some of which may be in use here
     1925        '''
     1926        for var in parmDict:
     1927            if var in self.lblLookup:
     1928                self.exprDict[self.lblLookup[var]] = parmDict[var]
    19171929           
    19181930    def EvalExpression(self):
Note: See TracChangeset for help on using the changeset viewer.