Changeset 2754 for trunk/GSASIIpwd.py


Ignore:
Timestamp:
Mar 14, 2017 10:19:59 AM (5 years ago)
Author:
vondreele
Message:

fix "off-by-one" problem in powder profiles; calc missed last point - now fixed.
add import of reflectometry data - same as small angle data
implement plotting of reflectometry data & all the scale options
set up the Model page for reflectometry (Layers is missing)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIpwd.py

    r2740 r2754  
    337337    qLimits = data['QScaleLim']
    338338    minQ = np.searchsorted(Qpoints,qLimits[0])
    339     maxQ = np.searchsorted(Qpoints,qLimits[1])
     339    maxQ = np.searchsorted(Qpoints,qLimits[1])+1
    340340    newdata = []
    341341    if len(IofQ) < 3:
     
    427427    newpeaks = copy.copy(peaks)
    428428    iBeg = np.searchsorted(data[1][0],newpeaks['Limits'][0])
    429     iFin = np.searchsorted(data[1][0],newpeaks['Limits'][1])
     429    iFin = np.searchsorted(data[1][0],newpeaks['Limits'][1])+1
    430430    X = data[1][0][iBeg:iFin]
    431431    Y = data[1][1][iBeg:iFin]
     
    477477    nR = len(Qdata)
    478478    R = 0.5*np.pi*np.linspace(0,nR,nR)/(4.*maxQ)
    479     iFin = np.searchsorted(R,RDFcontrols['maxR'])
     479    iFin = np.searchsorted(R,RDFcontrols['maxR'])+1
    480480    bBut,aBut = signal.butter(4,0.01)
    481481    Qsmooth = signal.filtfilt(bBut,aBut,Qdata)
     
    17731773    cw = x[1:]-x[:-1]
    17741774    xBeg = np.searchsorted(x,Limits[0])
    1775     xFin = np.searchsorted(x,Limits[1])
     1775    xFin = np.searchsorted(x,Limits[1])+1
    17761776    bakType,bakDict,bakVary = SetBackgroundParms(Background)
    17771777    dataType,insDict,insVary = SetInstParms(Inst)
     
    19801980        x0 = profile[0]
    19811981        iBeg = np.searchsorted(x0,limits[0])
    1982         iFin = np.searchsorted(x0,limits[1])
     1982        iFin = np.searchsorted(x0,limits[1])+1
    19831983        if iFin-iBeg > 20000:
    19841984            iFin = iBeg+20000
     
    21172117    x0 = profile[0]
    21182118    iBeg = np.searchsorted(x0,limits[0])
    2119     iFin = np.searchsorted(x0,limits[1])
     2119    iFin = np.searchsorted(x0,limits[1])+1
    21202120    if iFin-iBeg > 20000:
    21212121        iFin = iBeg+20000
     
    22432243    profile[5] = np.zeros(len(profile[0]))
    22442244    iBeg = np.searchsorted(x0,limits[0])
    2245     iFin = np.searchsorted(x0,limits[1])
     2245    iFin = np.searchsorted(x0,limits[1])+1
    22462246    if iFin-iBeg > 20000:
    22472247        iFin = iBeg+20000
Note: See TracChangeset for help on using the changeset viewer.