Ignore:
Timestamp:
Oct 26, 2014 10:30:34 AM (8 years ago)
Author:
vondreele
Message:

fix GOF & more supercell stuff

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIstrMain.py

    r1531 r1539  
    8383        Rvals['Nobs'] = Histograms['Nobs']
    8484        Rvals['Rwp'] = np.sqrt(Rvals['chisq']/Histograms['sumwYo'])*100.      #to %
    85         Rvals['GOF'] = Rvals['chisq']/(Histograms['Nobs']-len(varyList))
     85        Rvals['GOF'] = np.sqrt(Rvals['chisq']/(Histograms['Nobs']-len(varyList)))
    8686        print >>printFile,' Number of function calls:',result[2]['nfev'],' Number of observations: ',Histograms['Nobs'],' Number of parameters: ',len(varyList)
    8787        print >>printFile,' Refinement time = %8.3fs, %8.3fs/cycle, for %d cycles'%(runtime,runtime/ncyc,ncyc)
    88         print >>printFile,' wR = %7.2f%%, chi**2 = %12.6g, reduced chi**2 = %6.2f'%(Rvals['Rwp'],Rvals['chisq'],Rvals['GOF'])
     88        print >>printFile,' wR = %7.2f%%, chi**2 = %12.6g, reduced chi**2 = %6.2f'%(Rvals['Rwp'],Rvals['chisq'],Rvals['GOF']**2)
    8989        IfOK = True
    9090        try:
    91             covMatrix = result[1]*Rvals['GOF']
     91            covMatrix = result[1]*Rvals['GOF']**2
    9292            sig = np.sqrt(np.diag(covMatrix))
    9393            if np.any(np.isnan(sig)):
     
    364364
    365365        print '  wR = %7.2f%%, chi**2 = %12.6g, reduced chi**2 = %6.2f, last delta chi = %.4f'%(
    366             Rvals['Rwp'],Rvals['chisq'],Rvals['GOF'],Rvals['DelChi2'])
     366            Rvals['Rwp'],Rvals['chisq'],Rvals['GOF']**2,Rvals['DelChi2'])
    367367        # add the uncertainties into the esd dictionary (sigDict)
    368368        sigDict = dict(zip(varyList,sig))
Note: See TracChangeset for help on using the changeset viewer.