Changeset 3444 for trunk/GSASIIpwd.py
 Timestamp:
 Jun 20, 2018 9:35:13 AM (3 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/GSASIIpwd.py
r3435 r3444 757 757 yb = parmDict[pfx+'Back;0']*T1+parmDict[pfx+'Back;1']*T2 758 758 else: 759 xnomask = ma.getdata(xdata) 760 xmin,xmax = xnomask[0],xnomask[1] 759 761 if bakType == 'lin interpolate': 760 bakPos = np.linspace(x data[0],xdata[1],nBak,True)762 bakPos = np.linspace(xmin,xmax,nBak,True) 761 763 elif bakType == 'inv interpolate': 762 bakPos = 1./np.linspace(1./x data[1],1./xdata[0],nBak,True)764 bakPos = 1./np.linspace(1./xmax,1./xmin,nBak,True) 763 765 elif bakType == 'log interpolate': 764 bakPos = np.exp(np.linspace(np.log(x data[0]),np.log(xdata[1]),nBak,True))765 bakPos[0] = x data[0]766 bakPos[1] = x data[1]766 bakPos = np.exp(np.linspace(np.log(xmin),np.log(xmax),nBak,True)) 767 bakPos[0] = xmin 768 bakPos[1] = xmax 767 769 bakVals = np.zeros(nBak) 768 770 for i in range(nBak): … … 875 877 dydb = [T1,T2] 876 878 else: 879 xnomask = ma.getdata(xdata) 880 xmin,xmax = xnomask[0],xnomask[1] 877 881 if bakType == 'lin interpolate': 878 bakPos = np.linspace(x data[0],xdata[1],nBak,True)882 bakPos = np.linspace(xmin,xmax,nBak,True) 879 883 elif bakType == 'inv interpolate': 880 bakPos = 1./np.linspace(1./x data[1],1./xdata[0],nBak,True)884 bakPos = 1./np.linspace(1./xmax,1./xmin,nBak,True) 881 885 elif bakType == 'log interpolate': 882 bakPos = np.exp(np.linspace(np.log(x data[0]),np.log(xdata[1]),nBak,True))883 bakPos[0] = x data[0]884 bakPos[1] = x data[1]886 bakPos = np.exp(np.linspace(np.log(xmin),np.log(xmax),nBak,True)) 887 bakPos[0] = xmin 888 bakPos[1] = xmax 885 889 for i,pos in enumerate(bakPos): 886 890 if i == 0:
Note: See TracChangeset
for help on using the changeset viewer.