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_examples.py

    r3990 r4522  
    199199        for phasenam in histblk['Reflection Lists']:
    200200            phasDict = histblk['Reflection Lists'][phasenam]
    201             tname = {'T':'TOF','C':'2-theta'}[phasDict['Type'][2]]
     201            tname = {'T':'TOF','C':'2-theta','B':'2-theta'}[phasDict['Type'][2]]
    202202            self.Write('\nPhase '+str(phasenam))
    203203            if phasDict.get('Super',False):
     
    217217                        FWHM = G2pwd.getgamFW(gam,sig)
    218218                        self.Write(fmt.format(hklfmt.format(h,k,l,m),pos,Fobs,Fcalc,phase,mult,sig,gam,FWHM,prfo))
    219                     else:
     219                    elif 'C' in phasDict['Type']:
    220220                        h,k,l,m,mult,dsp,pos,sig,gam,Fobs,Fcalc,phase,x,prfo = refItem[:14]
     221                        g = gam/100.    #centideg -> deg
     222                        s = np.sqrt(max(sig,0.0001))/100.   #var -> sig in deg
     223                        FWHM = G2pwd.getgamFW(g,s)  #FWHM
     224                        self.Write(fmt.format(hklfmt.format(h,k,l,m),pos,Fobs,Fcalc,phase,mult,s,g,FWHM,prfo))
     225                    elif 'B' in phasDict['Type']:
     226                        h,k,l,m,mult,dsp,pos,sig,gam,Fobs,Fcalc,phase,x,x,x,x,prfo = refItem[:17]
    221227                        g = gam/100.    #centideg -> deg
    222228                        s = np.sqrt(max(sig,0.0001))/100.   #var -> sig in deg
     
    239245                        FWHM = G2pwd.getgamFW(gam,sig)
    240246                        self.Write(fmt.format(hklfmt.format(h,k,l),pos,Fobs,Fcalc,phase,mult,np.sqrt(max(sig,0.0001)),gam,FWHM,prfo))
    241                     else:
     247                    elif 'C' in phasDict['Type']:
    242248                        h,k,l,mult,dsp,pos,sig,gam,Fobs,Fcalc,phase,x,prfo = refItem[:13]
     249                        g = gam/100.    #centideg -> deg
     250                        s = np.sqrt(max(sig,0.0001))/100.   #var -> sig in deg
     251                        FWHM = G2pwd.getgamFW(g,s)
     252                        self.Write(fmt.format(hklfmt.format(h,k,l),pos,Fobs,Fcalc,phase,mult,   \
     253                            s,g,FWHM,prfo))
     254                    elif 'B' in phasDict['Type']:
     255                        h,k,l,mult,dsp,pos,sig,gam,Fobs,Fcalc,phase,x,x,x,x,prfo = refItem[:16]
    243256                        g = gam/100.    #centideg -> deg
    244257                        s = np.sqrt(max(sig,0.0001))/100.   #var -> sig in deg
Note: See TracChangeset for help on using the changeset viewer.