Changeset 5251ec6 in sasview for src/sas/sasgui/guiframe/local_perspectives/plotting/parameters_panel_slicer.py
- Timestamp:
- Oct 11, 2018 12:20:56 PM (5 years ago)
- Branches:
- master, magnetic_scatt, release-4.2.2, ticket-1009, ticket-1249
- Children:
- 98b9f32
- Parents:
- 67ed543
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sasgui/guiframe/local_perspectives/plotting/parameters_panel_slicer.py
ra20a255 r5251ec6 2 2 3 3 import os 4 4 5 import wx 5 6 import wx.lib.newevent 7 6 8 from sas.sascalc.dataloader.readers.cansas_reader import Reader 7 9 from sas.sasgui.guiframe.utils import format_number 8 10 from sas.sasgui.guiframe.events import EVT_SLICER_PARS, EVT_SLICER 9 11 from sas.sasgui.guiframe.events import SlicerParameterEvent, StatusEvent 10 from Plotter2D import ModelPanel2D 12 13 from .Plotter2D import ModelPanel2D 14 11 15 apply_params, EVT_APPLY_PARAMS = wx.lib.newevent.NewEvent() 12 16 save_files, EVT_AUTO_SAVE = wx.lib.newevent.NewEvent() … … 100 104 iy = 1 101 105 self.parameters = [] 102 keys = params.keys() 103 keys.sort() 106 keys = list(sorted(params.keys())) 104 107 for item in keys: 105 108 ix = 0 … … 127 130 self.bck.Add(text, (iy, ix), (1, 1), 128 131 wx.LEFT | wx.EXPAND | wx.ADJUST_MINSIZE, 15) 129 options = BINNING_OPTIONS.keys()132 options = list(BINNING_OPTIONS.keys()) 130 133 self.bin_ctl = wx.ComboBox(parent=self, choices=options) 131 134 hint_msg = "Modify the value of %s to change" % item … … 325 328 326 329 # Find desired 2D data panels 327 for key, mgr in spp.plot_panels.ite ritems():330 for key, mgr in spp.plot_panels.items(): 328 331 if mgr.graph.prop['title'] in self.data_list.CheckedStrings: 329 332 apply_to_list.append(mgr) … … 377 380 self.loaded_data = [] 378 381 # Iterate over the loaded plots and find all 2D panels 379 for key, value in self.main_window.plot_panels.ite ritems():382 for key, value in self.main_window.plot_panels.items(): 380 383 if isinstance(value, ModelPanel2D): 381 384 self.loaded_data.append(value.data2D.name) … … 453 456 454 457 # Find the correct plots to save 455 for key, plot in self.main_window.plot_panels.ite ritems():458 for key, plot in self.main_window.plot_panels.items(): 456 459 if not hasattr(plot, "data2D"): 457 460 for item in plot.plots: … … 461 464 462 465 # Save files as Text 463 for item, data1d in data_dic.ite ritems():466 for item, data1d in data_dic.items(): 464 467 base = '.'.join(item.split('.')[:-1]) 465 468 file_name = base + append + ".txt"
Note: See TracChangeset
for help on using the changeset viewer.