Changeset 2935


Ignore:
Timestamp:
Jul 15, 2017 2:10:22 PM (4 years ago)
Author:
vondreele
Message:

"fix" to tabulated TOF profile coeff. in Refine - ignored & alp = bet-0 = 1.0 to avoid crash
TODO comments added for possible future implementation of tables

Location:
branch/2frame
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branch/2frame/GSASIIpwd.py

    r2928 r2935  
    11241124                    else:
    11251125                        alp = G2mth.getTOFalpha(parmDict,dsp)
    1126                 alp = max(0.0001,alp)
     1126                alp = max(0.1,alp)
    11271127                betName = 'bet'+str(iPeak)
    11281128                if betName in varyList:
  • branch/2frame/GSASIIstrIO.py

    r2840 r2935  
    21942194            if 'PWDR' in histogram:
    21952195                limits = Histogram['Limits'][1]
    2196                 inst = Histogram['Instrument Parameters'][0]
     2196                inst = Histogram['Instrument Parameters'][0]    #TODO - grab table here if present
    21972197                if 'C' in inst['Type'][1]:
    21982198                    try:
     
    23332333                                        refList.append([h,k,l,m,mul,d, pos,0.0,0.0,0.0,100., 0.0,0.0,0.0,0.0,wave, 1.0,1.0,1.0])
    23342334                                        # ... sig,gam,fotsq,fctsq, phase,icorr,alp,bet,wave, prfo,abs,ext
     2335                                        #TODO - if tabulated put alp & bet in here
    23352336                                        Uniq.append(uniq)
    23362337                                        Phi.append(phi)
     
    28602861        if 'C' in dataType:
    28612862            instDict[pfx+'SH/L'] = max(instDict[pfx+'SH/L'],0.0005)
     2863        elif 'T' in dataType:   #trap zero alp, bet coeff.
     2864            if not instDict[pfx+'alpha']:
     2865                instDict[pfx+'alpha'] = 1.0
     2866            if not instDict[pfx+'beta-0'] and not instDict[pfx+'beta-1']:
     2867                instDict[pfx+'beta-1'] = 1.0
    28622868        return dataType,instDict,insVary
    28632869       
     
    29922998            histVary += bakVary
    29932999           
    2994             Inst = Histogram['Instrument Parameters'][0]
    2995             Type,instDict,insVary = GetInstParms(hId,Inst)
     3000            Inst = Histogram['Instrument Parameters']        #TODO ? ignores tabulated alp,bet & delt for TOF
     3001            if 'T' in Type and len(Inst[1]):    #patch -  back-to-back exponential contribution to TOF line shape is removed
     3002                print 'Warning: tabulated profile coefficients are ignored'
     3003            Type,instDict,insVary = GetInstParms(hId,Inst[0])
    29963004            controlDict[pfx+'histType'] = Type
    29973005            if 'XC' in Type:
     
    30233031                        print >>pFile,' Excluded region:  %8.2f%s to %8.2f%s'%(excl[0],units,excl[1],units)   
    30243032                PrintSampleParms(Sample)
    3025                 PrintInstParms(Inst)
     3033                PrintInstParms(Inst[0])
    30263034                PrintBackground(Background)
    30273035        elif 'HKLF' in histogram:
  • branch/2frame/GSASIIstrMath.py

    r2927 r2935  
    31643164                h,k,l = refl[:3]
    31653165                Uniq = np.inner(refl[:3],SGMT)
    3166                 refl[5+im] = GetReflPos(refl,im,0.0,A,pfx,hfx,calcControls,parmDict)         #corrected reflection position
     3166                refl[5+im] = GetReflPos(refl,im,0.0,A,pfx,hfx,calcControls,parmDict)         #corrected reflection position - #TODO - what about tabluated offset?
    31673167                Lorenz = sind(abs(parmDict[hfx+'2-theta'])/2)*refl[4+im]**4                                                #TOF Lorentz correction
    31683168#                refl[5+im] += GetHStrainShift(refl,im,SGData,phfx,hfx,calcControls,parmDict)               #apply hydrostatic strain shift
    31693169                refl[6+im:8+im] = GetReflSigGamTOF(refl,im,G,GB,phfx,calcControls,parmDict)    #peak sig & gam
    3170                 refl[12+im:14+im] = GetReflAlpBet(refl,im,hfx,parmDict)
     3170                refl[12+im:14+im] = GetReflAlpBet(refl,im,hfx,parmDict)             #TODO - skip if alp, bet tabulated?
    31713171                refl[11+im],refl[15+im],refl[16+im],refl[17+im] = GetIntensityCorr(refl,im,Uniq,G,g,pfx,phfx,hfx,SGData,calcControls,parmDict)
    31723172                refl[11+im] *= Vst*Lorenz
Note: See TracChangeset for help on using the changeset viewer.