Changeset 694 for trunk/GSASIImapvars.py


Ignore:
Timestamp:
Jul 24, 2012 2:14:17 PM (9 years ago)
Author:
vondreele
Message:

remove error check on use of variable in constraint & equivalence - this is now allowed; code commented out in 3 places in mapvars

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIImapvars.py

    r693 r694  
    314314                    errmsg += '\nParameter '+var+" is Fixed and used in a constraint:\n\t"
    315315                    errmsg += FormatConstraint(constrDict[rel],fixedList[rel])+"\n"
    316                 if var in equivVarList:
    317                     errmsg += '\nParameter '+var+" is Equivalenced and used in a constraint:\n\t"
    318                     errmsg += FormatConstraint(constrDict[rel],fixedList[rel])+"\n"
     316#                if var in equivVarList:
     317#                    errmsg += '\nParameter '+var+" is Equivalenced and used in a constraint:\n\t"
     318#                    errmsg += FormatConstraint(constrDict[rel],fixedList[rel])+"\n"
    319319            if varied > 0 and varied != len(constrDict[rel]):
    320320                warnmsg += "\nNot all variables refined in constraint:\n\t"
     
    498498    equivVarList = list(set(indepVarList).union(set(depVarList)))
    499499    #print 'equivVarList',equivVarList
    500     inboth = set(fixedVarList).intersection(set(equivVarList))
    501     if len(inboth) > 0:
    502         msg += "\nError! The following variables are used in both Equivalence and Fixed constraints:\n"
    503         s = ''
    504         for var in sorted(inboth):
    505             if s != "": s+= ", "
    506             s += str(var)
    507         msg += '\t'+ s + '\n'
    508 
     500#    inboth = set(fixedVarList).intersection(set(equivVarList))
     501#    if len(inboth) > 0:
     502#        msg += "\nError! The following variables are used in both Equivalence and Fixed constraints:\n"
     503#        s = ''
     504#        for var in sorted(inboth):
     505#            if s != "": s+= ", "
     506#            s += str(var)
     507#        msg += '\t'+ s + '\n'
     508#
    509509    # scan through parameters in each relationship. Are all varied? If only some are
    510510    # varied, create an error message.
     
    526526                    msg += '\nError: parameter '+var+" is Fixed and used in a constraint:\n\t"
    527527                    msg += FormatConstraint(constrDict[rel],fixedList[rel])+"\n"
    528                 if var in equivVarList:
    529                     msg += '\nError: parameter '+var+" is Equivalenced and used in a constraint:\n\t"
    530                     msg += FormatConstraint(constrDict[rel],fixedList[rel])+"\n"
     528#                if var in equivVarList:
     529#                    msg += '\nError: parameter '+var+" is Equivalenced and used in a constraint:\n\t"
     530#                    msg += FormatConstraint(constrDict[rel],fixedList[rel])+"\n"
    531531            if varied > 0 and varied != len(constrDict[rel]):
    532532                msg += "\nNot all variables refined in constraint:\n\t"
Note: See TracChangeset for help on using the changeset viewer.