Changeset 1688 for trunk/GSASIIgrid.py
- Timestamp:
- Mar 3, 2015 3:01:18 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIgrid.py
r1673 r1688 134 134 ] = [wx.NewId() for item in range(10)] 135 135 136 [ wxID_RENAMESEQSEL,wxID_SAVESEQSEL,wxID_SAVESEQSELCSV,wxID_ PLOTSEQSEL,wxID_ORGSEQSEL,137 wx ADDSEQVAR,wxDELSEQVAR,wxEDITSEQVAR,wxCOPYPARFIT,136 [ wxID_RENAMESEQSEL,wxID_SAVESEQSEL,wxID_SAVESEQSELCSV,wxID_SAVESEQCSV,wxID_PLOTSEQSEL, 137 wxID_ORGSEQSEL,wxADDSEQVAR,wxDELSEQVAR,wxEDITSEQVAR,wxCOPYPARFIT, 138 138 wxADDPARFIT,wxDELPARFIT,wxEDITPARFIT,wxDOPARFIT, 139 ] = [wx.NewId() for item in range(1 3)]139 ] = [wx.NewId() for item in range(14)] 140 140 141 141 [ wxID_MODELCOPY,wxID_MODELFIT,wxID_MODELADD,wxID_ELEMENTADD,wxID_ELEMENTDELETE, … … 1576 1576 self.SequentialFile.Append(id=wxID_SAVESEQSEL, kind=wx.ITEM_NORMAL,text='Save selected as text', 1577 1577 help='Save selected sequential refinement results as a text file') 1578 self.SequentialFile.Append(id=wxID_SAVESEQCSV, kind=wx.ITEM_NORMAL,text='Save all as CSV', 1579 help='Save all sequential refinement results as a CSV spreadsheet file') 1578 1580 self.SequentialFile.Append(id=wxID_SAVESEQSELCSV, kind=wx.ITEM_NORMAL,text='Save selected as CSV', 1579 1581 help='Save selected sequential refinement results as a CSV spreadsheet file') … … 2880 2882 OnSaveSelSeq(event,csv=True) 2881 2883 2882 def OnSaveSelSeq(event,csv=False): 2883 'export the selected columns to a .txt file from menu command' 2884 def OnSaveSeqCSV(event): 2885 'export all columns to a .csv file from menu command' 2886 OnSaveSelSeq(event,csv=True,allcols=True) 2887 2888 def OnSaveSelSeq(event,csv=False,allcols=False): 2889 'export the selected columns to a .txt or .csv file from menu command' 2884 2890 def WriteCSV(): 2885 2891 def WriteList(headerItems): … … 2892 2898 for col in cols: 2893 2899 item = G2frame.SeqTable.GetColLabelValue(col) 2900 # get rid of labels that have Unicode characters 2901 if not all([ord(c) < 128 and ord(c) != 0 for c in item]): item = '?' 2894 2902 if col in havesig: 2895 2903 head += [item,'esd-'+item] … … 2925 2933 2926 2934 # start of OnSaveSelSeq code 2927 cols = sorted(G2frame.dataDisplay.GetSelectedCols()) # ignore selection order 2935 if allcols: 2936 cols = range(G2frame.SeqTable.GetNumberCols()) 2937 else: 2938 cols = sorted(G2frame.dataDisplay.GetSelectedCols()) # ignore selection order 2928 2939 nrows = G2frame.SeqTable.GetNumberRows() 2929 2940 if not cols: … … 3483 3494 G2frame.dataFrame.Bind(wx.EVT_MENU, OnSaveSelSeq, id=wxID_SAVESEQSEL) 3484 3495 G2frame.dataFrame.Bind(wx.EVT_MENU, OnSaveSelSeqCSV, id=wxID_SAVESEQSELCSV) 3496 G2frame.dataFrame.Bind(wx.EVT_MENU, OnSaveSeqCSV, id=wxID_SAVESEQCSV) 3485 3497 G2frame.dataFrame.Bind(wx.EVT_MENU, OnPlotSelSeq, id=wxID_PLOTSEQSEL) 3486 3498 G2frame.dataFrame.Bind(wx.EVT_MENU, OnReOrgSelSeq, id=wxID_ORGSEQSEL) … … 3715 3727 ) 3716 3728 name = histNames[0] 3717 3729 3730 #****************************************************************************** 3731 # this does not work for refinements that have differing numbers of variables. 3732 #raise Exception 3718 3733 indepVarDict = { # values in table w/o ESDs 3719 3734 var:colList[i][0] for i,var in enumerate(colLabels) if colSigs[i] is None … … 3726 3741 # add recip cell coeff. values 3727 3742 depVarDict.update({var:val for var,val in data[name].get('newCellDict',{}).values()}) 3728 3743 3729 3744 G2frame.dataDisplay = GSGrid(parent=G2frame.dataFrame) 3730 3745 G2frame.SeqTable = Table(
Note: See TracChangeset
for help on using the changeset viewer.