Changeset 2800


Ignore:
Timestamp:
Apr 21, 2017 8:36:17 AM (6 years ago)
Author:
vondreele
Message:

fix a simulation output format
use a couple of wx.CallAfter? to fix crashes in stacking GUI
fix a limits error in PWDR simulation

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASII.py

    r2788 r2800  
    18241824        self.PatternTree.Expand(Id)
    18251825        self.PatternTree.SelectItem(Id)
    1826         print(u'Added simulation powder data {}'++
    1827               ' with parameters from {}'.format(HistName,rd.instmsg))
     1826        print(u'Added simulation powder data {}'.format(HistName)+
     1827              ' with parameters from {}'.format(rd.instmsg))
    18281828
    18291829        # make a list of phase names
  • trunk/GSASIIphsGUI.py

    r2770 r2800  
    28202820            G2plt.PlotXY(G2frame,resultXY,XY2=resultXY2,labelX=r'$\mathsf{2\theta}$',
    28212821                labelY='Intensity',newPlot=True,Title='Sequential simulations on '+pName,
    2822                 lines=False,names=seqNames)
     2822                lines=True,names=seqNames)
    28232823           
    28242824        def CellSizer():
     
    29972997                event.Skip()
    29982998                Layer['Name'] = layerName.GetValue()               
    2999                 UpdateLayerData()
     2999                wx.CallAfter(UpdateLayerData)
    30003000               
    30013001            def OnAddAtom(event):
    30023002                Layer['Atoms'].append(['Unk','Unk',0.,0.,0.,1.,0.01])
    3003                 UpdateLayerData()
     3003                wx.CallAfter(UpdateLayerData)
    30043004               
    30053005            def OnSymm(event):
     
    30223022                                data['Layers']['AtInfo'][atType] = G2elem.GetAtomInfo(atType)
    30233023                    PE.Destroy()
    3024                     UpdateLayerData()
     3024                    wx.CallAfter(UpdateLayerData)
    30253025                else:
    30263026                    event.Skip()
  • trunk/GSASIIpwd.py

    r2786 r2800  
    25482548    x0 = profile[0]
    25492549    iBeg = np.searchsorted(x0,limits[0])
    2550     iFin = np.searchsorted(x0,limits[1])+1
     2550    iFin = np.searchsorted(x0,limits[1])
    25512551    if iFin-iBeg > 20000:
    25522552        iFin = iBeg+20000
     
    27022702    profile[3][iBeg:iFin] = BrdSpec*scale+profile[4][iBeg:iFin]
    27032703    if not np.any(profile[1]):                   #fill dummy data x,y,w,yc,yb,yd
    2704         rv = st.poisson(profile[3][iBeg:iFin])
    2705         profile[1][iBeg:iFin] = rv.rvs()
     2704        try:
     2705            rv = st.poisson(profile[3][iBeg:iFin])
     2706            profile[1][iBeg:iFin] = rv.rvs()
     2707        except ValueError:
     2708            profile[1][iBeg:iFin] = profile[3][iBeg:iFin]
    27062709        Z = np.ones_like(profile[3][iBeg:iFin])
    27072710        Z[1::2] *= -1
Note: See TracChangeset for help on using the changeset viewer.