- Timestamp:
- Apr 13, 2013 10:07:33 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/GSASII.py ¶
r886 r887 821 821 ParentFrame=self, 822 822 title=head, 823 header='Select default inst parms',) 823 header='Select default inst parms', 824 useCancel=False) 824 825 if res is None: continue 825 826 rd.instfile = '' -
TabularUnified trunk/GSASIIIO.py ¶
r886 r887 1180 1180 def BlockSelector(self, ChoiceList, ParentFrame=None, 1181 1181 title='Select a block', 1182 size=None, header='Block Selector'): 1182 size=None, header='Block Selector', 1183 useCancel=True): 1183 1184 ''' Provide a wx dialog to select a block if the file contains more 1184 1185 than one set of data and one must be selected 1185 1186 ''' 1186 dlg = wx.SingleChoiceDialog(ParentFrame,title, header,ChoiceList,) 1187 if useCancel: 1188 dlg = wx.SingleChoiceDialog( 1189 ParentFrame,title, header,ChoiceList) 1190 else: 1191 dlg = wx.SingleChoiceDialog( 1192 ParentFrame,title, header,ChoiceList, 1193 style=wx.DEFAULT_DIALOG_STYLE|wx.RESIZE_BORDER|wx.OK|wx.CENTRE) 1187 1194 if size: dlg.SetSize(size) 1188 1195 if dlg.ShowModal() == wx.ID_OK: … … 1439 1446 self.idstring = '' 1440 1447 self.Sample = G2pdG.SetDefaultSample() 1448 self.GSAS = None # used in TOF 1449 self.clockWd = None # used in TOF 1441 1450 self.repeat_instparm = True # Should a parm file be 1442 1451 # used for multiple histograms? -
TabularUnified trunk/imports/G2pwd_GPX.py ¶
r886 r887 108 108 self.powderentry[2] = selblk+1 109 109 self.idstring = data[0][0][5:] 110 # could pull out wavelength from data[4][1] here 111 # and save it as self.instdict['wave'] = wl 112 # likewise for dataset type as self.instdict['type'] = 'SNC' etc 113 # and self.Sample['Temperature'] for T 110 # pull out wavelength 111 try: 112 if len(data[4][1]) == 2: # current GPX file 113 if data[4][1][0].get('Lam'): 114 self.instdict['wave'] = [data[4][1][0].get('Lam')[1]] 115 elif data[4][1][0].get('Lam1') and data[4][1][0].get('Lam2'): 116 self.instdict['wave'] = [ 117 data[4][1][0].get('Lam1')[1], 118 data[4][1][0].get('Lam2')[1] 119 ] 120 elif len(data[4][1]) == 4: # original GPX file 121 pos = data[4][1][3].index('Lam') 122 self.instdict['wave'] = [data[4][1][1][pos],] 123 except: 124 pass 125 # pull out temperature 126 try: 127 if data[5][1].get('Temperature'): 128 self.Sample['Temperature'] = data[5][1]['Temperature'] 129 except: 130 pass 114 131 self.repeat_instparm = False # prevent reuse of iparm when several hists are read 115 132 return True
Note: See TracChangeset
for help on using the changeset viewer.