Changeset 1782


Ignore:
Timestamp:
Apr 8, 2015 11:42:52 AM (7 years ago)
Author:
vondreele
Message:

fix display of fixed wavelength selection
show no. user rejected refl. in lst file after least squares
improve color display for Refl. Lists
skip user rejected reflections in single crystal cif output

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIpwdGUI.py

    r1781 r1782  
    13431343                    if 'Source' not in data: data['Source'] = ['CuKa','?']
    13441344                    choice = ['TiKa','CrKa','FeKa','CoKa','CuKa','MoKa','AgKa']
    1345                     lamPick = wx.ComboBox(G2frame.dataDisplay,value=data['Source'][0],choices=choice,style=wx.CB_READONLY|wx.CB_DROPDOWN)
     1345                    lamPick = wx.ComboBox(G2frame.dataDisplay,value=data['Source'][1],choices=choice,style=wx.CB_READONLY|wx.CB_DROPDOWN)
    13461346                    lamPick.Bind(wx.EVT_COMBOBOX, OnLamPick)
    13471347                    waveSizer.Add(lamPick,0)
     
    29542954        for row in rowList:
    29552955            data[1]['RefList'][row][3+im] *= -1 #toggles mul & -mul
     2956            if data[1]['RefList'][row][3+im] < 0:
     2957                G2frame.refTable[phaseName].SetCellBackgroundColour(row,3+im,wx.RED)
     2958            else:
     2959                G2frame.refTable[phaseName].SetCellBackgroundColour(row,3+im,wx.WHITE)
     2960        G2frame.refTable[phaseName].ClearSelection()
    29562961        ShowReflTable(phaseName)
    29572962       
  • trunk/GSASIIstrIO.py

    r1781 r1782  
    25222522                   
    25232523                elif 'HKLF' in histogram:
    2524                     print >>pFile,' Final refinement RF, RF^2 = %.2f%%, %.2f%% on %d reflections'   \
    2525                         %(Histogram['Residuals'][pfx+'Rf'],Histogram['Residuals'][pfx+'Rf^2'],Histogram['Residuals'][pfx+'Nref'])
     2524                    print >>pFile,' Final refinement RF, RF^2 = %.2f%%, %.2f%% on %d reflections (%d user rejected)'   \
     2525                        %(Histogram['Residuals'][pfx+'Rf'],Histogram['Residuals'][pfx+'Rf^2'],Histogram['Residuals'][pfx+'Nref'],Histogram['Residuals'][pfx+'Nrej'])
    25262526                    print >>pFile,' HKLF histogram weight factor = ','%.3f'%(Histogram['wtFactor'])
    25272527                    if pfx+'Scale' in ScalExtSig:
  • trunk/GSASIIstrMain.py

    r1772 r1782  
    9292        Rvals['Rwp'] = np.sqrt(Rvals['chisq']/Histograms['sumwYo'])*100.      #to %
    9393        Rvals['GOF'] = np.sqrt(Rvals['chisq']/(Histograms['Nobs']-len(varyList)))
    94         print >>printFile,' Number of function calls:',result[2]['nfev'],' Number of observations: ',Histograms['Nobs'],' Number of parameters: ',len(varyList)
     94        print >>printFile,' Number of function calls:',result[2]['nfev'],   \
     95            ' Number of observations: ',Histograms['Nobs'],' User rejected: ',Histograms['Nrej'],   \
     96            ' Number of parameters: ',len(varyList)
    9597        print >>printFile,' Refinement time = %8.3fs, %8.3fs/cycle, for %d cycles'%(runtime,runtime/ncyc,ncyc)
    9698        print >>printFile,' wR = %7.2f%%, chi**2 = %12.6g, reduced chi**2 = %6.2f'%(Rvals['Rwp'],Rvals['chisq'],Rvals['GOF']**2)
  • trunk/GSASIIstrMath.py

    r1781 r1782  
    26182618    SumwYo = 0
    26192619    Nobs = 0
     2620    Nrej = 0
    26202621    ApplyRBModels(parmDict,Phases,rigidbodyDict)
    26212622    histoList = Histograms.keys()
     
    26972698            sumdF2 = 0
    26982699            nobs = 0
     2700            nrej = 0
    26992701            if calcControls['F**2']:
    27002702                for i,ref in enumerate(refDict['RefList']):
     
    27132715                            df[i] = -w*(ref[5+im]-ref[7+im])
    27142716                            sumwYo += (w*ref[5+im])**2
     2717                        else:
     2718                            nrej += 1
    27152719            else:
    27162720                for i,ref in enumerate(refDict['RefList']):
     
    27302734                            df[i] = -w*(Fo-Fc)
    27312735                            sumwYo += (w*Fo)**2
     2736                        else:
     2737                            nrej += 1
    27322738            Histogram['Residuals']['Nobs'] = nobs
    27332739            Histogram['Residuals']['sumwYo'] = sumwYo
     
    27372743            Histogram['Residuals'][phfx+'Rf^2'] = 100.*sumdF2/sumFo2
    27382744            Histogram['Residuals'][phfx+'Nref'] = nobs
     2745            Histogram['Residuals'][phfx+'Nrej'] = nrej
    27392746            Nobs += nobs
     2747            Nrej += nrej
    27402748            if dlg:
    27412749                dlg.Update(Histogram['Residuals']['wR'],newmsg='For histogram %d Rw=%8.3f%s'%(hId,Histogram['Residuals']['wR'],'%'))[0]
     
    27442752    Histograms['sumwYo'] = SumwYo
    27452753    Histograms['Nobs'] = Nobs
     2754    Histograms['Nrej'] = Nrej
    27462755    Rw = min(100.,np.sqrt(np.sum(M**2)/SumwYo)*100.)
    27472756    if dlg:
  • trunk/exports/G2export_CIF.py

    r1659 r1782  
    12071207            refcount = len(histblk['Data']['RefList'])
    12081208            for ref in histblk['Data']['RefList']:
     1209                if ref[3] < 0:      #skip user rejected reflections (mul < 0)
     1210                    continue
    12091211                s = "  "
    12101212                if hklmin is None:
Note: See TracChangeset for help on using the changeset viewer.