Changeset 694


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

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

    r688 r694  
    10951095    parms = [['Gonio. radius',' Goniometer radius(mm): ','%.2f',]]
    10961096    if data['Type'] == 'Debye-Scherrer':
    1097         parms += [['DisplaceX',u' Sample X displacement(\xb5m): ','%.2f',],
    1098             ['DisplaceY',u' Sample Y displacement(\xb5m): ','%.2f',],
     1097        parms += [['DisplaceX',u' Sample X displ. perp. to beam (\xb5m): ','%.2f',],
     1098            ['DisplaceY',u' Sample Y displ. || to beam (\xb5m): ','%.2f',],
    10991099            ['Absorption',u' Sample absorption(\xb5r): ','%.4f',],]
    11001100    elif data['Type'] == 'Bragg-Brentano':
     
    14111411            if ObjId < 3:
    14121412                Obj.SetValue("%.5f"%(controls[6+ObjId]))
    1413 
    14141413            else:
    14151414                Obj.SetValue("%.3f"%(controls[6+ObjId]))
  • trunk/GSASIIstruct.py

    r693 r694  
    345345                       
    346346    GPXback = GPXBackup(GPXfile,makeBack)
    347     print '\n',135*'-'
    348347    print 'Read from file:',GPXback
    349348    print 'Save to file  :',GPXfile
     
    382381def SetSeqResult(GPXfile,Histograms,SeqResult):
    383382    GPXback = GPXBackup(GPXfile)
    384     print '\n',135*'-'
    385383    print 'Read from file:',GPXback
    386384    print 'Save to file  :',GPXfile
     
    14071405                if Print:
    14081406                    if 'Scale' in PhFrExtPOSig:
    1409                         print >>pFile,' Phase fraction  : %10.4f, sig %10.4f'%(hapData['Scale'][0],PhFrExtPOSig['Scale'])
     1407                        print >>pFile,' Phase fraction  : %10.5f, sig %10.5f'%(hapData['Scale'][0],PhFrExtPOSig['Scale'])
    14101408                    if 'Extinction' in PhFrExtPOSig:
    14111409                        print >>pFile,' Extinction coeff: %10.4f, sig %10.4f'%(hapData['Extinction'][0],PhFrExtPOSig['Extinction'])
     
    33093307    SetHistogramPhaseData(parmDict,sigDict,Phases,Histograms,pFile=printFile)
    33103308    SetHistogramData(parmDict,sigDict,Histograms,pFile=printFile)
    3311     G2mv.PrintIndependentVars(parmDict,varyList,sigDict,printFile)
     3309    G2mv.PrintIndependentVars(parmDict,varyList,sigDict,pFile=printFile)
    33123310    SetUsedHistogramsAndPhases(GPXfile,Histograms,Phases,covData)
    33133311    printFile.close()
Note: See TracChangeset for help on using the changeset viewer.