Ignore:
Timestamp:
May 9, 2018 3:50:11 PM (4 years ago)
Author:
vondreele
Message:

revise sequential refinement to retain previous runs & update those refined with new values.
provide a "Clear seq. results" button

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIstrMain.py

    r3371 r3377  
    112112        printFile.write(' Refinement time = %8.3fs, %8.3fs/cycle, for %d cycles\n'%(runtime,runtime/ncyc,ncyc))
    113113        printFile.write(' wR = %7.2f%%, chi**2 = %12.6g, GOF = %6.2f\n'%(Rvals['Rwp'],Rvals['chisq'],Rvals['GOF']))
     114        sig = len(varyList)*[None,]
     115        if 'None' in str(type(result[1])):
     116            IfOK = False
     117            covMatrix = []
     118            break
    114119        IfOK = True
    115120        try:
     
    125130            if not len(varyList):
    126131                covMatrix = []
    127                 sig = []
    128132                break
    129133            print ('**** Refinement failed - singular matrix ****')
     
    450454                Rvals['Rwp'],Rvals['chisq'],Rvals['GOF']**2,Rvals['DelChi2']))
    451455            # add the uncertainties into the esd dictionary (sigDict)
     456            if not IfOK:
     457                print('***** Sequential refinement failed at histogram '+histogram)
     458                break
    452459            sigDict = dict(zip(varyList,sig))
    453460            # the uncertainties for dependent constrained parms into the esd dict
     
    489496#            print (' ***** Refinement aborted *****')
    490497#            return False,Msg.msg
    491     if Controls.get('Reverse Seq'):
    492         histNames.reverse()
    493     SeqResult['histNames'] = histNames
     498    SeqResult['histNames'] = [item for item in G2stIO.GetHistogramNames(GPXfile,['PWDR',]) if item in SeqResult.keys()]
    494499    G2stIO.SetSeqResult(GPXfile,Histograms,SeqResult)
    495500    printFile.close()
Note: See TracChangeset for help on using the changeset viewer.