Changeset f2261c2 in sasview


Ignore:
Timestamp:
Oct 10, 2016 3:29:56 PM (8 years ago)
Author:
krzywon
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:
3e1c9e5
Parents:
f22b43c (diff), 5223602 (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' of https://github.com/SasView/sasview

Location:
src/sas/sasgui/perspectives/fitting
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sasgui/perspectives/fitting/basepage.py

    rf22b43c rf2261c2  
    13971397        self.state.npts = self.npts_x 
    13981398 
    1399     def _onparamEnter_helper(self, is_modified=False): 
     1399    def _onparamEnter_helper(self,is_modified = False): 
    14001400        """ 
    14011401        check if values entered by the user are changed and valid to replot 
     
    30533053        """ 
    30543054        content = '' 
     3055        bound_hi = '' 
     3056        bound_lo = '' 
    30553057        # go through the str params 
    30563058        for item in param: 
     
    30843086                    value = item[2].GetValue() 
    30853087 
     3088            # Bounds 
     3089            try: 
     3090                bound_lo = item[5].GetValue() 
     3091                bound_hi = item[6].GetValue() 
     3092            except Exception: 
     3093                # harmless - need to just pass 
     3094                pass 
     3095 
    30863096            # add to the content 
    30873097            if disfunc != '': 
     
    30993109            except Exception: 
    31003110                logging.error(traceback.format_exc()) 
    3101             content += name + ',' + str(check) + ',' + value + disfunc + ':' 
     3111            content += name + ',' + str(check) + ',' +\ 
     3112                    value + disfunc + ',' + bound_lo + ',' +\ 
     3113                    bound_hi + ':' 
    31023114 
    31033115        return content 
     
    31503162                # Transfer the text to content[dictionary] 
    31513163                context[name] = [check, value] 
     3164 
     3165                # limits 
     3166                limit_lo = item[3] 
     3167                context[name].append(limit_lo) 
     3168                limit_hi = item[4] 
     3169                context[name].append(limit_hi) 
     3170 
    31523171            # ToDo: PlugIn this poly disp function for pasting 
    31533172            try: 
    3154                 poly_func = item[3] 
     3173                poly_func = item[5] 
    31553174                context[name].append(poly_func) 
    31563175                try: 
    31573176                    # take the vals and weights for  array 
    3158                     array_values = item[4].split(' ') 
    3159                     array_weights = item[5].split(' ') 
     3177                    array_values = item[6].split(' ') 
     3178                    array_weights = item[7].split(' ') 
    31603179                    val = [float(a_val) for a_val in array_values[1:]] 
    31613180                    weit = [float(a_weit) for a_weit in array_weights[1:]] 
     
    32053224                name = item[1] 
    32063225                if name in content.keys(): 
    3207                     check = content[name][0] 
    3208                     pd = content[name][1] 
     3226                    values = content[name] 
     3227                    check = values[0] 
     3228                    pd = values[1] 
     3229 
    32093230                    if name.count('.') > 0: 
    32103231                        # If this is parameter.width, then pd may be a floating 
     
    32293250                            fun_val = self.model.fun_list[content[name][1]] 
    32303251                            self.model.setParam(name, fun_val) 
     3252                    try: 
     3253                        item[5].SetValue(str(values[-3])) 
     3254                        item[6].SetValue(str(values[-2])) 
     3255                    except Exception: 
     3256                        # passing as harmless non-update 
     3257                        pass 
    32313258 
    32323259                    value = content[name][1:] 
     
    32733300                                self.model.setParam(name, fun_val) 
    32743301                                # save state 
     3302                        try: 
     3303                            item[5].SetValue(str(value[-3])) 
     3304                            item[6].SetValue(str(value[-2])) 
     3305                        except Exception: 
     3306                            # passing as harmless non-update 
     3307                            pass 
     3308 
    32753309                        self._paste_poly_help(item, value) 
    32763310                        if check == 'True': 
     
    33073341        """ 
    33083342        # Do nothing if not setting polydispersity 
    3309         if len(value[1]) == 0: 
     3343        if len(value[3]) == 0: 
    33103344            return 
    33113345 
  • src/sas/sasgui/perspectives/fitting/fitpage.py

    r8662a58 r3bec50a  
    998998        flag,is_modified = self._update_paramv_on_fit() 
    999999 
    1000         wx.CallAfter(self._onparamEnter_helper(is_modified)) 
     1000        wx.CallAfter(self._onparamEnter_helper,is_modified) 
    10011001        if not flag: 
    10021002            msg = "The parameters are invalid" 
Note: See TracChangeset for help on using the changeset viewer.