Ignore:
Timestamp:
Jun 25, 2017 9:51:06 PM (4 years ago)
Author:
toby
Message:

allow variables to change during seq. ref.; fix error w/unused phases

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIImapvars.py

    r2874 r2876  
    538538    global dependentParmList,arrayList,invarrayList,indParmList,consNum
    539539    msg = ''
     540    shortmsg = ''
    540541
    541542    # process fixed (held) variables
     
    625626            #if unused > 0:# and unused != len(VarKeys(constrDict[rel])):
    626627            if unused > 0 and unused != len(VarKeys(constrDict[rel])):
    627                 msg += "\nSome (but not all) variables in constraint are not defined:\n\t"
    628                 msg += _FormatConstraint(constrDict[rel],fixedList[rel])
    629                 msg += '\nNot used: ' + notused + '\n'
     628                #msg += "\nSome (but not all) variables in constraint are not defined:\n\t"
     629                #msg += _FormatConstraint(constrDict[rel],fixedList[rel])
     630                #msg += '\nNot used: ' + notused + '\n'
     631                shortmsg += notused+" not used in constraint "+_FormatConstraint(constrDict[rel],fixedList[rel])
    630632            elif varied > 0 and varied != len(VarKeys(constrDict[rel])):
    631                 msg += "\nNot all variables refined in constraint:\n\t"
    632                 msg += _FormatConstraint(constrDict[rel],fixedList[rel])
    633                 msg += '\nNot refined: ' + notvaried + '\n'
     633                #msg += "\nNot all variables refined in constraint:\n\t"
     634                #msg += _FormatConstraint(constrDict[rel],fixedList[rel])
     635                #msg += '\nNot refined: ' + notvaried + '\n'
     636                shortmsg += notvaried+" not varied in constraint "+_FormatConstraint(constrDict[rel],fixedList[rel])
    634637    # if there were errors found, go no farther
    635     if msg and SeqHist is not None:
    636         print ' *** Sequential refinement: ignoring constraint definition(s): ***'
    637         print msg
     638    if shortmsg and SeqHist is not None:
     639        if msg:
     640            print ' *** ERROR in constraint definitions! ***'
     641            print msg
     642            raise Exception
     643        print '*** Sequential refinement: ignoring constraint definition(s): ***'
     644        print shortmsg
    638645        msg = ''
    639     elif msg:
     646    elif shortmsg:
     647        msg += shortmsg
     648    if msg:
    640649        print ' *** ERROR in constraint definitions! ***'
    641650        print msg
Note: See TracChangeset for help on using the changeset viewer.