Changeset 4761 for trunk


Ignore:
Timestamp:
Jan 11, 2021 1:57:49 PM (2 years ago)
Author:
toby
Message:

refinements with no variables or no cycles

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIdataGUI.py

    r4759 r4761  
    51825182        if OK:
    51835183            Rw = Rvals['Rwp']
    5184             rtext = 'LS Refinement: Rw = %.3f%%, GOF = %.2f, Nobs = %d, Max delt/sig = %.3f'%(Rvals['Rwp'],Rvals['GOF'],Rvals['Nobs'],Rvals['Max shft/sig'])
     5184            rtext = 'LS Refinement: Rw = %.3f%%, GOF = %.2f, Nobs = %d'%(Rvals['Rwp'],Rvals['GOF'],Rvals['Nobs'])
    51855185            lamMax = Rvals.get('lamMax',0.001)
    51865186            lst = os.path.splitext(os.path.abspath(self.GSASprojectfile))[0]
     
    51895189                text += '\nFinal Reduced Chi^2: {:.3f} (before ref: {:.3f})\n'.format(
    51905190                    Rvals['GOF']**2,Rvals['GOF0']**2)
    5191             if 'Max shft/sig' in Rvals:
     5191            if Rvals.get('Max shft/sig') is not None:
     5192                rtext += ', Max delt/sig = {:.3f}'.format(Rvals['Max shft/sig'])
    51925193                text += '\nMax shift/sigma={:.3f}\n'.format(Rvals['Max shft/sig'])
    51935194            if 'msg' in Rvals: text += '\n' + Rvals['msg'] + '\n'
     
    88568857                text += '\n\tNobs = {}\n\tNvals = {}\n\tSVD zeros = {}'.format(
    88578858                    Rvals['Nobs'],Nvars,Rvals.get('SVD0',0.))
    8858                 text += '\n\tmax shift/esd = {:.3f}'.format(Rvals.get('Max shft/sig',0.0))
     8859                if Rvals.get('Max shft/sig') is not None:
     8860                    text += '\n\tmax shift/esd = {:.3f}'.format(Rvals['Max shft/sig'])
    88598861                if 'lamMax' in Rvals:
    88608862                    text += '\n\tlog10 MaxLambda = {:.1f}'.format(np.log10(Rvals['lamMax']))
  • trunk/GSASIImath.py

    r4760 r4761  
    213213        info = {'num cyc':0,'fvec':M2,'nfev':1,'lamMax':0,'psing':[],'SVD0':0}
    214214        info['msg'] = 'no variables: skipping refinement\n'
    215         info.update({'Converged':True, 'DelChi2':0, 'Xvec':[], 'chisq0':chisq00})
    216         return [x0,[],info]
     215        info.update({'Converged':True, 'DelChi2':0, 'Xvec':None, 'chisq0':chisq00})
     216        return [x0,np.array([]),info]
    217217    indices = range(n)
    218218    while icycle < maxcyc:
     
    364364        Bmat,Nzeros = setHcorr(info,Amat,xtol,problem=False)
    365365        info.update({'num cyc':icycle,'fvec':M,'nfev':nfev,'lamMax':lamMax,'SVD0':Nzeros,'psing':psing_prev,
    366             'Converged':ifConverged, 'DelChi2':deltaChi2, 'Xvec':XvecAll, 'chisq0':chisq00})
     366            'Converged':ifConverged, 'DelChi2':deltaChi2, 'chisq0':chisq00})
     367        if icycle > 0: info.update({'Xvec':XvecAll})
    367368        return [x0,Bmat,info]
    368369    except nl.LinAlgError:
  • trunk/GSASIIstrMain.py

    r4735 r4761  
    224224            Lastshft = result[2].get('Xvec',None)
    225225            if Lastshft is None:
    226                 Rvals['Max shft/sig'] = 0.0
     226                Rvals['Max shft/sig'] = None
    227227            else:
    228228                Rvals['Max shft/sig'] = np.max(np.nan_to_num(Lastshft/sig))
Note: See TracChangeset for help on using the changeset viewer.