Changeset 3423


Ignore:
Timestamp:
Jun 6, 2018 8:28:50 AM (4 years ago)
Author:
vondreele
Message:

fix chemical composition restraint. Wasn't updating with new fracs after each cycle. Now OK.
new routine GetAtomFracById? in G2math called in G2strMath
fix a wx.wx.... bug in G2ctrlGUI!
fix G2testplot to use wx-Phoenix; ditto testSSymbols

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIctrlGUI.py

    r3418 r3423  
    35313531            varSelSizer = wx.BoxSizer(wx.HORIZONTAL)
    35323532            varSelSizer.Add(SelCtrl,0)
    3533             varSpin = wx.SpinButton(self,style=wx.wx.SP_VERTICAL)
     3533            varSpin = wx.SpinButton(self,style=wx.SP_VERTICAL)
    35343534            varSpin.SetValue(0)
    35353535            varSpin.SetRange(-1,1)
  • trunk/GSASIImath.py

    r3329 r3423  
    546546    return XYZ
    547547   
    548 #def TransformAtoms(Atoms,cx,cia,Trans,Vec):
     548def GetAtomFracByID(pId,parmDict,AtLookup,indx):
     549    '''default doc string
     550   
     551    :param type name: description
     552   
     553    :returns: type name: description
     554   
     555    '''
     556    pfx = str(pId)+'::Afrac:'
     557    Frac = []
     558    for ind in indx:
     559        name = pfx+str(AtLookup[ind])
     560        Frac.append(parmDict[name])
     561    return Frac
     562   
    549563#    for Atom in Atoms:
    550564#        XYZ = Atom[cx:cx+3]
  • trunk/GSASIIstrMath.py

    r3418 r3423  
    373373                        pNames.append(str(pId)+':'+name+':'+str(i))
    374374                        mul = np.array(G2mth.GetAtomItemsById(Atoms,AtLookup,indx,cs+1))
    375                         frac = np.array(G2mth.GetAtomItemsById(Atoms,AtLookup,indx,cs-1))
     375                        frac = np.array(G2mth.GetAtomFracByID(pId,parmDict,AtLookup,indx))
    376376                        calc = np.sum(mul*frac*factors)
    377377                        pVals.append(obs-calc)
  • trunk/GSASIItestplot.py

    r2551 r3423  
    1010import wx.aui
    1111import matplotlib as mpl
    12 from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg as Canvas
    13 from matplotlib.backends.backend_wxagg import NavigationToolbar2Wx as Toolbar
     12try:
     13    from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg as Canvas
     14except ImportError:
     15    from matplotlib.backends.backend_wx import FigureCanvas as Canvas
     16try:
     17    from matplotlib.backends.backend_wxagg import NavigationToolbar2Wx as Toolbar
     18except ImportError:
     19    from matplotlib.backends.backend_wxagg import Toolbar as Toolbar # name changes in wx4.0.1
    1420
    1521class Plot(wx.Panel):
  • trunk/testSSymbols.py

    r3257 r3423  
    2727        self.testSSMenu = wx.MenuBar()
    2828        self.File = wx.Menu(title='')
    29         self.File.Append(help='Exit from testSS', id=wxID_FILEEXIT, kind=wx.ITEM_NORMAL,
    30             text='Exit')
     29        self.File.Append(wxID_FILEEXIT,'Exit','Exit from testSS')
    3130        self.Bind(wx.EVT_MENU, self.OnFileExit, id=wxID_FILEEXIT)
    3231        self.testSSMenu.Append(menu=self.File, title='Run')
Note: See TracChangeset for help on using the changeset viewer.