Ignore:
Timestamp:
Feb 27, 2015 9:46:37 PM (7 years ago)
Author:
toby
Message:

Ignore equivalences that are not in use; start on svn switch implementation for help

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIImapvars.py

    r1502 r1676  
    570570                    if notvaried: notvaried += ', '
    571571                    notvaried += mv
    572                 if mv not in indepVarList: indepVarList.append(mv)
    573572                if parmDict is not None and mv not in parmDict:
    574                     msg += "\nCannot equivalence to variable "+str(mv)+". Not defined in this refinement"
    575                     continue
     573                    print "Dropping equivalence for variable "+str(mv)+". Not defined in this refinement"
     574                    #msg += "\nCannot equivalence to variable "+str(mv)+". Not defined in this refinement"
     575                    #continue
     576                else:
     577                    if mv not in indepVarList: indepVarList.append(mv)
    576578                for v,m in zip(varlist,invmultarr):
    577579                    if parmDict is not None and v not in parmDict:
     
    873875    for varlist,mapvars,invmultarr in zip(dependentParmList,indParmList,invarrayList):
    874876        #if invmultarr is None: continue # probably not needed
    875         valuelist = [parmDict[var] for var in mapvars]
     877        try:
     878            valuelist = [parmDict[var] for var in mapvars]
     879        except KeyError:
     880            continue
    876881        # get the v-covar matrix for independent parameters
    877882        vcov = np.zeros((len(mapvars),len(mapvars)))
     
    10661071    for varlist,mapvars,invmultarr in zip(dependentParmList,indParmList,invarrayList):
    10671072        #if invmultarr is None: continue
    1068         valuelist = [parmDict[var] for var in mapvars]
     1073        try:
     1074            valuelist = [parmDict[var] for var in mapvars]
     1075        except KeyError:
     1076            continue
    10691077        parmDict.update(zip(varlist,
    10701078                            np.dot(invmultarr,np.array(valuelist)))
Note: See TracChangeset for help on using the changeset viewer.