Changeset a1b2471 in sasview for theoryview/perspectives/theory


Ignore:
Timestamp:
Sep 21, 2010 5:44:24 PM (14 years ago)
Author:
Jae Cho <jhjcho@…>
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:
db08737
Parents:
60c320b
Message:

added sld plot for onion model and etc…

Location:
theoryview/perspectives/theory
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • theoryview/perspectives/theory/basepage.py

    re87f9fc ra1b2471  
    11951195        self.text2 = wx.StaticText( self,-1,"P(Q)*S(Q)" ) 
    11961196        self.mutifactor_text = wx.StaticText( self,-1,"No. of Shells: " ) 
    1197          
     1197        self.show_sld_button = wx.Button( self,-1,"Show SLD Profile" ) 
     1198        self.show_sld_button.Bind(wx.EVT_BUTTON,self._on_show_sld) 
    11981199        self.formfactorbox = wx.ComboBox(self, -1,style=wx.CB_READONLY) 
    11991200        if self.model!=None: 
     
    12421243        mutifactor_selection.Add(self.mutifactor_text) 
    12431244        mutifactor_selection.Add(self.multifactorbox) 
     1245        mutifactor_selection.Add((5,5)) 
     1246        mutifactor_selection.Add(self.show_sld_button) 
    12441247         
    12451248        boxsizer1.Add( sizer_buttons ) 
     
    12501253         
    12511254        self._set_multfactor_combobox() 
    1252  
     1255        self.show_sld_button.Hide() 
     1256         
    12531257        #-------------------------------------------------------- 
    12541258        sizer.Add(boxsizer1,0, wx.EXPAND | wx.ALL, 10) 
     
    12561260        self.SetScrollbars(20,20,25,65) 
    12571261         
     1262    def _on_show_sld(self, event=None): 
     1263        """ 
     1264        Plot SLD profile 
     1265        """ 
     1266        # get profile data 
     1267        x,y=self.model.getProfile() 
     1268 
     1269        from danse.common.plottools import Data1D 
     1270        from profile_dialog import SLDPanel 
     1271        sld_data = Data1D(x,y) 
     1272        sld_data.name = 'SLD' 
     1273    
     1274        self.panel = SLDPanel(self, data=sld_data,id =-1 ) 
     1275        self.panel.ShowModal() 
     1276 
    12581277    def _set_multfactor_combobox(self):    
    12591278        """ 
     
    14691488            if form_factor().__class__ in self.model_list_box["Multi-Functions"]: 
    14701489                self._show_multfactor_combobox() 
     1490                self.show_sld_button.Show(True) 
    14711491                m_id = self.multifactorbox.GetCurrentSelection() 
    14721492                self.multi_factor = self.multifactorbox.GetClientData(m_id) 
     
    14751495            else: 
    14761496                self._hide_multfactor_combobox() 
     1497                self.show_sld_button.Hide() 
    14771498                form_factor = form_factor() 
    14781499                self.multi_factor = None 
    14791500        else: 
    14801501            self._hide_multfactor_combobox() 
     1502            self.show_sld_button.Hide() 
    14811503            self.multi_factor = None   
    14821504               
Note: See TracChangeset for help on using the changeset viewer.