Changeset a3149c5 in sasview for prview/perspectives/pr


Ignore:
Timestamp:
Mar 11, 2011 12:15:59 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:
14cd91b1
Parents:
b2d9826
Message:

working on guiframe

Location:
prview/perspectives/pr
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • prview/perspectives/pr/inversion_state.py

    ra07e72f ra3149c5  
    409409        return None 
    410410     
    411     def get_state(self): 
    412         return self.state 
    413411    def _parse_prstate(self, entry): 
    414412        """ 
  • prview/perspectives/pr/pr.py

    r053c769 ra3149c5  
    158158            # Load the P(r) results 
    159159            #state = self.state_reader.get_state() 
     160            self.parent.add_data(data_list=[self.current_plottable]) 
    160161            wx.PostEvent(self.parent, NewPlotEvent(plot=self.current_plottable, 
    161162                                        title=self.current_plottable.title)) 
     
    223224        new_plot.id = "P_{obs}(r)" 
    224225        new_plot.title = title 
     226        self.parent.append_theory(data_id=self.current_plottable.id, 
     227                                       theory=new_plot) 
    225228        wx.PostEvent(self.parent, NewPlotEvent(plot=new_plot, title=title)) 
    226229 
     
    251254        new_plot.xaxis("\\rm{r}", 'A') 
    252255        new_plot.yaxis("\\rm{P(r)} ","cm^{-3}") 
    253          
     256        new_plot.id = "P_{true}(r)" 
     257        group_id = "P_{true}(r)" 
     258        if group_id not in new_plot.group_id: 
     259            new_plot.group_id.append(group_id) 
     260        self.parent.append_theory(data_id=self.current_plottable.id, 
     261                                       theory=new_plot) 
    254262        #Put this call in plottables/guitools     
    255263        wx.PostEvent(self.parent, NewPlotEvent(plot=new_plot, title="Sphere P(r)")) 
     
    312320                new_plot.group_id.append( pr.info["plot_group_id"][index]) 
    313321        new_plot.id = IQ_FIT_LABEL 
    314         #new_plot.group_id.append(2) 
     322        self.parent.append_theory(data_id=self.current_plottable.id, 
     323                                       theory=new_plot) 
    315324        wx.PostEvent(self.parent, NewPlotEvent(plot=new_plot, title=title)) 
    316325         
     
    342351            new_plot.id = IQ_SMEARED_LABEL 
    343352            new_plot.title = title 
    344             #new_plot.group_id.append(2) 
     353            self.parent.append_theory(data_id=self.current_plottable.id, 
     354                                       theory=new_plot) 
    345355            wx.PostEvent(self.parent, NewPlotEvent(plot=new_plot, title=title)) 
    346356         
     
    407417        # Make sure that the plot is linear 
    408418        new_plot.xtransform = "x" 
    409         new_plot.ytransform = "y"                  
     419        new_plot.ytransform = "y"   
     420        group_id = "P(r) fit" 
     421        if group_id not in new_plot.group_id: 
     422            new_plot.group_id.append(group_id)    
     423        self.parent.append_theory(data_id=self.current_plottable.id, 
     424                                       theory=new_plot)             
    410425        wx.PostEvent(self.parent, NewPlotEvent(plot=new_plot, title="P(r) fit")) 
    411426         
     
    667682            new_plot.xaxis("\\rm{r}", 'A') 
    668683            new_plot.yaxis("\\rm{P(r)} ","cm^{-3}") 
    669              
     684            self.parent.append_theory(data_id=self.current_plottable.id, 
     685                                       theory=new_plot)         
    670686            wx.PostEvent(self.parent,  
    671687                         NewPlotEvent(plot=new_plot, update=True, 
     
    697713            new_plot.xaxis("\\rm{r}", 'A') 
    698714            new_plot.yaxis("\\rm{P(r)} ","cm^{-3}") 
    699              
     715            self.parent.append_theory(data_id=self.current_plottable.id, 
     716                                       theory=new_plot)         
    700717            wx.PostEvent(self.parent,  
    701718                         NewPlotEvent(plot=new_plot, update=True, 
     
    873890                new_plot.group_id.append(pr.info["plot_group_id"]) 
    874891            new_plot.id = IQ_DATA_LABEL 
     892            self.parent.append_theory(data_id=self.current_plottable.id, 
     893                                       theory=new_plot) 
    875894            wx.PostEvent(self.parent, NewPlotEvent(plot=new_plot, title="Iq")) 
    876895                 
     
    921940        new_plot.id = IQ_DATA_LABEL 
    922941        new_plot.title = "I(q)" 
     942        self.parent.append_theory(data_id=self.current_plottable.id, 
     943                                       theory=new_plot)         
    923944        wx.PostEvent(self.parent,  
    924945                     NewPlotEvent(plot=new_plot, title="I(q)", reset=reset)) 
     
    12631284        new_plot.xaxis("\\rm{Q}", 'A^{-1}') 
    12641285        new_plot.yaxis("\\rm{Intensity} ","cm^{-1}") 
     1286        self.parent.append_theory(data_id=self.current_plottable.id, 
     1287                                       theory=new_plot) 
    12651288        wx.PostEvent(self.parent, NewPlotEvent(plot=new_plot, title="Iq")) 
    12661289        # Show I(q) fit 
     
    13271350        return [self.control_panel] 
    13281351     
    1329     def set_data(self, data_list): 
     1352    def set_data(self, data_list=None, theory_list=None): 
    13301353        """ 
    13311354        receive a list of data to compute pr 
    13321355        """ 
     1356        if data_list is None: 
     1357            data_list = [] 
    13331358        if len(data_list) > 1: 
    13341359            msg = "Pr panel does not allow multiple Data.\n" 
Note: See TracChangeset for help on using the changeset viewer.