Changeset 1073


Ignore:
Timestamp:
Oct 1, 2013 3:40:19 PM (8 years ago)
Author:
vondreele
Message:

change chebyschev background fxn to match what is in old GSAS. Much better fits now with it.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIpwd.py

    r1009 r1073  
    494494            break
    495495    if bakType in ['chebyschev','cosine']:
    496         for iBak in range(nBak):   
     496        dt = xdata[-1]-xdata[0]   
     497        for iBak in range(nBak):
    497498            key = pfx+'Back:'+str(iBak)
    498499            if bakType == 'chebyschev':
    499                 yb += parmDict[key]*(xdata-xdata[0])**iBak
     500                yb += parmDict[key]*(2.*(xdata-xdata[0])/dt-1.)**iBak
    500501            elif bakType == 'cosine':
    501502                yb += parmDict[key]*npcosd(xdata*iBak)
     
    579580
    580581    if bakType in ['chebyschev','cosine']:
     582        dt = xdata[-1]-xdata[0]   
    581583        for iBak in range(nBak):   
    582584            if bakType == 'chebyschev':
    583                 dydb[iBak] = (xdata-xdata[0])**iBak
     585                dydb[iBak] = (2.*(xdata-xdata[0])/dt-1.)**iBak
    584586            elif bakType == 'cosine':
    585587                dydb[iBak] = npcosd(xdata*iBak)
Note: See TracChangeset for help on using the changeset viewer.