Changeset 3845 for trunk/GSASIIstrMain.py
- Timestamp:
- Mar 8, 2019 12:59:26 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIstrMain.py
r3839 r3845 365 365 NewparmDict = {} 366 366 for ihst,histogram in enumerate(histNames): 367 if GSASIIpath.GetConfigValue(' debug'): t1 = time.time()367 if GSASIIpath.GetConfigValue('Show_timing'): t1 = time.time() 368 368 print('\nRefining with '+str(histogram)) 369 369 ifPrint = False … … 415 415 # do constraint processing 416 416 #reload(G2mv) # debug 417 if GSASIIpath.GetConfigValue(' debug'):417 if GSASIIpath.GetConfigValue('Show_timing'): 418 418 t2 = time.time() 419 print("#1 debugtime {:.2f} sec.".format(t2-t1))419 print("#1 show time {:.2f} sec.".format(t2-t1)) 420 420 t1 = t2 421 421 G2mv.InitVars() 422 422 constrDict,fixedList = G2stIO.GetConstraints(GPXfile) 423 if GSASIIpath.GetConfigValue(' debug'):423 if GSASIIpath.GetConfigValue('Show_timing'): 424 424 t2 = time.time() 425 print("#2 debugtime {:.2f} sec.".format(t2-t1))425 print("#2 show time {:.2f} sec.".format(t2-t1)) 426 426 t1 = t2 427 427 varyListStart = tuple(varyList) # save the original varyList before dependent vars are removed … … 484 484 printFile.write('\n Refinement results for histogram: %s\n'%histogram) 485 485 printFile.write(135*'-'+'\n') 486 if GSASIIpath.GetConfigValue(' debug'):486 if GSASIIpath.GetConfigValue('Show_timing'): 487 487 t2 = time.time() 488 print("#3 debugtime {:.2f} sec.".format(t2-t1))488 print("#3 show time {:.2f} sec.".format(t2-t1)) 489 489 t1 = t2 490 490 if True: … … 492 492 IfOK,Rvals,result,covMatrix,sig = RefineCore(Controls,Histo,Phases,restraintDict, 493 493 rigidbodyDict,parmDict,varyList,calcControls,pawleyLookup,ifSeq,printFile,dlg) 494 if GSASIIpath.GetConfigValue('Show_timing'): 495 t2 = time.time() 496 print("#4a show time {:.2f} sec.".format(t2-t1)) 497 t1 = t2 494 498 if PlotFunction: 495 499 PlotFunction(G2frame,Histo[histogram]['Data'],histogram) 496 500 501 if GSASIIpath.GetConfigValue('Show_timing'): 502 t2 = time.time() 503 print("#4b show time {:.2f} sec.".format(t2-t1)) 504 t1 = t2 497 505 print (' wR = %7.2f%%, chi**2 = %12.6g, reduced chi**2 = %6.2f, last delta chi = %.4f'%( 498 506 Rvals['Rwp'],Rvals['chisq'],Rvals['GOF']**2,Rvals['DelChi2'])) … … 517 525 'parmDict':parmDict} 518 526 SeqResult[histogram] = histRefData 519 if GSASIIpath.GetConfigValue(' debug'):527 if GSASIIpath.GetConfigValue('Show_timing'): 520 528 t2 = time.time() 521 print("#4 debugtime {:.2f} sec.".format(t2-t1))529 print("#4c show time {:.2f} sec.".format(t2-t1)) 522 530 t1 = t2 523 531 G2stMth.ApplyRBModels(parmDict,Phases,rigidbodyDict,True) 532 if GSASIIpath.GetConfigValue('Show_timing'): 533 t2 = time.time() 534 print("#5a show time {:.2f} sec.".format(t2-t1)) 535 t1 = t2 524 536 # G2stIO.SetRigidBodyModels(parmDict,sigDict,rigidbodyDict,printFile) 525 537 G2stIO.SetHistogramPhaseData(parmDict,sigDict,Phases,Histo,None,ifPrint,printFile) 538 if GSASIIpath.GetConfigValue('Show_timing'): 539 t2 = time.time() 540 print("#5b show time {:.2f} sec.".format(t2-t1)) 541 t1 = t2 526 542 G2stIO.SetHistogramData(parmDict,sigDict,Histo,None,ifPrint,printFile) 543 if GSASIIpath.GetConfigValue('Show_timing'): 544 t2 = time.time() 545 print("#5c show time {:.2f} sec.".format(t2-t1)) 546 t1 = t2 527 547 G2stIO.SetUsedHistogramsAndPhases(GPXfile,Histo,Phases,rigidbodyDict,histRefData,makeBack) 528 if GSASIIpath.GetConfigValue(' debug'):548 if GSASIIpath.GetConfigValue('Show_timing'): 529 549 t2 = time.time() 530 print("#5 debugtime {:.2f} sec.".format(t2-t1))550 print("#5d show time {:.2f} sec.".format(t2-t1)) 531 551 t1 = t2 532 552 makeBack = False … … 548 568 # print (' ***** Refinement aborted *****') 549 569 # return False,Msg.msg 550 if GSASIIpath.GetConfigValue(' debug'):570 if GSASIIpath.GetConfigValue('Show_timing'): 551 571 t2 = time.time() 552 print("#6 debugtime {:.2f} sec.".format(t2-t1))572 print("#6 show time {:.2f} sec.".format(t2-t1)) 553 573 t1 = t2 554 574 SeqResult['histNames'] = [itm for itm in G2stIO.GetHistogramNames(GPXfile,['PWDR',]) if itm in SeqResult.keys()]
Note: See TracChangeset
for help on using the changeset viewer.