Changeset 348bc8b in sasview for src/sas/sasgui/perspectives


Ignore:
Timestamp:
Aug 17, 2016 6:08:39 AM (8 years ago)
Author:
lewis
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, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
254f088
Parents:
4699761 (diff), e4c897b (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' into file-converter

Location:
src/sas/sasgui/perspectives
Files:
7 added
7 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sasgui/perspectives/calculator/data_operator.py

    re871a2d r0e760e9  
    1515from sas.sasgui.guiframe.documentation_window import DocumentationWindow 
    1616 
    17 #Control panel width  
     17#Control panel width 
    1818if sys.platform.count("win32") > 0: 
    1919    PANEL_TOP = 0 
     
    156156 
    157157        wx.EVT_TEXT_ENTER(self.data_namectr, -1, self.on_name) 
    158         wx.EVT_TEXT_ENTER(self.numberctr, -1, self.on_number) 
     158        wx.EVT_TEXT(self.numberctr, -1, self.on_number) 
    159159        wx.EVT_COMBOBOX(self.data1_cbox, -1, self.on_select_data1) 
    160160        wx.EVT_COMBOBOX(self.operator_cbox, -1, self.on_select_operator) 
     
    235235        self.name_sizer.Layout() 
    236236 
    237     def on_number(self, event=None): 
     237    def on_number(self, event=None, control=None): 
    238238        """ 
    239239        On selecting Number for Data2 
    240240        """ 
    241241        self.send_warnings('') 
    242         item = event.GetEventObject() 
     242        item = control 
     243        if item is None and event is not None: 
     244            item = event.GetEventObject() 
     245        elif item is None: 
     246            raise ValueError("Event or control must be supplied") 
    243247        text = item.GetValue().strip() 
    244248        if self.numberctr.IsShown(): 
     
    251255                except: 
    252256                    self._set_textctrl_color(self.numberctr, 'pink') 
    253                     msg = "DataOperation: Number requires a float number." 
    254                     self.send_warnings(msg, 'error') 
    255                     return 
     257                    if event is None: 
     258                        msg = "DataOperation: Number requires a float number." 
     259                        self.send_warnings(msg, 'error') 
     260                    return False 
    256261            else: 
    257262                self._set_textctrl_color(self.numberctr, self.color) 
     
    263268        self.draw_output(self.output) 
    264269        self.Refresh() 
     270        return True 
    265271 
    266272    def on_select_data1(self, event=None): 
     
    607613            wx.MessageBox(msg, 'Error') 
    608614            return 
     615        if self.numberctr.IsEnabled() and self.numberctr.IsShown(): 
     616            valid_num = self.on_number(control=self.numberctr) 
     617            if not valid_num: 
     618                return 
    609619        # send data to data manager 
    610620        self.output.name = name 
     
    731741        #add plot 
    732742        self.graph.add(plot) 
    733         #draw         
     743        #draw 
    734744        self.graph.render(self) 
    735745 
     
    985995    window = DataOperatorWindow(parent=None, data=[], title="Data Editor") 
    986996    app.MainLoop() 
    987  
  • src/sas/sasgui/perspectives/calculator/image_viewer.py

    rd0248bd r25b9707a  
    7373                    parent.put_icon(plot_frame) 
    7474            except: 
    75                 print "parent", parent 
    7675                err_msg += "Failed to load '%s'.\n" % basename 
    7776        if err_msg: 
     
    109108        """ 
    110109        # Initialize the Frame object 
    111         PlotFrame.__init__(self, parent, id, title, scale, size) 
     110        PlotFrame.__init__(self, parent, id, title, scale, size, 
     111            show_menu_icons=False) 
    112112        self.parent = parent 
    113113        self.data = image 
     
    437437    ImageView(None).load() 
    438438    app.MainLoop() 
    439  
  • src/sas/sasgui/perspectives/fitting/basepage.py

    r5213d22 re4c897b  
    29422942        """ 
    29432943 
    2944         _TreeLocation = "user/sasgui/perspectives/fitting/mag_help.html" 
     2944        _TreeLocation = "user/magnetism.html" 
    29452945        _doc_viewer = DocumentationWindow(self, wx.ID_ANY, _TreeLocation, "", 
    29462946                                          "Polarized Beam/Magnetc Help") 
  • src/sas/sasgui/perspectives/fitting/media/fitting_help.rst

    r20846be rb64b87c  
    1515 
    1616 
    17 Fitting Perspective 
    18 =================== 
     17Fitting 
     18======= 
    1919 
    2020.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 
     
    2424 
    2525To fit some data you must first load some data, activate one or more data sets, 
    26 send those data sets to the fitting perspective, and select a model to fit to 
    27 each data set. 
     26send those data sets to fitting, and select a model to fit to each data set. 
    2827 
    2928Instructions on how to load and activate data are in the section :ref:`Loading_data`. 
     
    331330This mode fits one data set. 
    332331 
    333 When data is sent to the fitting perspective it is plotted in a graph window as 
    334 markers. 
     332When data is sent to the fitting it is plotted in a graph window as markers. 
    335333 
    336334If a graph does not appear, or a graph window appears but is empty, then the data 
  • src/sas/sasgui/perspectives/fitting/media/pd_help.rst

    r7805458 rb64b87c  
    105105 
    106106The median value for the distribution will be the value given for the respective 
    107 size parameter in the *Fitting Perspective*, for example, radius = 60. 
     107size parameter in the *FitPage*, for example, radius = 60. 
    108108 
    109109The polydispersity is given by |sigma| 
     
    172172 
    173173SasView only uses these array values during the computation, therefore any mean 
    174 value of the parameter represented by *x* present in the *Fitting Perspective* 
     174value of the parameter represented by *x* present in the *FitPage* 
    175175will be ignored. 
    176176 
  • src/sas/sasgui/perspectives/invariant/media/invariant_help.rst

    r70305bd2 rb64b87c  
    44.. by S King, ISIS, during SasView CodeCamp-III in Feb 2015. 
    55 
    6 Invariant Calculation Perspective 
    7 ================================= 
     6Invariant Calculation 
     7===================== 
    88 
    99Description 
     
    4545.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 
    4646 
    47 Using the perspective 
    48 --------------------- 
     47Using invariant analysis 
     48------------------------ 
    4949 
    50501) Select *Invariant* from the *Analysis* menu on the SasView toolbar. 
     
    5353 
    54543) Select a dataset and use the *Send To* button on the *Data Explorer* to load  
    55    the dataset into the *Invariant* perspective. 
     55   the dataset into the *Invariant* panel. 
    5656 
    57 4) Use the *Customised Input* boxes on the *Invariant* perspective to subtract  
     574) Use the *Customised Input* boxes on the *Invariant* panel to subtract  
    5858   any background, specify the contrast (i.e. difference in SLDs - this must be  
    5959   specified for the eventual value of Q*\  to be on an absolute scale), or to  
     
    7373 
    74748) If the value of Q*\  calculated with the extrapolated regions is invalid, a  
    75    red warning will appear at the top of the *Invariant* perspective panel. 
     75   red warning will appear at the top of the *Invariant* panel. 
    7676 
    7777   The details of the calculation are available by clicking the *Details*  
  • src/sas/sasgui/perspectives/pr/media/pr_help.rst

    r7805458 rb64b87c  
    44.. by S King, ISIS, during SasView CodeCamp-III in Feb 2015. 
    55 
    6 P(r) Inversion Perspective 
    7 ========================== 
     6P(r) Calculation 
     7================ 
    88 
    99Description 
     
    3232.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 
    3333 
    34 Using the perspective 
    35 --------------------- 
     34Using P(r) inversion 
     35-------------------- 
    3636 
    3737The user must enter 
Note: See TracChangeset for help on using the changeset viewer.