Changeset 275 for trunk/GSASIIpwd.py


Ignore:
Timestamp:
May 3, 2011 2:48:59 PM (11 years ago)
Author:
vondreele
Message:

use interp1d instead of griddata

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIpwd.py

    r272 r275  
    688688    Qpoints = np.linspace(0.,maxQ,len(XY[0]),endpoint=True)
    689689    dq = Qpoints[1]-Qpoints[0]
    690     XY[0] = npT2q(XY[0],wave)
    691     Qdata = np.nan_to_num(si.griddata(XY[0],XY[1],Qpoints,method='linear'))
     690    XY[0] = npT2q(XY[0],wave)   
     691#    Qdata = np.nan_to_num(si.griddata(XY[0],XY[1],Qpoints,method='linear')) #only OK for scipy 0.9!
     692    T = si.interp1d(XY[0],XY[1],bounds_error=False,fill_value=0.0)      #OK for scipy 0.8
     693    Qdata = T(Qpoints)
    692694   
    693695    qLimits = data['QScaleLim']
Note: See TracChangeset for help on using the changeset viewer.