Changeset 4191 for trunk/GSASIIpwd.py


Ignore:
Timestamp:
Nov 13, 2019 8:18:50 AM (2 years ago)
Author:
vondreele
Message:

put in dummy phase tab & menu for fullrmc
partial implementation of pdf from TOF data; lacks absorption & wavelength dependent scattering length effects.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIpwd.py

    r4179 r4191  
    335335        dq = Qpoints[1]-Qpoints[0]
    336336        XY[0] = npT2q(XY[0],wave)
     337        Qdata = si.griddata(XY[0],XY[1],Qpoints,method='linear',fill_value=XY[1][0])    #interpolate I(Q)
    337338    elif 'T' in inst['Type'][0]:
    338339        difC = inst['difC'][1]
     
    342343        dq = Qpoints[1]-Qpoints[0]
    343344        XY[0] = 2.*np.pi*difC/XY[0]
    344     Qdata = si.griddata(XY[0],XY[1],Qpoints,method='linear',fill_value=XY[1][0])    #interpolate I(Q)
     345        Qdata = si.griddata(XY[0],XY[1],Qpoints,method='linear',fill_value=XY[1][-1])    #interpolate I(Q)
    345346    Qdata -= np.min(Qdata)*data['BackRatio']
    346347   
    347348    qLimits = data['QScaleLim']
    348     minQ = np.searchsorted(Qpoints,qLimits[0])
    349     maxQ = np.searchsorted(Qpoints,qLimits[1])+1
     349    maxQ = np.searchsorted(Qpoints,min(Qpoints[-1],qLimits[1]))+1
     350    minQ = np.searchsorted(Qpoints,min(qLimits[0],0.90*Qpoints[-1]))
     351    qLimits = [Qpoints[minQ],Qpoints[maxQ-1]]
    350352    newdata = []
    351353    if len(IofQ) < 3:
     
    358360   
    359361    xydata['SofQ'] = copy.deepcopy(xydata['IofQ'])
    360     FFSq,SqFF,CF = GetAsfMean(ElList,(xydata['SofQ'][1][0]/(4.0*np.pi))**2)  #these are <f^2>,<f>^2,Cf
     362    if 'XC' in inst['Type'][0]:
     363        FFSq,SqFF,CF = GetAsfMean(ElList,(xydata['SofQ'][1][0]/(4.0*np.pi))**2)  #these are <f^2>,<f>^2,Cf
     364    else: #TOF
     365        CF = np.zeros(len(xydata['SofQ'][1][0]))
     366        FFSq = np.ones(len(xydata['SofQ'][1][0]))
     367        SqFF = np.ones(len(xydata['SofQ'][1][0]))
    361368    Q = xydata['SofQ'][1][0]
    362369#    auxPlot.append([Q,np.copy(CF),'CF-unCorr'])
    363     ruland = Ruland(data['Ruland'],wave,Q,CF)
     370    if 'XC' in inst['Type'][0]:
     371        ruland = Ruland(data['Ruland'],wave,Q,CF)
    364372#    auxPlot.append([Q,ruland,'Ruland'])     
    365     CF *= ruland
     373        CF *= ruland
    366374#    auxPlot.append([Q,CF,'CF-Corr'])
    367375    scale = np.sum((FFSq+CF)[minQ:maxQ])/np.sum(xydata['SofQ'][1][1][minQ:maxQ])
    368376    xydata['SofQ'][1][1] *= scale
    369     xydata['SofQ'][1][1] -= CF
     377    if 'XC' in inst['Type'][0]:
     378        xydata['SofQ'][1][1] -= CF
    370379    xydata['SofQ'][1][1] = xydata['SofQ'][1][1]/SqFF
    371380    scale = len(xydata['SofQ'][1][1][minQ:maxQ])/np.sum(xydata['SofQ'][1][1][minQ:maxQ])
Note: See TracChangeset for help on using the changeset viewer.