Changeset 1035


Ignore:
Timestamp:
Aug 15, 2013 11:32:19 AM (10 years ago)
Author:
vondreele
Message:

further adventures in residual reporting in cif files
hId & pId must be taken from least squares run - put in appropriate places & used by G2cif.py

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASII.py

    r1032 r1035  
    23332333        Histograms = {}
    23342334        Phases = {}
    2335         pId = 0
    2336         hId = 0
    23372335        for phase in phaseData:
    23382336            Phase = phaseData[phase]
    23392337            if Phase['Histograms']:
    23402338                if phase not in Phases:
    2341                     Phase['pId'] = pId
    2342                     pId += 1
    23432339                    Phases[phase] = Phase
    23442340                for hist in Phase['Histograms']:
     
    23492345                        elif 'HKLF' in hist[:4]:
    23502346                            Histograms[hist] = self.GetHKLFdatafromTree(item)
    2351                         #future restraint, etc. histograms here           
    2352                         Histograms[hist]['hId'] = hId
    2353                         hId += 1
     2347                        #future restraint, etc. histograms here
    23542348        return Histograms,Phases
    23552349       
  • trunk/GSASIIstrMath.py

    r1030 r1035  
    12391239                Histogram['Residuals'][phfx+'Rf^2'] = min(100.,np.sqrt(sumdFsq/sumFosq)*100.)
    12401240                Histogram['Residuals'][phfx+'Nref'] = len(refList)
     1241                Histogram['Residuals']['hId'] = hId
    12411242               
    12421243def getPowderProfile(parmDict,x,varylist,Histogram,Phases,calcControls,pawleyLookup):
  • trunk/exports/G2cif.py

    r1030 r1035  
    3838reload(G2stMn)
    3939
    40 DEBUG = False    #True to skip printing of reflection/powder profile lists
     40DEBUG = True    #True to skip printing of reflection/powder profile lists
    4141
    4242def getCallerDocString(): # for development
     
    145145            # include an overall profile r-factor, if there is more than one powder histogram
    146146            if len(self.powderDict) > 1:
    147                 WriteCIFitem('\n# OVERALL POWDER R-FACTOR')
     147                WriteCIFitem('\n# OVERALL WEIGHTED R-FACTOR')
    148148                try:
    149149                    R = '%.3f'%(self.OverallParms['Covariance']['Rvals']['Rwp'])
     
    865865                WriteCIFitem('_diffrn_radiation_wavelength',G2mth.ValEsd(lam1,slam1))
    866866
    867 
    868867            if not oneblock:
    869868                if not phasebyhistDict.get(histlbl):
     
    874873                                 '\n\t_pd_phase_id' +
    875874                                 '\n\t_pd_phase_block_id' +
    876                                  '\n\t_pd_phase_mass_%')
     875                                 '\n\t_pd_phase_mass_%' +
     876                                 '\n\t_refine_ls_R_F_factor' +
     877                                 '\n\t_refine_ls_R_Fsqd_factor')
    877878                    wtFrSum = 0.
    878879                    for phasenam in phasebyhistDict.get(histlbl):
     
    894895                            str(self.Phases[phasenam]['pId']) +
    895896                            '  '+datablockidDict[phasenam]+
    896                             '  '+G2mth.ValEsd(wtFr,sig)
     897                            '  '+G2mth.ValEsd(wtFr,sig) +
     898                            '  '+G2mth.ValEsd(histblk[pfx+'Rf'],-.009)
     899                            '  '+G2mth.ValEsd(histblk[pfx+'Rf^2'],-.009)
    897900                            )
    898901
    899902            # TODO: this will need help from Bob
    900903            # WriteCIFitem('_pd_proc_ls_prof_R_factor','?')
    901             # WriteCIFitem('_pd_proc_ls_prof_wR_factor','?')
    902             # WriteCIFitem('_pd_proc_ls_prof_wR_expected','?')
    903             # WriteCIFitem('_refine_ls_R_Fsqd_factor','?')
     904            WriteCIFitem('_pd_proc_ls_prof_wR_factor','%.3f'%(histblk['wR']))
     905            WriteCIFitem('_pd_proc_ls_prof_wR_expected','?')
    904906
    905907            if histblk['Instrument Parameters'][0]['Type'][1][1] == 'X':
Note: See TracChangeset for help on using the changeset viewer.