Ignore:
Timestamp:
Apr 16, 2015 10:17:53 AM (7 years ago)
Author:
vondreele
Message:

use sample angles in sp.harm. PO refinement for non Bragg-Brentano expts.
export powder sig, gam & FWHM in deg - several places

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/exports/G2export_csv.py

    r1773 r1791  
    250250            if phasDict.get('Super',False):
    251251                WriteList(self,("h","k","l","m",tname,"F_obs","F_calc","phase","mult","sig","gam","FWHM","phase #"))
    252                 fmt = "{:.0f},{:.0f},{:.0f},{:.0f},{:.3f},{:.3f},{:.3f},{:.2f},{:.0f},{:.3f},{:.3f},{:.3f},{:d}"
     252                if 'T' in phasDict['Type']:
     253                    fmt = "{:.0f},{:.0f},{:.0f},{:.0f},{:.3f},{:.3f},{:.3f},{:.2f},{:.0f},{:.3f},{:.3f},{:.3f},{:d}"
     254                else:
     255                    fmt = "{:.0f},{:.0f},{:.0f},{:.0f},{:.3f},{:.3f},{:.3f},{:.2f},{:.0f},{:.5f},{:.5f},{:.5f},{:d}"
    253256                refList = phasDict['RefList']
    254257                for refItem in refList:
    255258                    h,k,l,m,mult,dsp,pos,sig,gam,Fobs,Fcalc,phase,Icorr = refItem[:13]
    256259                    FWHM = G2pwd.getgamFW(gam,sig)
    257                     self.Write(fmt.format(h,k,l,m,pos,Fobs,Fcalc,phase,mult,sig,gam,FWHM,i))               
     260                    if 'T' in phasDict['Type']:
     261                        self.Write(fmt.format(h,k,l,m,pos,Fobs,Fcalc,phase,mult,sig,gam,FWHM,i))
     262                    else:        #convert to deg       
     263                        self.Write(fmt.format(h,k,l,m,pos,Fobs,Fcalc,phase,mult,    \
     264                            np.sqrt(max(sig,0.0001))/100.,gam/100.,FWHM/100.,i))
    258265            else:
    259266                WriteList(self,("h","k","l",tname,"F_obs","F_calc","phase","mult","sig","gam","FWHM","phase #"))
    260                 fmt = "{:.0f},{:.0f},{:.0f},{:.3f},{:.3f},{:.3f},{:.2f},{:.0f},{:.3f},{:.3f},{:.3f},{:d}"
     267                if 'T' in phasDict['Type']:
     268                    fmt = "{:.0f},{:.0f},{:.0f},{:.3f},{:.3f},{:.3f},{:.2f},{:.0f},{:.3f},{:.3f},{:.3f},{:d}"
     269                else:
     270                    fmt = "{:.0f},{:.0f},{:.0f},{:.3f},{:.3f},{:.3f},{:.2f},{:.0f},{:.5f},{:.5f},{:.5f},{:d}"
    261271                refList = phasDict['RefList']
    262272                for refItem in refList:
    263273                    h,k,l,mult,dsp,pos,sig,gam,Fobs,Fcalc,phase,Icorr = refItem[:12]
    264274                    FWHM = G2pwd.getgamFW(gam,sig)
    265                     self.Write(fmt.format(h,k,l,pos,Fobs,Fcalc,phase,mult,sig,gam,FWHM,i))
     275                    if 'T' in phasDict['Type']:
     276                        self.Write(fmt.format(h,k,l,pos,Fobs,Fcalc,phase,mult,sig,gam,FWHM,i))
     277                    else:        #convert to deg       
     278                        self.Write(fmt.format(h,k,l,pos,Fobs,Fcalc,phase,mult,  \
     279                            np.sqrt(max(sig,0.0001))/100.,gam/100.,FWHM/100.,i))
    266280        self.CloseFile()
    267281        print(str(hist)+'reflections written to file '+str(self.fullpath))
Note: See TracChangeset for help on using the changeset viewer.