Changeset 6d3d5ff in sasview for prview/perspectives/pr
- Timestamp:
- Feb 2, 2011 5:52:03 PM (14 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:
- c8deee5
- Parents:
- 52725d6
- Location:
- prview/perspectives/pr
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
prview/perspectives/pr/inversion_panel.py
r75df58b r6d3d5ff 77 77 self.distance_explorator_ctl = None 78 78 ## Data manager 79 self. manager = None79 self._manager = None 80 80 ## Standalone flage 81 81 self.standalone = standalone … … 255 255 state = self.get_state() 256 256 257 self. manager.save_data(filepath=path, prstate=state)257 self._manager.save_data(filepath=path, prstate=state) 258 258 259 259 return state 260 261 def get_data(self): 262 """ 263 """ 264 return self._manager.get_data() 260 265 261 266 def get_state(self): … … 362 367 363 368 def set_manager(self, manager): 364 self. manager = manager369 self._manager = manager 365 370 366 371 def _do_layout(self): … … 720 725 Resets inversion parameters 721 726 """ 722 self.nfunc = self. manager.DEFAULT_NFUNC723 self.d_max = self. manager.DEFAULT_DMAX724 self.alpha = self. manager.DEFAULT_ALPHA727 self.nfunc = self._manager.DEFAULT_NFUNC 728 self.d_max = self._manager.DEFAULT_DMAX 729 self.alpha = self._manager.DEFAULT_ALPHA 725 730 self.qmin_ctl.SetValue("") 726 731 self.qmax_ctl.SetValue("") … … 754 759 755 760 dataset = self.plot_data.GetValue() 756 self. manager.estimate_plot_inversion(alpha=alpha, nfunc=nfunc,761 self._manager.estimate_plot_inversion(alpha=alpha, nfunc=nfunc, 757 762 d_max=dmax, 758 763 q_min=qmin, q_max=qmax, … … 823 828 try: 824 829 nfunc = int(self.nfunc_ctl.GetValue()) 825 npts = self. manager.get_npts()830 npts = self._manager.get_npts() 826 831 if npts > 0 and nfunc > npts: 827 832 message = "Number of function terms should be smaller " 828 833 message += "than the number of points" 829 wx.PostEvent(self. manager.parent, StatusEvent(status=message))834 wx.PostEvent(self._manager.parent, StatusEvent(status=message)) 830 835 raise ValueError, message 831 836 self.nfunc_ctl.SetBackgroundColour(wx.WHITE) … … 871 876 """ 872 877 from explore_dialog import ExploreDialog 873 if self. manager._last_pr is not None:874 pr = self. manager._create_plot_pr()878 if self._manager._last_pr is not None: 879 pr = self._manager._create_plot_pr() 875 880 dialog = ExploreDialog(pr, 10, None, -1, "") 876 881 dialog.ShowModal() 877 882 else: 878 883 message = "No data to analyze. Please load a data set to proceed." 879 wx.PostEvent(self. manager.parent, StatusEvent(status=message))884 wx.PostEvent(self._manager.parent, StatusEvent(status=message)) 880 885 881 886 def _on_invert(self, evt): … … 897 902 message = "No data to invert. Select a data set before" 898 903 message += " proceeding with P(r) inversion." 899 wx.PostEvent(self. manager.parent, StatusEvent(status=message))904 wx.PostEvent(self._manager.parent, StatusEvent(status=message)) 900 905 else: 901 self. manager.setup_plot_inversion(alpha=alpha, nfunc=nfunc,906 self._manager.setup_plot_inversion(alpha=alpha, nfunc=nfunc, 902 907 d_max=dmax, 903 908 q_min=qmin, q_max=qmax, … … 914 919 Choose a new input file for I(q) 915 920 """ 916 if not self. manager is None:921 if not self._manager is None: 917 922 self.plot_data.SetValue(str(data.name)) 918 923 try: 919 self. manager.show_data(data=data, reset=True)924 self._manager.show_data(data=data, reset=True) 920 925 self._on_pars_changed(None) 921 926 self._on_invert(None) -
prview/perspectives/pr/pr.py
r8994b6b r6d3d5ff 108 108 # Create a CanSAS/Pr reader 109 109 self.state_reader = Reader(self.set_state) 110 self._extensions = '.prv' 110 111 l = Loader() 111 112 l.associate_file_reader('.prv', self.state_reader) 112 l.associate_file_reader(".s av", self.state_reader)113 l.associate_file_reader(".svs", self.state_reader) 113 114 114 115 # Log startup 115 116 logging.info("Pr(r) plug-in started") 116 117 118 def get_data(self): 119 """ 120 """ 121 return self.current_plottable 122 117 123 def set_state(self, state, datainfo=None): 118 124 """
Note: See TracChangeset
for help on using the changeset viewer.