Changeset 1772


Ignore:
Timestamp:
Mar 31, 2015 12:44:58 PM (7 years ago)
Author:
vondreele
Message:

fix a copy flags error in DData
add Compute average for columns in Seq results.
fix missing GeneralMass? error
fix covariance motion error - now reports values correctly

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIddataGUI.py

    r1770 r1772  
    204204                    SHflags = {}
    205205                    for item in SHterms:
    206                         SHflags[item] = SHterms[item][1]
     206                        SHflags[item] = SHterms[item]
    207207                    copyDict[name].append(SHflags)
    208208            elif name == 'Babinet':
     
    238238                                    SHflags = copy.deepcopy(copyDict[name][2])
    239239                                    SHterms = copy.deepcopy(sourceDict[name][5])
    240                                     for item in SHflags:
    241                                         SHterms[item][1] = copy.deepcopy(SHflags[item])
    242240                            elif name == 'Babinet':
    243241                                for bab in babNames:
  • trunk/GSASIIgrid.py

    r1770 r1772  
    135135
    136136[ wxID_RENAMESEQSEL,wxID_SAVESEQSEL,wxID_SAVESEQSELCSV,wxID_SAVESEQCSV,wxID_PLOTSEQSEL,
    137   wxID_ORGSEQSEL,wxADDSEQVAR,wxDELSEQVAR,wxEDITSEQVAR,wxCOPYPARFIT,
     137  wxID_ORGSEQSEL,wxADDSEQVAR,wxDELSEQVAR,wxEDITSEQVAR,wxCOPYPARFIT,wxID_AVESEQSEL,
    138138  wxADDPARFIT,wxDELPARFIT,wxEDITPARFIT,wxDOPARFIT,
    139 ] = [wx.NewId() for item in range(14)]
     139] = [wx.NewId() for item in range(15)]
    140140
    141141[ wxID_MODELCOPY,wxID_MODELFIT,wxID_MODELADD,wxID_ELEMENTADD,wxID_ELEMENTDELETE,
     
    12851285        self.SequentialFile.Append(id=wxID_PLOTSEQSEL, kind=wx.ITEM_NORMAL,text='Plot selected',
    12861286            help='Plot selected sequential refinement results')
     1287        self.SequentialFile.Append(id=wxID_AVESEQSEL, kind=wx.ITEM_NORMAL,text='Compute average',
     1288            help='Compute average for selected parameter')           
    12871289        self.SequentialFile.Append(id=wxID_ORGSEQSEL, kind=wx.ITEM_NORMAL,text='Reorganize',
    12881290            help='Reorganize variables where variables change')
     
    25542556                )
    25552557               
     2558    def OnAveSelSeq(event):
     2559        'average the selected columns from menu command'
     2560        cols = sorted(G2frame.dataDisplay.GetSelectedCols()) # ignore selection order
     2561        if cols:
     2562            for col in cols:
     2563                ave = np.mean(GetColumnInfo(col)[1])
     2564                sig = np.std(GetColumnInfo(col)[1])
     2565                print ' Average for '+G2frame.SeqTable.GetColLabelValue(col)+': '+'%.6g'%(ave)+' +/- '+'%.6g'%(sig)
     2566        else:
     2567            G2frame.ErrorDialog(
     2568                'Select columns',
     2569                'No columns selected in table. Click on column labels to select fields for averaging.'
     2570                )
     2571               
    25562572    def OnRenameSelSeq(event):
    25572573        cols = sorted(G2frame.dataDisplay.GetSelectedCols()) # ignore selection order
     
    31973213    G2frame.dataFrame.Bind(wx.EVT_MENU, OnSaveSeqCSV, id=wxID_SAVESEQCSV)
    31983214    G2frame.dataFrame.Bind(wx.EVT_MENU, OnPlotSelSeq, id=wxID_PLOTSEQSEL)
     3215    G2frame.dataFrame.Bind(wx.EVT_MENU, OnAveSelSeq, id=wxID_AVESEQSEL)
    31993216    G2frame.dataFrame.Bind(wx.EVT_MENU, OnReOrgSelSeq, id=wxID_ORGSEQSEL)
    32003217    G2frame.dataFrame.Bind(wx.EVT_MENU, AddNewPseudoVar, id=wxADDSEQVAR)
  • trunk/GSASIIphsGUI.py

    r1770 r1772  
    556556        def DenSizer():
    557557           
    558             mass = G2mth.getMass(generalData)
     558            generalData['Mass'] = G2mth.getMass(generalData)
    559559            density,mattCoeff = G2mth.getDensity(generalData)
    560560            denSizer = wx.BoxSizer(wx.HORIZONTAL)
     
    564564            denSizer.Add(denTxt,0,WACV)
    565565            mattTxt = None       
    566             if generalData['Type'] == 'macromolecular' and mass > 0.0:
     566            if generalData['Type'] == 'macromolecular' and generalData['Mass'] > 0.0:
    567567                denSizer.Add(wx.StaticText(General,-1,' Matthews coeff.: '),
    568568                    0,WACV)
     
    37123712            mainSizer.Add((0,5),0)
    37133713        mainSizer.Add((0,5),0)
    3714         mainSizer.Add(wx.StaticText(Texture,-1,'Sample orientation angles: '),0,WACV)
     3714        mainSizer.Add(wx.StaticText(Texture,-1,'Sample orientation angle zeros: '),0,WACV)
    37153715        mainSizer.Add((0,5),0)
    37163716        angSizer = wx.BoxSizer(wx.HORIZONTAL)
  • trunk/GSASIIplot.py

    r1764 r1772  
    29092909    title = ' for\n'+Data['title']
    29102910    newAtomDict = Data.get('newAtomDict',{})
     2911    G2frame.G2plotNB.Delete('Covariance')
    29112912   
    29122913
     
    29262927
    29272928    def OnMotion(event):
    2928         #there is a problem here - reports wrong values
    29292929        if event.button:
    29302930            ytics = imgAx.get_yticks()
  • trunk/GSASIIstrMain.py

    r1770 r1772  
    4242   
    4343ateln2 = 8.0*math.log(2.0)
    44 DEBUG = True
     44DEBUG = False
    4545
    4646def RefineCore(Controls,Histograms,Phases,restraintDict,rigidbodyDict,parmDict,varyList,
Note: See TracChangeset for help on using the changeset viewer.