Changeset 098f3d2 in sasview
- Timestamp:
- Jul 6, 2015 1:11:55 PM (9 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:
- d3d67f0
- Parents:
- 9989a6a
- Location:
- src/sas
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/guiframe/local_perspectives/plotting/Plotter1D.py
rb99a4552 r098f3d2 564 564 self._slicerpop.Append(wx_id, '&Print Image', 'Print image ') 565 565 wx.EVT_MENU(self, wx_id, self.onPrint) 566 wx_id = wx.NewId()567 self._slicerpop.Append(wx_id, '&Print Preview', 'Print preview')568 wx.EVT_MENU(self, wx_id, self.onPrinterPreview)569 566 570 567 wx_id = wx.NewId() -
src/sas/guiframe/local_perspectives/plotting/Plotter2D.py
rc039589 r098f3d2 300 300 301 301 wx_id = wx.NewId() 302 slicerpop.Append(wx_id, '&Print Preview', 'Print preview')303 wx.EVT_MENU(self, wx_id, self.onPrinterPreview)304 305 wx_id = wx.NewId()306 302 slicerpop.Append(wx_id, '&Copy to Clipboard', 'Copy to the clipboard') 307 303 wx.EVT_MENU(self, wx_id, self.OnCopyFigureMenu) -
src/sas/guiframe/local_perspectives/plotting/SimplePlot.py
rb40ad40 r098f3d2 58 58 slicerpop.Append(wx_id, '&Print Image', 'Print image') 59 59 wx.EVT_MENU(self, wx_id, self.onPrint) 60 61 wx_id = wx.NewId()62 slicerpop.Append(wx_id, '&Print Preview', 'Print preview')63 wx.EVT_MENU(self, wx_id, self.onPrinterPreview)64 60 65 61 wx_id = wx.NewId() … … 234 230 wx.EVT_MENU(self, id, self.on_print_image) 235 231 236 id = wx.NewId()237 item = wx.MenuItem(menu, id, "&Print Preview")238 item.SetBitmap(preview_bmp)239 menu.AppendItem(item)240 wx.EVT_MENU(self, id, self.on_print_preview)241 242 232 menu.AppendSeparator() 243 233 id = wx.NewId() -
src/sas/guiframe/report_dialog.py
re8bb5b6 r098f3d2 66 66 hbox.Add(button_close) 67 67 button_close.SetFocus() 68 69 button_preview = wx.Button(self, wx.NewId(), "Preview")70 button_preview.SetToolTipString("Print preview this report.")71 button_preview.Bind(wx.EVT_BUTTON, self.onPreview,72 id=button_preview.GetId())73 hbox.Add(button_preview)74 68 75 69 button_print = wx.Button(self, wx.NewId(), "Print") -
src/sas/perspectives/fitting/fitpage.py
r60d08fd r098f3d2 2236 2236 """ 2237 2237 # compute weight for the current data 2238 from sas.perspectives.fitting.utils import get_weight2239 2238 flag_weight = self.get_weight_flag() 2240 2239 if is_2D == None: 2241 2240 is_2D = self._is_2D() 2242 weight = get_weight(data=self.data,2243 is2d=is_2D,2244 flag=flag_weight)2245 2241 self._manager.set_fit_weight(uid=self.uid, 2246 2242 flag=flag_weight, … … 2260 2256 self._update_paramv_on_fit() 2261 2257 2262 # msg default2263 msg = None2264 2258 if event != None: 2265 2259 tcrtl = event.GetEventObject() … … 2275 2269 # if any value is changed 2276 2270 if is_new_pinhole: 2277 msg =self._set_pinhole_smear()2271 self._set_pinhole_smear() 2278 2272 # hide all silt sizer 2279 2273 self._hide_all_smear_info() -
src/sas/perspectives/fitting/fitting.py
re1442d4 r098f3d2 516 516 selected_data_list = [] 517 517 if self.batch_on: 518 page =self.add_fit_page(data=data_list)518 self.add_fit_page(data=data_list) 519 519 else: 520 520 if len(data_list) > MAX_NBR_DATA: … … 537 537 if group_id not in data.list_group_id: 538 538 data.list_group_id.append(group_id) 539 page =self.add_fit_page(data=[data])539 self.add_fit_page(data=[data]) 540 540 except: 541 msg = "Fitting Set_data: " + str(sys.exc_value)541 msg = "Fitting set_data: " + str(sys.exc_value) 542 542 wx.PostEvent(self.parent, StatusEvent(status=msg, info="error")) 543 543 … … 670 670 :param weight: current dy data 671 671 """ 672 # If we are not dealing with a specific fit problem, then 673 # there is no point setting the weights. 674 if fid is None: 675 return 672 676 if uid in self.page_finder.keys(): 673 677 self.page_finder[uid].set_weight(flag=flag, is2d=is2d) -
src/sas/plottools/PlotPanel.py
r1170492 r098f3d2 635 635 when clicking on linear Fit on context menu , display Fitting Dialog 636 636 """ 637 list = {}637 plot_dict = {} 638 638 menu = event.GetEventObject() 639 id = event.GetId()640 self.set_selected_from_menu(menu, id)639 event_id = event.GetId() 640 self.set_selected_from_menu(menu, event_id) 641 641 plotlist = self.graph.returnPlottable() 642 642 if self.graph.selected_plottable is not None: 643 643 for item in plotlist: 644 644 if item.id == self.graph.selected_plottable: 645 list[item] = plotlist[item]645 plot_dict[item] = plotlist[item] 646 646 else: 647 list = plotlist647 plot_dict = plotlist 648 648 from fitDialog import LinearFit 649 649 650 if len( list.keys()) > 0:651 first_item = list.keys()[0]650 if len(plot_dict.keys()) > 0: 651 first_item = plot_dict.keys()[0] 652 652 dlg = LinearFit(parent=None, plottable=first_item, 653 653 push_data=self.onFitDisplay, … … 871 871 """ 872 872 # Slicer plot popup menu 873 id = wx.NewId()873 wx_id = wx.NewId() 874 874 slicerpop = wx.Menu() 875 slicerpop.Append(id, '&Save image', 'Save image as PNG') 876 wx.EVT_MENU(self, id, self.onSaveImage) 877 878 id = wx.NewId() 879 slicerpop.Append(id, '&Printer setup', 'Set image size') 880 wx.EVT_MENU(self, id, self.onPrinterSetup) 881 882 id = wx.NewId() 883 slicerpop.Append(id, '&Printer Preview', 'Set image size') 884 wx.EVT_MENU(self, id, self.onPrinterPreview) 885 886 id = wx.NewId() 887 slicerpop.Append(id, '&Print image', 'Print image ') 888 wx.EVT_MENU(self, id, self.onPrint) 889 890 id = wx.NewId() 891 slicerpop.Append(id, '&Copy', 'Copy to the clipboard') 892 wx.EVT_MENU(self, id, self.OnCopyFigureMenu) 893 894 #id = wx.NewId() 895 #slicerpop.Append(id, '&Load 1D data file') 896 #wx.EVT_MENU(self, id, self._onLoad1DData) 897 898 id = wx.NewId() 875 slicerpop.Append(wx_id, '&Save image', 'Save image as PNG') 876 wx.EVT_MENU(self, wx_id, self.onSaveImage) 877 878 wx_id = wx.NewId() 879 slicerpop.Append(wx_id, '&Printer setup', 'Set image size') 880 wx.EVT_MENU(self, wx_id, self.onPrinterSetup) 881 882 wx_id = wx.NewId() 883 slicerpop.Append(wx_id, '&Print image', 'Print image ') 884 wx.EVT_MENU(self, wx_id, self.onPrint) 885 886 wx_id = wx.NewId() 887 slicerpop.Append(wx_id, '&Copy', 'Copy to the clipboard') 888 wx.EVT_MENU(self, wx_id, self.OnCopyFigureMenu) 889 890 wx_id = wx.NewId() 899 891 slicerpop.AppendSeparator() 900 slicerpop.Append( id, '&Properties')901 wx.EVT_MENU(self, id, self._onProperties)902 903 id = wx.NewId()892 slicerpop.Append(wx_id, '&Properties') 893 wx.EVT_MENU(self, wx_id, self._onProperties) 894 895 wx_id = wx.NewId() 904 896 slicerpop.AppendSeparator() 905 slicerpop.Append( id, '&Linear Fit')906 wx.EVT_MENU(self, id, self.onFitting)907 908 id = wx.NewId()897 slicerpop.Append(wx_id, '&Linear Fit') 898 wx.EVT_MENU(self, wx_id, self.onFitting) 899 900 wx_id = wx.NewId() 909 901 slicerpop.AppendSeparator() 910 slicerpop.Append( id, '&Toggle Legend On/Off', 'Toggle Legend On/Off')911 wx.EVT_MENU(self, id, self.onLegend)902 slicerpop.Append(wx_id, '&Toggle Legend On/Off', 'Toggle Legend On/Off') 903 wx.EVT_MENU(self, wx_id, self.onLegend) 912 904 913 905 loc_menu = wx.Menu() 914 906 for label in self._loc_labels: 915 id = wx.NewId()916 loc_menu.Append( id, str(label), str(label))917 wx.EVT_MENU(self, id, self.onChangeLegendLoc)918 id = wx.NewId()919 slicerpop.AppendMenu( id, '&Modify Legend Location', loc_menu)920 921 id = wx.NewId()922 slicerpop.Append( id, '&Modify Y Axis Label')923 wx.EVT_MENU(self, id, self._on_yaxis_label)924 id = wx.NewId()925 slicerpop.Append( id, '&Modify X Axis Label')926 wx.EVT_MENU(self, id, self._on_xaxis_label)907 wx_id = wx.NewId() 908 loc_menu.Append(wx_id, str(label), str(label)) 909 wx.EVT_MENU(self, wx_id, self.onChangeLegendLoc) 910 wx_id = wx.NewId() 911 slicerpop.AppendMenu(wx_id, '&Modify Legend Location', loc_menu) 912 913 wx_id = wx.NewId() 914 slicerpop.Append(wx_id, '&Modify Y Axis Label') 915 wx.EVT_MENU(self, wx_id, self._on_yaxis_label) 916 wx_id = wx.NewId() 917 slicerpop.Append(wx_id, '&Modify X Axis Label') 918 wx.EVT_MENU(self, wx_id, self._on_xaxis_label) 927 919 928 920 try: … … 1923 1915 self.xmax = xmax 1924 1916 #In case need to change the range of data plotted 1925 list = [] 1926 list = self.graph.returnPlottable() 1927 for item in list: 1928 #item.onFitRange(xminView,xmaxView) 1917 for item in self.graph.returnPlottable(): 1929 1918 item.onFitRange(None, None) 1930 1919 # Create new data plottable with result … … 1970 1959 Reset the graph by plotting the full range of data 1971 1960 """ 1972 list = [] 1973 list = self.graph.returnPlottable() 1974 for item in list: 1961 for item in self.graph.returnPlottable(): 1975 1962 item.onReset() 1976 1963 self.graph.render(self)
Note: See TracChangeset
for help on using the changeset viewer.