Changeset 4914
- Timestamp:
- May 25, 2021 2:37:39 PM (3 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIctrlGUI.py
r4913 r4914 4881 4881 4882 4882 def Reset(self): 4883 self._tc.SetValue(s elf.startValue)4883 self._tc.SetValue(str(self.startValue)) 4884 4884 self._tc.SetInsertionPointEnd() 4885 4885 -
trunk/GSASIIphsGUI.py
r4911 r4914 3424 3424 atomTable = G2G.Table(table,rowLabels=rowLabels,colLabels=colLabels,types=Types) 3425 3425 try: 3426 Atoms.SetTable(atomTable, True ) # Paint may be called after the Grid has been deleted3426 Atoms.SetTable(atomTable, True, useFracEdit=False) # Paint may be called after the Grid has been deleted 3427 3427 except: 3428 3428 return … … 6697 6697 atomTable = G2G.Table(table,rowLabels=rowLabels,colLabels=colLabels,types=colTypes) 6698 6698 atomGrid = G2G.GSGrid(layerData) 6699 atomGrid.SetTable(atomTable,True )6699 atomGrid.SetTable(atomTable,True,useFracEdit=False) 6700 6700 # atomGrid.SetScrollRate(0,0) #get rid of automatic scroll bars 6701 6701 # loop over all cols in table, set cell editor for numerical items … … 6785 6785 transTable = G2G.Table(table,rowLabels=rowLabels,colLabels=transLabels,types=transTypes) 6786 6786 transGrid = G2G.GSGrid(layerData) 6787 transGrid.SetTable(transTable,True )6787 transGrid.SetTable(transTable,True,useFracEdit=False) 6788 6788 # transGrid.SetScrollRate(0,0) #get rid of automatic scroll bars 6789 6789 Indx[transGrid.GetId()] = Yi -
trunk/GSASIIrestrGUI.py
r4913 r4914 2001 2001 if generalRestData['General']: 2002 2002 parmDict = SetupParmDict(G2frame) 2003 GridSiz = wx.FlexGridSizer(0,7,10,2) 2004 for lbl in ('expression =','target\nvalue','current\nvalue','esd'): 2003 GridSiz = wx.FlexGridSizer(0,9,10,2) 2004 GridSiz.Add((-1,-1)) 2005 GridSiz.Add( 2006 wx.StaticText(GeneralRestr,wx.ID_ANY,'Expression'), 2007 0,wx.ALIGN_LEFT|wx.ALIGN_CENTER_VERTICAL) 2008 GridSiz.Add((-1,-1)) 2009 # for lbl in ('expression',' ','target\nvalue','current\nvalue','esd'): 2010 for lbl in ('target\nvalue','current\nvalue','esd'): 2005 2011 GridSiz.Add( 2006 2012 wx.StaticText(GeneralRestr,wx.ID_ANY,lbl,style=wx.CENTER), … … 2013 2019 for i,rest in enumerate(generalRestData['General']): 2014 2020 eq = rest[0] 2015 txt = eq.expression+' =' 2021 txt = '{}: '.format(i+1) 2022 GridSiz.Add(wx.StaticText(GeneralRestr,wx.ID_ANY,txt)) 2023 txt = eq.expression 2016 2024 if len(txt) > 50: 2017 2025 txt = txt[:47]+'... ' 2018 GridSiz.Add(wx.StaticText(GeneralRestr,wx.ID_ANY,txt)) 2026 txtC = wx.StaticText(GeneralRestr,wx.ID_ANY,txt) 2027 GridSiz.Add(txtC) 2028 GridSiz.Add(wx.StaticText(GeneralRestr,wx.ID_ANY,' = ')) 2019 2029 GridSiz.Add( 2020 2030 G2G.ValidatedTxtCtrl(GeneralRestr,rest,1,nDig=(10,3,'g'),typeHint=float) … … 2027 2037 except: 2028 2038 txt = ' (error) ' 2039 txtC.SetForegroundColour("red") 2029 2040 GridSiz.Add(wx.StaticText(GeneralRestr,wx.ID_ANY,txt)) 2030 2041 GridSiz.Add( -
trunk/GSASIIstrMath.py
r4869 r4914 422 422 elif name == 'General': 423 423 for i,(eq,obs,esd) in enumerate(itemRest[rest]): 424 pNames.append(str(pId)+':'+name+':'+str(i))425 424 calcobj = G2obj.ExpressionCalcObj(eq) 426 425 calcobj.SetupCalc(parmDict) 427 426 calc = calcobj.EvalExpression() 428 pVals.append(obs-calc) 429 pWt.append(wt/esd**2) 430 pWsum[name] += wt*((obs-calc)/esd)**2 431 pWnum[name] += 1 432 427 try: 428 pVals.append(obs-calc) 429 pWt.append(wt/esd**2) 430 pWsum[name] += wt*((obs-calc)/esd)**2 431 pWnum[name] += 1 432 pNames.append(str(pId)+':'+name+':'+str(i)) 433 except: 434 print('Error computing General restraint #{}'.format(i+1)) 433 435 for phase in Phases: 434 436 name = 'SH-Pref.Ori.'
Note: See TracChangeset
for help on using the changeset viewer.