Ignore:
File:
1 edited

Legend:

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

    r55db501 rf22b43c  
    142142        self.theory_qmin_x = None 
    143143        self.theory_qmax_x = None 
    144         self.cb1 = None 
    145144        self.btEditMask = None 
    146145        self.btFit = None 
     
    281280                           num=self.npts_x, endpoint=True) 
    282281        self.data = Data1D(x=x) 
    283         #self.data.xaxis('\\rm{Q}', "A^{-1}") 
    284         self.data.xaxis('\\rm{X}', "") 
    285         #self.data.yaxis('\\rm{Intensity}', "cm^{-1}") 
    286         self.data.yaxis('\\rm{Y}', "") 
     282        self.data.xaxis('\\rm{Q}', "A^{-1}") 
     283        self.data.yaxis('\\rm{Intensity}', "cm^{-1}") 
    287284        self.data.is_data = False 
    288285        self.data.id = str(self.uid) + " data" 
     
    309306                           num=self.npts_x, endpoint=True, base=10.0) 
    310307        self.data = Data1D(x=x) 
    311         #self.data.xaxis('\\rm{Q}', "A^{-1}") 
    312         #self.data.yaxis('\\rm{Intensity}', "cm^{-1}") 
    313         self.data.xaxis('\\rm{X}', "") 
    314         self.data.yaxis('\\rm{Y}', "") 
     308        self.data.xaxis('\\rm{Q}', "A^{-1}") 
     309        self.data.yaxis('\\rm{Intensity}', "cm^{-1}") 
    315310        self.data.is_data = False 
    316311        self.data.id = str(self.uid) + " data" 
     
    11271122        # set data, etc. from the state 
    11281123        # reset page between theory and fitting from bookmarking 
    1129         #if state.data == None: 
    1130         #    data = None 
    1131         #else: 
    11321124        data = state.data 
    11331125 
     
    11551147        self.disp_cb_dict = state.disp_cb_dict 
    11561148        self.disp_list = state.disp_list 
    1157  
    1158         ## set the state of the radio box 
    1159         #self.shape_rbutton.SetValue(state.shape_rbutton) 
    1160         #self.shape_indep_rbutton.SetValue(state.shape_indep_rbutton) 
    1161         #self.struct_rbutton.SetValue(state.struct_rbutton) 
    1162         #self.plugin_rbutton.SetValue(state.plugin_rbutton) 
    11631149 
    11641150        ## fill model combobox 
     
    12211207            else: 
    12221208                self.model_view.SetLabel("1D Mode") 
    1223  
    1224         ## set the select all check box to the a given state 
    1225         self.cb1.SetValue(state.cb1) 
    12261209 
    12271210        ## reset state of checkbox,textcrtl  and  regular parameters value 
     
    13541337                            logging.error(traceback.format_exc()) 
    13551338 
    1356         # Make sure the check box updated when all checked 
    1357         if self.cb1.GetValue(): 
    1358             self.select_all_param(None) 
    1359  
    13601339    def _selectDlg(self): 
    13611340        """ 
     
    14181397        self.state.npts = self.npts_x 
    14191398 
    1420     def _onparamEnter_helper(self,is_modified = False): 
     1399    def _onparamEnter_helper(self, is_modified=False): 
    14211400        """ 
    14221401        check if values entered by the user are changed and valid to replot 
     
    14601439                self.fitrange = False 
    14611440 
    1462             if not self.data.is_data: 
    1463                 is_modified = True 
    1464  
    14651441            ## if any value is modify draw model with new value 
    14661442            if not self.fitrange: 
     
    14781454                self._draw_model() 
    14791455                self.Refresh() 
     1456 
     1457        #logging.info("is_modified flag set to %g",is_modified) 
    14801458        return is_modified 
    14811459 
     
    24992477                        item[2].Enable() 
    25002478 
    2501             # Make sure the check box updated when all checked 
    2502             if self.cb1.GetValue(): 
    2503                 #self.select_all_param(None) 
    2504                 self.get_all_checked_params() 
     2479            # Make sure the check box updated 
     2480            self.get_all_checked_params() 
    25052481 
    25062482            # update params 
     
    30773053        """ 
    30783054        content = '' 
    3079         bound_hi = '' 
    3080         bound_lo = '' 
    30813055        # go through the str params 
    30823056        for item in param: 
     
    31103084                    value = item[2].GetValue() 
    31113085 
    3112             # Bounds 
    3113             try: 
    3114                 bound_lo = item[5].GetValue() 
    3115                 bound_hi = item[6].GetValue() 
    3116             except Exception: 
    3117                 # harmless - need to just pass 
    3118                 pass 
    3119  
    31203086            # add to the content 
    31213087            if disfunc != '': 
     
    31333099            except Exception: 
    31343100                logging.error(traceback.format_exc()) 
    3135             content += name + ',' + str(check) + ',' +\ 
    3136                     value + disfunc + ',' + bound_lo + ',' +\ 
    3137                     bound_hi + ':' 
     3101            content += name + ',' + str(check) + ',' + value + disfunc + ':' 
    31383102 
    31393103        return content 
     
    31863150                # Transfer the text to content[dictionary] 
    31873151                context[name] = [check, value] 
    3188  
    3189                 # limits 
    3190                 limit_lo = item[3] 
    3191                 context[name].append(limit_lo) 
    3192                 limit_hi = item[4] 
    3193                 context[name].append(limit_hi) 
    3194  
    31953152            # ToDo: PlugIn this poly disp function for pasting 
    31963153            try: 
    3197                 poly_func = item[5] 
     3154                poly_func = item[3] 
    31983155                context[name].append(poly_func) 
    31993156                try: 
    32003157                    # take the vals and weights for  array 
    3201                     array_values = item[6].split(' ') 
    3202                     array_weights = item[7].split(' ') 
     3158                    array_values = item[4].split(' ') 
     3159                    array_weights = item[5].split(' ') 
    32033160                    val = [float(a_val) for a_val in array_values[1:]] 
    32043161                    weit = [float(a_weit) for a_weit in array_weights[1:]] 
     
    32483205                name = item[1] 
    32493206                if name in content.keys(): 
    3250                     values = content[name] 
    3251                     check = values[0] 
    3252                     pd = values[1] 
    3253  
     3207                    check = content[name][0] 
     3208                    pd = content[name][1] 
    32543209                    if name.count('.') > 0: 
    32553210                        # If this is parameter.width, then pd may be a floating 
     
    32743229                            fun_val = self.model.fun_list[content[name][1]] 
    32753230                            self.model.setParam(name, fun_val) 
    3276                     try: 
    3277                         item[5].SetValue(str(values[-3])) 
    3278                         item[6].SetValue(str(values[-2])) 
    3279                     except Exception: 
    3280                         # passing as harmless non-update 
    3281                         pass 
    32823231 
    32833232                    value = content[name][1:] 
     
    33243273                                self.model.setParam(name, fun_val) 
    33253274                                # save state 
    3326                         try: 
    3327                             item[5].SetValue(str(value[-3])) 
    3328                             item[6].SetValue(str(value[-2])) 
    3329                         except Exception: 
    3330                             # passing as harmless non-update 
    3331                             pass 
    3332  
    33333275                        self._paste_poly_help(item, value) 
    33343276                        if check == 'True': 
     
    33653307        """ 
    33663308        # Do nothing if not setting polydispersity 
    3367         if len(value[3]) == 0: 
     3309        if len(value[1]) == 0: 
    33683310            return 
    33693311 
     
    36813623        call back for model selection if implemented 
    36823624        """ 
    3683     def select_all_param(self, event): 
    3684         """ 
    3685         set to true or false all checkBox if implemented 
    3686         """ 
    36873625    def get_weight_flag(self): 
    36883626        """ 
Note: See TracChangeset for help on using the changeset viewer.