Changeset 821


Ignore:
Timestamp:
Jan 4, 2013 9:21:47 AM (9 years ago)
Author:
vondreele
Message:

fixes to Pawley restraint etc.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIphsGUI.py

    r820 r821  
    765765                except ValueError:
    766766                    pass
    767                 pawlNegWt.SetValue("%.3g"%(generalData['Pawley neg wt']))          #reset in case of error               
     767                pawlNegWt.SetValue("%.2f"%(generalData['Pawley neg wt']))          #reset in case of error               
    768768
    769769            pawleySizer = wx.BoxSizer(wx.HORIZONTAL)
     
    779779            pawleySizer.Add(pawlVal,0,wx.ALIGN_CENTER_VERTICAL)
    780780            pawleySizer.Add(wx.StaticText(dataDisplay,label=' Pawley neg. wt.: '),0,wx.ALIGN_CENTER_VERTICAL)
    781             pawlNegWt = wx.TextCtrl(dataDisplay,value='%.3g'%(generalData['Pawley neg wt']),style=wx.TE_PROCESS_ENTER)
     781            pawlNegWt = wx.TextCtrl(dataDisplay,value='%.2f'%(generalData['Pawley neg wt']),style=wx.TE_PROCESS_ENTER)
    782782            pawlNegWt.Bind(wx.EVT_TEXT_ENTER,OnPawleyNegWt)       
    783783            pawlNegWt.Bind(wx.EVT_KILL_FOCUS,OnPawleyNegWt)
     
    884884                except ValueError:
    885885                    pass
    886                 kMax.SetValue("%.0f"%(Flip['k-Max']))          #reset in case of error
     886                kMax.SetValue("%.1f"%(Flip['k-Max']))          #reset in case of error
    887887
    888888            refList = data['Histograms'].keys()
     
    911911            line2Sizer.Add(kFactor,0,wx.ALIGN_CENTER_VERTICAL)
    912912            line2Sizer.Add(wx.StaticText(dataDisplay,label=' k-Max (>=10.0): '),0,wx.ALIGN_CENTER_VERTICAL)
    913             kMax = wx.TextCtrl(dataDisplay,value='%.0f'%(Flip['k-Max']),style=wx.TE_PROCESS_ENTER)
     913            kMax = wx.TextCtrl(dataDisplay,value='%.1f'%(Flip['k-Max']),style=wx.TE_PROCESS_ENTER)
    914914            kMax.Bind(wx.EVT_TEXT_ENTER,OnkMax)       
    915915            kMax.Bind(wx.EVT_KILL_FOCUS,OnkMax)
  • trunk/GSASIIstruct.py

    r820 r821  
    20542054        if 'PWLref' in item and parmDict[item] < 0.:
    20552055            pId = int(item.split(':')[0])
    2056             pNames.append(item)
    2057             pVals.append(-parmDict[item])
    2058             pWt.append(negWt[pId])
     2056            if negWt[pId]:
     2057                pNames.append(item)
     2058                pVals.append(-parmDict[item])
     2059                pWt.append(negWt[pId])
    20592060    pVals = np.array(pVals)
    20602061    pWt = np.array(pWt)
     
    20652066    pDerv = np.zeros((len(varyList),len(pVal)))
    20662067    for phase in Phases:
     2068        if phase not in restraintDict:
     2069            continue
    20672070        pId = Phases[phase]['pId']
    20682071        General = Phases[phase]['General']
Note: See TracChangeset for help on using the changeset viewer.