Changeset 0145a25 in sasview


Ignore:
Timestamp:
Jun 29, 2011 5:10:42 PM (13 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:
6694604
Parents:
d5c2f4d
Message:

minor changes for plot labeling

Files:
6 edited

Legend:

Unmodified
Added
Removed
  • guiframe/local_perspectives/plotting/plotting.py

    rc501ea5 r0145a25  
    216216        flag_y = (panel.graph.prop["yunit"] is not None) and \ 
    217217                    (panel.graph.prop["yunit"].strip() != "") and\ 
    218                     (x_unit != panel.graph.prop["yunit"]) 
     218                    (y_unit != panel.graph.prop["yunit"]) 
    219219        if (flag_x and flag_y): 
    220220            msg = "Cannot add %s" % str(data.name) 
  • sansmodels/src/sans/models/BaseComponent.py

    r35aface r0145a25  
    4141        ## store dispersity reference 
    4242        self._persistency_dict = {} 
    43             
     43        ## independent parameter name and unit [string] 
     44        self.input_name = "Q" 
     45        self.input_unit = "A^{-1}" 
     46        ## output name and unit  [string] 
     47        self.output_name = "Intensity" 
     48        self.output_unit = "cm^{-1}" 
     49         
    4450    def __str__(self): 
    4551        """  
  • sansmodels/src/sans/models/ReflectivityIIModel.py

    rd6da3b1 r0145a25  
    5555        # [str(name of function0),...], [str(x-asix name of sld),...]] 
    5656        self.multiplicity_info = [max_nshells,"No. of Layers:",[],['Depth']] 
    57          
     57        ## independent parameter name and unit [string] 
     58        self.input_name = "Q" 
     59        self.input_unit = "A^{-1}" 
     60        ## output name and unit  [string] 
     61        self.output_name = "Reflectivity" 
     62        self.output_unit = "" 
     63    
    5864     
    5965    def _clone(self, obj): 
  • sansmodels/src/sans/models/ReflectivityModel.py

    r4b3d25b r0145a25  
    5353        # [str(name of function0),...], [str(x-asix name of sld),...]] 
    5454        self.multiplicity_info = [max_nshells,"No. of Layers:",[],['Depth']] 
    55  
     55        ## independent parameter name and unit [string] 
     56        self.input_name = "Q" 
     57        self.input_unit = "A^{-1}" 
     58        ## output name and unit  [string] 
     59        self.output_name = "Reflectivity" 
     60        self.output_unit = "" 
    5661     
    5762    def _clone(self, obj): 
  • sansview/perspectives/fitting/fitpage.py

    r2c6b224 r0145a25  
    11141114            self.state.model.name = self.model.name 
    11151115 
    1116             self._draw_model() 
     1116             
    11171117        if event != None: 
    11181118            ## post state to fit panel 
     
    11301130                    self.formfactorbox.SetValue(current_val) 
    11311131            self._onDraw(event=None) 
     1132        else: 
     1133            self._draw_model() 
    11321134        self.SetupScrolling() 
    11331135     
  • sansview/perspectives/fitting/fitting.py

    r2c6b224 r0145a25  
    13051305            new_plot.symbol = GUIFRAME_ID.CURVE_SYMBOL_NUM 
    13061306            if data != None: 
     1307                #if model.output_name.lower().count("reflectivity") > 0: 
     1308                #    _yaxis, _yunit = "\\rm{%s}"% model.output_name, \ 
     1309                #                                "%s"% model.output_unit 
     1310                #else: 
     1311                _yaxis, _yunit = data.get_yaxis()  
    13071312                _xaxis, _xunit = data.get_xaxis()  
    1308                 _yaxis, _yunit = data.get_yaxis()  
    13091313                new_plot.title = data.name 
    13101314                #if the theory is already plotted use the same group id  
     
    13191323                
    13201324            else: 
    1321                 _xaxis, _xunit = "\\rm{Q}", 'A^{-1}' 
    1322                 _yaxis, _yunit = "\\rm{Intensity} ", "cm^{-1}" 
     1325                _xaxis, _xunit = "\\rm{%s}"% model.input_name, \ 
     1326                                                "%s"% model.input_unit 
     1327                _yaxis, _yunit = "\\rm{%s}"% model.output_name, \ 
     1328                                                "%s"% model.output_unit 
    13231329                new_plot.title = "Analytical model 1D " 
    13241330                #find a group id to plot theory without data 
     
    13541360            current_pg = self.fit_panel.get_page_by_id(page_id) 
    13551361            title = new_plot.title 
    1356              
     1362 
    13571363            wx.PostEvent(self.parent, NewPlotEvent(plot=new_plot, 
    13581364                                            title= str(title))) 
Note: See TracChangeset for help on using the changeset viewer.