Changeset 2800 for trunk/GSASIIpwd.py


Ignore:
Timestamp:
Apr 21, 2017 8:36:17 AM (5 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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.