Changeset 2419 for trunk/GSASIIpwd.py


Ignore:
Timestamp:
Aug 11, 2016 10:47:57 AM (5 years ago)
Author:
vondreele
Message:

Add use of PWDR limits for PDF calculations
improve duplicate peak pick rejection

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIpwd.py

    r2412 r2419  
    264264    import copy
    265265    import scipy.fftpack as ft
    266     #subtract backgrounds - if any
     266    Ibeg = np.searchsorted(xydata['Sample'][1][0],limits[0])
     267    Ifin = np.searchsorted(xydata['Sample'][1][0],limits[1])
     268    #subtract backgrounds - if any & use PWDR limits
     269#    GSASIIpath.IPyBreak()
    267270    xydata['IofQ'] = copy.deepcopy(xydata['Sample'])
     271    xydata['IofQ'][1] = np.array(xydata['IofQ'][1])[:,Ibeg:Ifin]
    268272    if data['Sample Bkg.']['Name']:
    269         xydata['IofQ'][1][1] += (xydata['Sample Bkg.'][1][1]+
     273        xydata['IofQ'][1][1] += (xydata['Sample Bkg.'][1][1][Ibeg:Ifin]+
    270274            data['Sample Bkg.']['Add'])*data['Sample Bkg.']['Mult']
    271275    if data['Container']['Name']:
    272276        xycontainer = (xydata['Container'][1][1]+data['Container']['Add'])*data['Container']['Mult']
    273277        if data['Container Bkg.']['Name']:
    274             xycontainer += (xydata['Container Bkg.'][1][1]+
     278            xycontainer += (xydata['Container Bkg.'][1][1][Ibeg:Ifin]+
    275279                data['Container Bkg.']['Add'])*data['Container Bkg.']['Mult']
    276280        xydata['IofQ'][1][1] += xycontainer
     
    279283    Abs = G2lat.CellAbsorption(ElList,data['Form Vol'])
    280284    #Apply angle dependent corrections
    281     Tth = xydata['Sample'][1][0]
     285    Tth = xydata['IofQ'][1][0]
    282286    dt = (Tth[1]-Tth[0])
    283287    MuR = Abs*data['Diam']/20.0
Note: See TracChangeset for help on using the changeset viewer.