Changeset 612 for trunk/GSASIIstruct.py


Ignore:
Timestamp:
May 11, 2012 10:35:51 AM (10 years ago)
Author:
vondreele
Message:

complete combined x/n exercise & fix bugs uncovered in process
made version 0.2.0
moved tutorials in help menu to be 2nd
fixed problem with drawing after f-map generated
fixed some plot errors
reverse sign on macrostrain

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIstruct.py

    r609 r612  
    23062306        Dij = parmDict[phfx+'D11']*h**2+parmDict[phfx+'D22']*k**2+parmDict[phfx+'D33']*l**2+ \
    23072307            parmDict[phfx+'D12']*h*k+parmDict[phfx+'D13']*h*l+parmDict[phfx+'D23']*k*l
    2308     return Dij*refl[4]**2*tand(refl[5]/2.0)
     2308    return -Dij*refl[4]**2*tand(refl[5]/2.0)
    23092309           
    23102310def GetHStrainShiftDerv(refl,SGData,phfx):
     
    23362336            phfx+'D12':h*k,phfx+'D13':h*l,phfx+'D23':k*l}
    23372337    for item in dDijDict:
    2338         dDijDict[item] *= refl[4]**2*tand(refl[5]/2.0)
     2338        dDijDict[item] *= -refl[4]**2*tand(refl[5]/2.0)
    23392339    return dDijDict
    23402340   
     
    23942394                        Wd,fmin,fmax = G2pwd.getWidths(refl[5],refl[6],refl[7],shl)
    23952395                        iBeg = max(xB,np.searchsorted(x,refl[5]-fmin))
    2396                         iFin = min(np.searchsorted(x,refl[5]+fmax),xF)
     2396                        iFin = max(xB,min(np.searchsorted(x,refl[5]+fmax),xF))
    23972397                        iFin2 = iFin
    23982398                        yp[iBeg:iFin] = refl[13]*refl[9]*G2pwd.getFCJVoigt3(refl[5],refl[6],refl[7],shl,x[iBeg:iFin])    #>90% of time spent here
     
    24002400                            pos2 = refl[5]+lamRatio*tand(refl[5]/2.0)       # + 360/pi * Dlam/lam * tan(th)
    24012401                            Wd,fmin,fmax = G2pwd.getWidths(pos2,refl[6],refl[7],shl)
    2402                             iBeg2 = max(xB,np.searchsorted(x[xB:xF],pos2-fmin))
    2403                             iFin2 = min(np.searchsorted(x[xB:xF],pos2+fmax),xF)
     2402                            iBeg2 = max(xB,np.searchsorted(x,pos2-fmin))
     2403                            iFin2 = min(np.searchsorted(x,pos2+fmax),xF)
     2404                            if not iBeg2+iFin2:       #peak below low limit - skip peak
     2405                                continue
     2406                            elif not iBeg2-iFin2:     #peak above high limit - done
     2407                                break
    24042408                            yp[iBeg2:iFin2] += refl[13]*refl[9]*kRatio*G2pwd.getFCJVoigt3(pos2,refl[6],refl[7],shl,x[iBeg2:iFin2])        #and here
    24052409                        refl[8] = np.sum(np.where(ratio[iBeg:iFin2]>0.,yp[iBeg:iFin2]*ratio[iBeg:iFin2]/(refl[13]*(1.+kRatio)),0.0))
Note: See TracChangeset for help on using the changeset viewer.