Changeset 2876
- Timestamp:
- Jun 25, 2017 9:51:06 PM (6 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIgrid.py
r2875 r2876 3948 3948 sigwtFrList = [] 3949 3949 for i,name in enumerate(histNames): 3950 if name not in Phases[phase]['Histograms']: 3951 wtFrList.append(None) 3952 sigwtFrList.append(0.0) 3953 continue 3950 3954 wtFrSum = 0. 3951 3955 for phase1 in Phases: 3956 if name not in Phases[phase1]['Histograms']: continue 3952 3957 wtFrSum += Phases[phase1]['Histograms'][name]['Scale'][0]*Phases[phase1]['General']['Mass'] 3953 3958 var = str(Phases[phase]['pId'])+':'+str(i)+':Scale' -
trunk/GSASIImapvars.py
r2874 r2876 538 538 global dependentParmList,arrayList,invarrayList,indParmList,consNum 539 539 msg = '' 540 shortmsg = '' 540 541 541 542 # process fixed (held) variables … … 625 626 #if unused > 0:# and unused != len(VarKeys(constrDict[rel])): 626 627 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]) 630 632 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]) 634 637 # 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 638 645 msg = '' 639 elif msg: 646 elif shortmsg: 647 msg += shortmsg 648 if msg: 640 649 print ' *** ERROR in constraint definitions! ***' 641 650 print msg -
trunk/GSASIIstrMain.py
r2874 r2876 304 304 NewparmDict = {} 305 305 for ihst,histogram in enumerate(histNames): 306 print(' Refining with '+str(histogram))306 print('\nRefining with '+str(histogram)) 307 307 ifPrint = False 308 308 if dlg: … … 343 343 parmDict.update(histDict) 344 344 if Controls['Copy2Next']: 345 parmDict.update(NewparmDict) 345 #parmDict.update(NewparmDict) # don't use in case extra entries would cause a problem 346 for parm in NewparmDict: 347 if parm in parmDict: 348 parmDict[parm] = NewparmDict[parm] 346 349 G2stIO.GetFprime(calcControls,Histo) 347 350 # do constraint processing … … 381 384 if newVaryList != firstVaryList and Controls['Copy2Next']: 382 385 # variable lists are expected to match between sequential refinements when Copy2Next is on 383 print '**** ERROR - variable list for this histogram does not match previous'384 print ' Copy of variables is not possible'385 print '\ncurrent histogram',histogram,'has',len(newVaryList),'variables'386 #print '**** ERROR - variable list for this histogram does not match previous' 387 #print ' Copy of variables is not possible' 388 #print '\ncurrent histogram',histogram,'has',len(newVaryList),'variables' 386 389 combined = list(set(firstVaryList+newVaryList)) 387 390 c = [var for var in combined if var not in newVaryList] 388 391 p = [var for var in combined if var not in firstVaryList] 389 line = 'Variables in previous but not in current: ' 390 if c: 391 for var in c: 392 if len(line) > 100: 393 print line 394 line = ' ' 395 line += var + ', ' 396 else: 397 line += 'none' 398 print line 399 print '\nPrevious refinement has',len(firstVaryList),'variables' 400 line = 'Variables in current but not in previous: ' 401 if p: 402 for var in p: 403 if len(line) > 100: 404 print line 405 line = ' ' 406 line += var + ', ' 407 else: 408 line += 'none' 409 print line 410 return False,line 392 print('*** Variables change ***') 393 for typ,vars in [('Removed',c),('Added',p)]: 394 line = ' '+typ+': ' 395 if vars: 396 for var in vars: 397 if len(line) > 70: 398 print(line) 399 line = ' ' 400 line += var + ', ' 401 else: 402 line += 'none, ' 403 print(line[:-2]) 404 firstVaryList = newVaryList 411 405 412 406 ifPrint = False
Note: See TracChangeset
for help on using the changeset viewer.