Changeset 5018


Ignore:
Timestamp:
Aug 29, 2021 9:13:06 AM (3 months ago)
Author:
vondreele
Message:

do np.nan_to_num on xye to avoid nans in plotting arrays.
remove extra reference to data in OnRelease? for reflection lists
move an import to top, fix a reference to 'B' in MakeRDF

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIplot.py

    r5013 r5018  
    27672767                pick = str(G2frame.itemPicked).split('(',1)[1][:-1]
    27682768                if 'line' not in pick:       #avoid data points, etc.
    2769                     data = G2frame.GPXtree.GetItemPyData(G2frame.PatternId)
    27702769                    if pick in Page.phaseList:
    27712770                        num = Page.phaseList.index(pick)
     
    32513250    for ip,Pattern in enumerate(PlotList):
    32523251        xye = Pattern[1]
     3252        xye = np.nan_to_num(xye)
    32533253        if xye[1] is None: continue
    32543254        if Ymax is None: Ymax = max(xye[1])
  • trunk/GSASIIpwd.py

    r5005 r5018  
    3232import scipy.optimize as so
    3333import scipy.special as sp
     34import scipy.signal as signal
    3435
    3536import GSASIIpath
     
    506507   
    507508def MakeRDF(RDFcontrols,background,inst,pwddata):
    508     import scipy.signal as signal
    509509    auxPlot = []
    510     if 'C' in inst['Type'][0]:
     510    if 'C' in inst['Type'][0] or 'B' in inst['Type'][0]:
    511511        Tth = pwddata[0]
    512512        wave = G2mth.getWave(inst)
     
    530530    Qdata *= np.sin((Qpoints-minQ)*piDQ)/piDQ
    531531    Qdata *= 0.5*np.sqrt(Qpoints)       #Qbin normalization
    532 #    GSASIIpath.IPyBreak()
    533532    dq = Qpoints[1]-Qpoints[0]
    534533    nR = len(Qdata)
Note: See TracChangeset for help on using the changeset viewer.