Changeset aa4b4f05 in sasview for src/sas


Ignore:
Timestamp:
Nov 23, 2016 4:58:18 AM (8 years ago)
Author:
wojciech
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:
b61bd57
Parents:
cf2e6b4 (diff), e42c8e9d (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:

Merged with master

Location:
src/sas
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sascalc/dataloader/readers/ascii_reader.py

    r7d94915 rd2471870  
    172172                input_f.close() 
    173173                if not is_data: 
    174                     return None 
     174                    msg = "ascii_reader: x has no data" 
     175                    raise RuntimeError, msg 
    175176                # Sanity check 
    176177                if has_error_dy == True and not len(ty) == len(tdy): 
  • src/sas/sasgui/guiframe/local_perspectives/plotting/Plotter1D.py

    r245ae18 r29e872e  
    6565        # context menu 
    6666        self._slicerpop = None 
    67  
    6867        self._available_data = [] 
    6968        self._symbol_labels = self.get_symbol_label() 
     
    732731                self.subplot.set_ylim(y_range) 
    733732                self.subplot.figure.canvas.draw_idle() 
     733                self.is_zoomed = True 
    734734        d.Destroy() 
    735735 
  • src/sas/sasgui/perspectives/calculator/model_editor.py

    rcf1910f ra08b89b  
    632632        self.reader = None 
    633633        self.name = 'untitled' 
    634         self.overwrite_name = True 
     634        self.overwrite_name = False 
    635635        self.is_2d = False 
    636636        self.fname = None 
     
    684684        name_txt = wx.StaticText(self, -1, 'Function Name : ') 
    685685        overwrite_cb = wx.CheckBox(self, -1, "Overwrite existing plugin model of this name?", (10, 10)) 
    686         overwrite_cb.SetValue(True) 
     686        overwrite_cb.SetValue(False) 
    687687        overwrite_cb.SetToolTipString("Overwrite it if already exists?") 
    688688        wx.EVT_CHECKBOX(self, overwrite_cb.GetId(), self.on_over_cb) 
    689         #overwrite_cb.Show(False) 
    690689        self.name_tcl = wx.TextCtrl(self, -1, size=(PANEL_WIDTH * 3 / 5, -1)) 
    691690        self.name_tcl.Bind(wx.EVT_TEXT_ENTER, self.on_change_name) 
    692         self.name_tcl.SetValue('MyFunction') 
     691        self.name_tcl.SetValue('') 
    693692        self.name_tcl.SetFont(self.font) 
    694693        hint_name = "Unique Model Function Name." 
     
    947946        # First check for valid python name then if the name already exists 
    948947        if not name or not bool(re.match('^[A-Za-z0-9_]*$', name)): 
    949             msg = "is not a valid python name. Name must not be empty and \n" 
     948            msg = '"%s" '%name 
     949            msg += "is not a valid model name. Name must not be empty and \n" 
    950950            msg += "may include only alpha numeric or underline characters \n" 
    951951            msg += "and no spaces" 
     
    11521152 
    11531153        _TreeLocation = "user/sasgui/perspectives/fitting/fitting_help.html" 
    1154         _PageAnchor = "#New_Plugin_Model" 
     1154        _PageAnchor = "#new-plugin-model" 
    11551155        _doc_viewer = DocumentationWindow(self, -1, _TreeLocation, _PageAnchor, 
    11561156                                          "Plugin Model Editor Help") 
  • src/sas/sasgui/perspectives/invariant/media/invariant_help.rst

    rb64b87c r484141c  
    116116Academic Press, New York, 1982 
    117117 
    118 http://physchem.kfunigraz.ac.at/sm/ 
     118http://web.archive.org/web/20110824105537/http://physchem.kfunigraz.ac.at/sm/Service/Glatter_Kratky_SAXS_1982.zip 
    119119 
    120120.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 
  • src/sas/sasgui/plottools/PlotPanel.py

    r1a8e2e8e r198fa76  
    452452        """ 
    453453        self.cusor_line(event) 
    454         if self.gotLegend == 1: 
     454        if self.gotLegend == 1 and self.leftdown: 
    455455            self._on_legend_motion(event) 
    456456            return 
  • src/sas/sasgui/plottools/plottables.py

    r8abd96d r80f4684  
    212212                self.color += plottable.colors() 
    213213                self.plottables[plottable] = self.color 
     214                plottable.custom_color = self.color 
    214215 
    215216    def changed(self): 
  • src/sas/sasgui/perspectives/fitting/basepage.py

    rc8e1996 rcf2e6b4  
    5252    FONT_VARIANT = 1 
    5353    ON_MAC = True 
    54  
    5554 
    5655class BasicPage(ScrolledPanel, PanelBase): 
     
    14571456                self.state_change = True 
    14581457                self._draw_model() 
     1458                # Time delay has been introduced to prevent _handle error 
     1459                # on Windows 
     1460                # This part of code is executed when model is selected and 
     1461                # it's parameters are changed (with respect to previously 
     1462                # selected model). There are two Iq evaluations occuring one 
     1463                # after another and therefore there may be compilation error 
     1464                # if model is calculated for the first time. 
     1465                # This seems to be Windows only issue - haven't tested on Linux 
     1466                # though.The proper solution (other than time delay) requires 
     1467                # more fundemental code refatoring 
     1468                # Wojtek P. Nov 7, 2016 
     1469                if not ON_MAC: 
     1470                    time.sleep(0.1) 
    14591471                self.Refresh() 
    14601472 
     
    23912403 
    23922404        # Redraw the model 
    2393         self._draw_model() 
     2405        #  Wojtek P. Nov 7, 2016: Redrawing seems to be unnecessary here 
     2406        # self._draw_model() 
    23942407        # self._undo.Enable(True) 
    23952408        event = PageInfoEvent(page=self) 
  • src/sas/sasgui/perspectives/fitting/fitpage.py

    rc8e1996 rbf44249e  
    8181        flag = check_data_validity(self.data) & (self.model is not None) 
    8282        self.btFit.Enable(flag) 
    83          
     83 
    8484    def on_set_focus(self, event): 
    8585        """ 
    86         Override the basepage focus method to ensure the save flag is set  
     86        Override the basepage focus method to ensure the save flag is set 
    8787        properly when focusing on the fit page. 
    8888        """ 
     
    238238 
    239239        weighting_set_box = wx.StaticBox(self, wx.ID_ANY, 
    240                                 'Set Weighting by Selecting dI Source') 
     240                                         'Set Weighting by Selecting dI Source') 
    241241        weighting_box = wx.StaticBoxSizer(weighting_set_box, wx.HORIZONTAL) 
    242242        sizer_weighting = wx.BoxSizer(wx.HORIZONTAL) 
     
    11641164        if event is not None: 
    11651165            if (event.GetEventObject() == self.formfactorbox 
    1166                         and self.structurebox.GetLabel() != 'None')\ 
    1167                         or event.GetEventObject() == self.structurebox\ 
    1168                         or event.GetEventObject() == self.multifactorbox: 
     1166                    and self.structurebox.GetLabel() != 'None')\ 
     1167                    or event.GetEventObject() == self.structurebox\ 
     1168                    or event.GetEventObject() == self.multifactorbox: 
    11691169                copy_flag = self.get_copy_params() 
    11701170                is_poly_enabled = self.enable_disp.GetValue() 
     
    12051205                    self._keep.Enable(not self.batch_on) 
    12061206                    self._set_save_flag(True) 
    1207                     self._set_smear(self.data) 
     1207            #Setting smearing for cases with and without data. 
     1208            self._set_smear(self.data) 
    12081209 
    12091210            # more disables for 2D 
     
    12121213            try: 
    12131214                # update smearer sizer 
    1214                 self.onSmear(None) 
     1215                #This call for smearing set up caused double evaluation of 
     1216                #I(q) and double compilation as results 
     1217                #self.onSmear(None) 
    12151218                temp_smear = None 
    12161219                if not self.disable_smearer.GetValue(): 
     
    12261229            # set smearing value whether or not data contain the smearing info 
    12271230            evt = ModelEventbox(model=self.model, 
    1228                             smearer=temp_smear, 
    1229                             enable_smearer=not self.disable_smearer.GetValue(), 
    1230                             qmin=float(self.qmin_x), 
    1231                             uid=self.uid, 
    1232                             caption=self.window_caption, 
    1233                             qmax=float(self.qmax_x)) 
     1231                                smearer=temp_smear, 
     1232                                enable_smearer=not self.disable_smearer.GetValue(), 
     1233                                qmin=float(self.qmin_x), 
     1234                                uid=self.uid, 
     1235                                caption=self.window_caption, 
     1236                                qmax=float(self.qmax_x)) 
    12341237 
    12351238            self._manager._on_model_panel(evt=evt) 
  • src/sas/sasgui/perspectives/fitting/fitting.py

    rec72ceb re0d9ed2  
    864864                enable1D=enable1D, enable2D=enable2D, 
    865865                qmin=qmin, qmax=qmax, weight=weight) 
    866             self._mac_sleep(0.2) 
    867866 
    868867    def _mac_sleep(self, sec=0.2): 
     
    19661965                ## May need rethinking   
    19671966                ## 
    1968                 ##    -PDB August 12, 2014                   
     1967                ##    -PDB August 12, 2014 
    19691968                while self.calc_1D.isrunning(): 
    19701969                    time.sleep(0.1) 
Note: See TracChangeset for help on using the changeset viewer.