Changeset 4f81342 in sasview


Ignore:
Timestamp:
Aug 2, 2010 2:57:05 PM (14 years ago)
Author:
Gervaise Alina <gervyh@…>
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:
80184e2
Parents:
e99126a
Message:

working on guiframe loading data for fitting

Location:
sansview/perspectives/fitting
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • sansview/perspectives/fitting/fitpanel.py

    r8898e963 r4f81342  
    190190        from hint_fitpage import HintFitPage 
    191191        self.hint_page = HintFitPage(self)  
    192         self.AddPage(page=self.hint_page, caption="Loaded Data") 
     192        self.AddPage(page=self.hint_page, caption=self.hint_page.window_caption) 
    193193        # increment number for model name 
    194194        self.count = 0 
     
    283283        """ 
    284284        self.manager = manager 
    285  
     285        self.hint_page.set_manager(self.manager) 
    286286         
    287287    def set_owner(self,owner): 
     
    328328        name = "Fit Page" 
    329329        type = 'empty' 
     330        print "get_page_info",data.is_data 
    330331        if data is not None and hasattr(data, "is_data"): 
    331332            if data.is_data: 
     
    406407        page_info = self.get_page_info(data=data) 
    407408        type = page_info.type 
     409        print "add_fit_page",page_info.type 
    408410        npages = len(self.opened_pages.keys()) 
    409411        if npages == 0: 
  • sansview/perspectives/fitting/fitting.py

    r8898e963 r4f81342  
    677677                wx.PostEvent(self.parent, StatusEvent(status=msg, info="warning")) 
    678678        except: 
    679              
    680679            msg = "Creating Fit page: %s"%sys.exc_value 
    681680            wx.PostEvent(self.parent, StatusEvent(status=msg, info="error")) 
  • sansview/perspectives/fitting/hint_fitpage.py

    r8898e963 r4f81342  
    1010    """ 
    1111     ## Internal name for the AUI manager 
    12     window_name = "Hint Page" 
     12    window_name = "Loaded Data" 
    1313    ## Title to appear on top of the window 
    14     window_caption = "Hint page " 
     14    window_caption = "Loaded Data" 
    1515     
    1616    def __init__(self, parent): 
     
    2121        self.SetupScrolling() 
    2222        self.parent = parent 
     23        self.manager = None 
    2324        msg = "right click on the data when it is highlighted " 
    2425        msg += "the select option to fit for futher options" 
    2526        self.do_layout() 
    26         
     27         
     28    def set_manager(self, manager): 
     29        """ 
     30        """ 
     31        self.manager = manager 
    2732         
    2833    def set_data(self, list=[], state=None): 
     
    3540                self.data_cbbox.Insert(item=data.name, pos=0, 
    3641                                    clientData=(data, path)) 
    37         if self.data_cbbox.GetCount() >0: 
     42      
     43        if self.data_cbbox.GetCount() ==1: 
    3844            self.data_cbbox.SetSelection(0) 
    3945            self.data_cbbox.Enable() 
     
    8086        n = self.data_cbbox.GetCurrentSelection() 
    8187        data, path = self.data_cbbox.GetClientData(n) 
     88        if data.__class__.__name__ in ["Data1D", "Theory1D"]: 
     89            data = self.manager.create_fittable_data1D(data=data) 
     90        else: 
     91            data = self.manager.create_fittable_data2D(data=data) 
    8292        self.parent.manager.add_fit_page(data=data) 
    8393        if data !=None: 
Note: See TracChangeset for help on using the changeset viewer.