Changeset 1676


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

Location:
trunk
Files:
3 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)))
  • trunk/GSASIIpath.py

    r1657 r1676  
    309309    sys.exit()
    310310
    311 def svnSwitchDir(rpath,URL):
     311def svnSwitchDir(rpath,URL,loadpath=None):
    312312    '''This performs a switch command to move files between subversion trees.
    313313
     
    316316   
    317317    :param str rpath: path to locate files, relative to the GSAS-II
    318       installation path (path2GSAS2)
     318      installation path (defaults to path2GSAS2)
    319319    :param str URL: the repository URL
    320320    '''
     
    322322    svn = whichsvn()
    323323    if not svn: return
    324     fpath = os.path.join(path2GSAS2,rpath)
     324    if loadpath:
     325        fpath = os.path.join(loadpath,rpath)
     326    else:
     327        fpath = os.path.join(path2GSAS2,rpath)
    325328    cmd = [svn,'switch','--ignore-ancestry',URL,fpath,
    326329           '--non-interactive',
  • trunk/GSASIIstrMath.py

    r1635 r1676  
    25092509    return Vec,Hess
    25102510
    2511 def errRefine(values,HistoPhases,parmDict,varylist,calcControls,pawleyLookup,dlg):       
    2512     'Needs a doc string'
     2511def errRefine(values,HistoPhases,parmDict,varylist,calcControls,pawleyLookup,dlg=None):       
     2512    '''Computes the point-by-point discrepancies between every data point in every histogram
     2513    and the observed value
     2514   
     2515    :returns: an np array of differences between observed and computed diffraction values.
     2516    '''
    25132517    Values2Dict(parmDict, varylist, values)
    25142518    G2mv.Dict2Map(parmDict,varylist)
Note: See TracChangeset for help on using the changeset viewer.