Ignore:
Timestamp:
Jan 22, 2016 10:10:43 AM (7 years ago)
Author:
vondreele
Message:

more rationalization of FWHM calculations

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/exports/G2export_examples.py

    r1997 r2132  
    212212                    if 'T' in phasDict['Type']:
    213213                        h,k,l,m,mult,dsp,pos,sig,gam,Fobs,Fcalc,phase,x,x,x,x,prfo = refItem[:17]
    214                         FWHM = 2.*G2pwd.getgamFW(gam,sig)
     214                        FWHM = G2pwd.getgamFW(gam,sig)
    215215                        self.Write(fmt.format(hklfmt.format(h,k,l,m),pos,Fobs,Fcalc,phase,mult,sig,gam,FWHM,prfo))
    216216                    else:
    217217                        h,k,l,m,mult,dsp,pos,sig,gam,Fobs,Fcalc,phase,x,prfo = refItem[:14]
    218                         FWHM = 2.*G2pwd.getgamFW(gam,sig)
    219                         self.Write(fmt.format(hklfmt.format(h,k,l,m),pos,Fobs,Fcalc,phase,mult, \
    220                             np.sqrt(max(sig,0.0001))/100.,gam/100.,FWHM/100.,prfo))
     218                        g = gam/100.    #centideg -> deg
     219                        s = np.sqrt(max(sig,0.0001))/100.   #var -> sig in deg
     220                        FWHM = G2pwd.getgamFW(g,s)  #FWHM
     221                        self.Write(fmt.format(hklfmt.format(h,k,l,m),pos,Fobs,Fcalc,phase,mult,s,g,FWHM,prfo))
    221222            else:
    222223                self.Write(94*'=')
     
    233234                    if 'T' in phasDict['Type']:
    234235                        h,k,l,mult,dsp,pos,sig,gam,Fobs,Fcalc,phase,x,x,x,x,prfo = refItem[:16]
    235                         FWHM = 2.*G2pwd.getgamFW(gam,sig)
     236                        FWHM = G2pwd.getgamFW(gam,sig)
    236237                        self.Write(fmt.format(hklfmt.format(h,k,l),pos,Fobs,Fcalc,phase,mult,np.sqrt(max(sig,0.0001)),gam,FWHM,prfo))
    237238                    else:
    238239                        h,k,l,mult,dsp,pos,sig,gam,Fobs,Fcalc,phase,x,prfo = refItem[:13]
    239                         FWHM = 2.*G2pwd.getgamFW(gam,sig)
     240                        g = gam/100.    #centideg -> deg
     241                        s = np.sqrt(max(sig,0.0001))/100.   #var -> sig in deg
     242                        FWHM = G2pwd.getgamFW(g,s)
    240243                        self.Write(fmt.format(hklfmt.format(h,k,l),pos,Fobs,Fcalc,phase,mult,   \
    241                             np.sqrt(max(sig,0.0001))/100.,gam/100.,FWHM/100.,prfo))
     244                            s,g,FWHM,prfo))
    242245        self.CloseFile()
    243246        print(str(hist)+'reflections written to file '+str(self.fullpath))                       
Note: See TracChangeset for help on using the changeset viewer.