Changeset d560a37 in sasview for sansguiframe/src
- Timestamp:
- Jul 3, 2012 2:40:59 PM (12 years ago)
- Branches:
- master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- 8f59e95
- Parents:
- e0405592
- Location:
- sansguiframe/src/sans/guiframe
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sansguiframe/src/sans/guiframe/data_processor.py
rdbb3914 rd560a37 561 561 self.AddPage(grid, "", True) 562 562 pos = self.GetPageIndex(grid) 563 title = " Batch" + str(self.GetPageCount())563 title = "Grid" + str(self.GetPageCount()) 564 564 self.SetPageText(pos, title) 565 565 self.SetSelection(pos) … … 892 892 wx.PostEvent(self.parent.parent, StatusEvent(status=msg, 893 893 info="error")) 894 time.sleep(0.5)894 #time.sleep(0.5) 895 895 continue 896 896 else: … … 915 915 wx.PostEvent(self.parent.parent, 916 916 StatusEvent(status=msg, info="error")) 917 time.sleep(0.5)918 continue917 return 918 #continue 919 919 #new_plot.name = title + ': ' + new_plot.title 920 920 if issubclass(new_plot.__class__, Data1D): … … 935 935 StatusEvent(status=msg, 936 936 info="error")) 937 time.sleep(0.5) 938 continue 937 #time.sleep(0.5) 938 return 939 #continue 939 940 """ 940 941 wx.PostEvent(self.parent.parent, … … 958 959 wx.PostEvent(self.parent.parent, 959 960 StatusEvent(status=msg, info="error")) 960 time.sleep(0.5) 961 continue 961 #time.sleep(0.5) 962 return 963 #continue 962 964 963 965 … … 1040 1042 new_plot.id = wx.NewId() 1041 1043 new_plot.group_id = wx.NewId() 1042 title = "%s vs %s" % (self.y_axis_title.GetValue(), 1043 self.x_axis_title.GetValue()) 1044 new_plot.xaxis(self.x_axis_title.GetValue(), 1044 y_title = self.y_axis_title.GetValue() 1045 x_title = self.x_axis_title.GetValue() 1046 title = "%s_vs_%s" % (y_title, 1047 x_title) 1048 new_plot.xaxis(x_title, 1045 1049 self.x_axis_unit.GetValue()) 1046 new_plot.yaxis( self.y_axis_title.GetValue(),1050 new_plot.yaxis(y_title, 1047 1051 self.y_axis_unit.GetValue()) 1048 1052 try: 1049 title = self.notebook.GetPageText(pos) 1053 title = y_title.strip() 1054 title += self.notebook.GetPageText(pos) 1050 1055 new_plot.name = title 1051 1056 new_plot.xtransform = "x" 1052 1057 new_plot.ytransform = "y" 1058 #new_plot.is_data = False 1053 1059 wx.PostEvent(self.parent.parent, 1054 1060 NewPlotEvent(plot=new_plot, … … 1216 1222 class GridFrame(wx.Frame): 1217 1223 def __init__(self, parent=None, data_inputs=None, data_outputs=None, id=-1, 1218 title=" BatchWindow", size=(800, 500)):1224 title="Grid Window", size=(800, 500)): 1219 1225 wx.Frame.__init__(self, parent=parent, id=id, title=title, size=size) 1220 1226 self.parent = parent -
sansguiframe/src/sans/guiframe/gui_manager.py
r83b81b8 rd560a37 372 372 details=details, 373 373 file_name=file_name) 374 self. batch_frame.Show(True)374 self.show_batch_frame(None) 375 375 376 376 def on_read_batch_tofile(self, event): … … 403 403 fd = open(file_name, 'r') 404 404 _, ext = os.path.splitext(file_name) 405 separator = "\t"405 separator = None 406 406 if ext.lower() == ".csv": 407 407 separator = "," … … 414 414 for index in range(len(lines)): 415 415 line = lines[index] 416 line.strip() 416 417 count = 0 417 if line.find(separator) != -1: 418 if separator == None: 419 line.replace('\t', ' ') 420 #found the first line containing the label 421 col_name_toks = line.split() 422 for item in col_name_toks: 423 if item.strip() != "": 424 count += 1 425 else: 426 line = " " 427 elif line.find(separator) != -1: 418 428 if line.count(separator) >= 2: 419 429 #found the first line containing the label … … 430 440 if column_names_line.strip() == "" or index is None: 431 441 return 442 432 443 col_name_toks = column_names_line.split(separator) 433 444 c_index = 0 … … 439 450 c_index += 1 440 451 441 442 452 self.open_with_localapp(data_outputs=data, data_inputs=None, 443 453 file_name=file_name, details=details) … … 1342 1352 id = wx.NewId() 1343 1353 hint = "Display batch results into a grid" 1344 self._view_menu.Append(id, '&Show Batch Results', hint)1354 self._view_menu.Append(id, '&Show Grid Window', hint) 1345 1355 wx.EVT_MENU(self, id, self.show_batch_frame) 1346 1356
Note: See TracChangeset
for help on using the changeset viewer.