Ignore:
Timestamp:
Apr 2, 2015 10:56:59 AM (7 years ago)
Author:
vondreele
Message:

provide sig,gam & FWHM in export of PWDR reflection set as csv & txt files
add penalty fxn stuff for sph. harm. preferred orientation correction
allow editing of ODF coeff.
fix reading of fcf files

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/exports/G2export_examples.py

    r1762 r1773  
    2828#import GSASIIstrIO as G2stIO
    2929import GSASIImath as G2mth
     30import GSASIIpwd as G2pwd
    3031#import GSASIIlattice as G2lat
    3132#import GSASIIspc as G2spc
     
    192193            tname = {'T':'TOF','C':'2-theta'}[phasDict['Type'][2]]
    193194            self.Write('\nPhase '+str(phasenam))
    194             self.Write(80*'=')
    195195            if phasDict.get('Super',False):
     196                self.Write(87*'=')
    196197                hklfmt = "{:.0f},{:.0f},{:.0f},{:.0f}"
    197                 hfmt = "{:>8s} {:>8s} {:>12s} {:>12s} {:>7s} {:>6s}"
    198                 fmt = "{:>8s} {:8.3f} {:12.3f} {:12.3f} {:7.2f} {:6.0f}"
    199                 self.Write(hfmt.format("h,k,l,m",tname,"F_obs","F_calc","phase","mult"))
    200                 self.Write(80*'=')
     198                hfmt = "{:>10s} {:>8s} {:>12s} {:>12s} {:>7s} {:>6s} {:>8s} {:>8s} {:>8s}"
     199                fmt = "{:>10s} {:8.3f} {:12.3f} {:12.3f} {:7.2f} {:6.0f} {:8.3f} {:8.3f} {:8.3f}"
     200                self.Write(hfmt.format("h,k,l,m",tname,"F_obs","F_calc","phase","mult","sig","gam","FWHM"))
     201                self.Write(87*'=')
    201202                refList = phasDict['RefList']
    202203                for refItem in refList:
    203204                    h,k,l,m,mult,dsp,pos,sig,gam,Fobs,Fcalc,phase = refItem[:12]
    204                     self.Write(fmt.format(hklfmt.format(h,k,l,m),pos,Fobs,Fcalc,phase,mult))
     205                    FWHM = G2pwd.getgamFW(gam,sig)
     206                    self.Write(fmt.format(hklfmt.format(h,k,l,m),pos,Fobs,Fcalc,phase,mult,sig,gam,FWHM))
    205207            else:
     208                self.Write(85*'=')
    206209                hklfmt = "{:.0f},{:.0f},{:.0f}"
    207                 hfmt = "{:>8s} {:>8s} {:>12s} {:>12s} {:>7s} {:>6s}"
    208                 fmt = "{:>8s} {:8.3f} {:12.3f} {:12.3f} {:7.2f} {:6.0f}"
    209                 self.Write(hfmt.format("h,k,l",tname,"F_obs","F_calc","phase","mult"))
    210                 self.Write(80*'=')
     210                hfmt = "{:>8s} {:>8s} {:>12s} {:>12s} {:>7s} {:>6s} {:>8s} {:>8s} {:>8s}"
     211                fmt = "{:>8s} {:8.3f} {:12.3f} {:12.3f} {:7.2f} {:6.0f} {:8.3f} {:8.3f} {:8.3f}"
     212                self.Write(hfmt.format("h,k,l",tname,"F_obs","F_calc","phase","mult","sig","gam","FWHM"))
     213                self.Write(85*'=')
    211214                refList = phasDict['RefList']
    212215                for refItem in refList:
    213216                    h,k,l,mult,dsp,pos,sig,gam,Fobs,Fcalc,phase = refItem[:11]
    214                     self.Write(fmt.format(hklfmt.format(h,k,l),pos,Fobs,Fcalc,phase,mult))
     217                    FWHM = G2pwd.getgamFW(gam,sig)
     218                    self.Write(fmt.format(hklfmt.format(h,k,l),pos,Fobs,Fcalc,phase,mult,sig,gam,FWHM))
    215219        self.CloseFile()
    216220        print(str(hist)+'reflections written to file '+str(self.fullpath))                       
Note: See TracChangeset for help on using the changeset viewer.