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

more rationalization of FWHM calculations

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/exports/G2export_csv.py

    r2103 r2132  
    268268                    else:        #convert to deg       
    269269                        h,k,l,m,mult,dsp,pos,sig,gam,Fobs,Fcalc,phase,Icorr,Prfo = refItem[:14]
    270                         FWHM = G2pwd.getgamFW(gam,sig)
    271                         self.Write(fmt.format(h,k,l,m,pos,Fobs,Fcalc,phase,mult,    \
    272                             np.sqrt(max(sig,0.0001))/100.,gam/100.,FWHM/100.,i))
     270                        s = np.sqrt(max(sig,0.0001))/100.   #var -> sig in deg
     271                        g = gam/100.    #-> deg
     272                        FWHM = G2pwd.getgamFW(g,s)
     273                        self.Write(fmt.format(h,k,l,m,pos,Fobs,Fcalc,phase,mult,s,g,FWHM,i))
    273274            else:
    274275                WriteList(self,("h","k","l",tname,"F_obs","F_calc","phase","mult","sig","gam","FWHM","Prfo","phase #"))
     
    285286                    else:        #convert to deg       
    286287                        h,k,l,mult,dsp,pos,sig,gam,Fobs,Fcalc,phase,Icorr,Prfo = refItem[:13]
    287                         FWHM = G2pwd.getgamFW(gam,sig)
    288                         self.Write(fmt.format(h,k,l,pos,Fobs,Fcalc,phase,mult,  \
    289                             np.sqrt(max(sig,0.0001))/100.,gam/100.,FWHM/100.,Prfo,i))
     288                        g = gam/100.
     289                        s = np.sqrt(max(sig,0.0001))/100.
     290                        FWHM = G2pwd.getgamFW(g,s)
     291                        self.Write(fmt.format(h,k,l,pos,Fobs,Fcalc,phase,mult,s,g,FWHM,Prfo,i))
    290292        self.CloseFile()
    291293        print(str(hist)+'reflections written to file '+str(self.fullpath))
Note: See TracChangeset for help on using the changeset viewer.