Ignore:
Timestamp:
Jul 16, 2020 9:30:05 AM (3 years ago)
Author:
vondreele
Message:

fix exporters for pink reflection data

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/exports/G2export_csv.py

    r4190 r4522  
    338338        for i,phasenam in enumerate(sorted(histblk['Reflection Lists'])):
    339339            phasDict = histblk['Reflection Lists'][phasenam]
    340             tname = {'T':'TOF','C':'2-theta'}[phasDict['Type'][2]]
     340            tname = {'T':'TOF','C':'2-theta','B':'2-theta'}[phasDict['Type'][2]]
    341341            if phasDict.get('Super',False):
    342342                WriteList(self,("h","k","l","m","d-sp",tname,"F_obs","F_calc","phase","mult","sig","gam","FWHM","Prfo","phase #"))
     
    351351                        FWHM = G2pwd.getgamFW(gam,sig)
    352352                        self.Write(fmt.format(h,k,l,m,dsp,pos,Fobs,Fcalc,phase,mult,sig,gam,FWHM,i))
    353                     else:        #convert to deg       
     353                    elif 'C' in phasDict['Type']:        #convert to deg       
    354354                        h,k,l,m,mult,dsp,pos,sig,gam,Fobs,Fcalc,phase,Icorr,Prfo = refItem[:14]
     355                        s = np.sqrt(max(sig,0.0001))/100.   #var -> sig in deg
     356                        g = gam/100.    #-> deg
     357                        FWHM = G2pwd.getgamFW(g,s)
     358                        self.Write(fmt.format(h,k,l,m,dsp,pos,Fobs,Fcalc,phase,mult,s,g,FWHM,i))
     359                    elif 'B' in phasDict['Type']:        #convert to deg       
     360                        h,k,l,m,mult,dsp,pos,sig,gam,Fobs,Fcalc,phase,Icorr,x,x,x,Prfo = refItem[:17]
    355361                        s = np.sqrt(max(sig,0.0001))/100.   #var -> sig in deg
    356362                        g = gam/100.    #-> deg
     
    369375                        FWHM = G2pwd.getgamFW(gam,sig)
    370376                        self.Write(fmt.format(h,k,l,dsp,pos,Fobs,Fcalc,phase,mult,sig,gam,FWHM,Prfo,i))
    371                     else:        #convert to deg       
     377                    elif 'C' in phasDict['Type']:        #convert to deg       
    372378                        h,k,l,mult,dsp,pos,sig,gam,Fobs,Fcalc,phase,Icorr,Prfo = refItem[:13]
     379                        g = gam/100.
     380                        s = np.sqrt(max(sig,0.0001))/100.
     381                        FWHM = G2pwd.getgamFW(g,s)
     382                        self.Write(fmt.format(h,k,l,dsp,pos,Fobs,Fcalc,phase,mult,s,g,FWHM,Prfo,i))
     383                    elif 'B' in phasDict['Type']:        #convert to deg       
     384                        h,k,l,mult,dsp,pos,sig,gam,Fobs,Fcalc,phase,Icorr,x,x,x,Prfo = refItem[:16]
    373385                        g = gam/100.
    374386                        s = np.sqrt(max(sig,0.0001))/100.
Note: See TracChangeset for help on using the changeset viewer.