Changeset 98fdccd in sasview for sansguiframe/src/sans/guiframe
- Timestamp:
- Jan 5, 2012 3:40:41 PM (13 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:
- 82c11d3
- Parents:
- 011e0e4
- Location:
- sansguiframe/src/sans/guiframe
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sansguiframe/src/sans/guiframe/data_panel.py
rc668b1b r98fdccd 582 582 i_t_c = self.tree_ctrl.AppendItem(d_p_c, 583 583 process.__str__()) 584 self.append_theory(state_id, theory_list)584 wx.CallAfter(self.append_theory, state_id, theory_list) 585 585 self.enable_remove() 586 586 self.enable_import() -
sansguiframe/src/sans/guiframe/data_processor.py
r5531a46 r98fdccd 644 644 if data_outputs is None or data_outputs == {}: 645 645 return 646 646 inputs, outputs = self.get_odered_results(data_inputs, data_outputs) 647 647 for pos in range(self.GetPageCount()): 648 648 grid = self.GetPage(pos) 649 649 if grid.data is None: 650 650 #Found empty page 651 grid.set_data(data_inputs= data_inputs,652 data_outputs= data_outputs,651 grid.set_data(data_inputs=inputs, 652 data_outputs=outputs, 653 653 details=details, 654 654 file_name=file_name) … … 657 657 658 658 grid, pos = self.add_empty_page() 659 grid.set_data(data_inputs= data_inputs,660 data_outputs= data_outputs,659 grid.set_data(data_inputs=inputs, 660 data_outputs=outputs, 661 661 file_name=file_name, 662 662 details=details) 663 664 def get_odered_results(self, inputs, outputs=None): 665 """ 666 Get ordered the results 667 """ 668 # Let's re-order the data from the keys in 'Data' name. 669 if outputs == None: 670 return 671 to_be_sort = [str(item.label) for item in outputs['Data']] 672 inds = numpy.lexsort((to_be_sort, to_be_sort)) 673 for key in outputs.keys(): 674 key_list = outputs[key] 675 temp_key = [item for item in key_list] 676 for ind in inds: 677 temp_key[ind] = key_list[inds[ind]] 678 outputs[key] = temp_key 679 for key in inputs.keys(): 680 key_list = inputs[key] 681 if len(key_list) > 0: 682 temp_key = [item for item in key_list] 683 for ind in inds: 684 temp_key[ind] = key_list[inds[ind]] 685 inputs[key] = temp_key 686 return inputs, outputs 663 687 664 688 def add_column(self): … … 670 694 grid.AppendCols(1, True) 671 695 672 673 674 675 676 696 class GridPanel(SPanel): 677 697 def __init__(self, parent, data_inputs=None, … … 706 726 self.layout_plotting_area() 707 727 self.SetSizer(self.vbox) 708 728 709 729 def set_xaxis(self, label="", x=None): 710 730 """ … … 1088 1108 menubar.Append(self.edit, "&Edit") 1089 1109 self.Bind(wx.EVT_CLOSE, self.on_close) 1090 1091 1110 def GetLabelText(self, id): 1092 1111 """
Note: See TracChangeset
for help on using the changeset viewer.