Changeset 2519 for trunk/GSASIIpwd.py


Ignore:
Timestamp:
Nov 9, 2016 2:48:37 PM (9 years ago)
Author:
vondreele
Message:

bug fix in PDF calculations
add option to suppress G(0) ringing in PDF

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified trunk/GSASIIpwd.py

    r2493 r2519  
    289289    import scipy.fftpack as ft
    290290    Ibeg = np.searchsorted(xydata['Sample'][1][0],limits[0])
    291     Ifin = np.searchsorted(xydata['Sample'][1][0],limits[1])
     291    Ifin = np.searchsorted(xydata['Sample'][1][0],limits[1])+1
    292292    #subtract backgrounds - if any & use PWDR limits
    293293#    GSASIIpath.IPyBreak()
     
    302302            xycontainer += (xydata['Container Bkg.'][1][1][Ibeg:Ifin]+
    303303                data['Container Bkg.']['Add'])*data['Container Bkg.']['Mult']
    304         xydata['IofQ'][1][1] += xycontainer
     304        xydata['IofQ'][1][1] += xycontainer[Ibeg:Ifin]
    305305    #get element data & absorption coeff.
    306306    ElList = data['ElList']
     
    366366    xydata['GofR'] = copy.deepcopy(xydata['FofQ'])
    367367    nR = len(xydata['GofR'][1][1])
    368     xydata['GofR'][1][1] = -dq*np.imag(ft.fft(xydata['FofQ'][1][1],4*nR)[:nR])
    369     xydata['GofR'][1][0] = 0.5*np.pi*np.linspace(0,nR,nR)/qLimits[1]
     368    xydata['GofR'][1][1] = -dq*np.imag(ft.fft(xydata['FofQ'][1][1],8*nR)[:nR])
     369    xydata['GofR'][1][0] = 0.25*np.pi*np.linspace(0,nR,nR)/qLimits[1]
     370    if data.get('noRing',True):
     371        xydata['GofR'][1][1] = np.where(xydata['GofR'][1][0]<0.5,0.,xydata['GofR'][1][1])
    370372    return auxPlot
    371373   
Note: See TracChangeset for help on using the changeset viewer.