- Timestamp:
- Oct 10, 2016 5:29:56 PM (8 years ago)
- 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. - Location:
- src/sas/sasgui/perspectives/fitting
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sasgui/perspectives/fitting/basepage.py
rf22b43c rf2261c2 1397 1397 self.state.npts = self.npts_x 1398 1398 1399 def _onparamEnter_helper(self, is_modified=False):1399 def _onparamEnter_helper(self,is_modified = False): 1400 1400 """ 1401 1401 check if values entered by the user are changed and valid to replot … … 3053 3053 """ 3054 3054 content = '' 3055 bound_hi = '' 3056 bound_lo = '' 3055 3057 # go through the str params 3056 3058 for item in param: … … 3084 3086 value = item[2].GetValue() 3085 3087 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 3086 3096 # add to the content 3087 3097 if disfunc != '': … … 3099 3109 except Exception: 3100 3110 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 + ':' 3102 3114 3103 3115 return content … … 3150 3162 # Transfer the text to content[dictionary] 3151 3163 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 3152 3171 # ToDo: PlugIn this poly disp function for pasting 3153 3172 try: 3154 poly_func = item[ 3]3173 poly_func = item[5] 3155 3174 context[name].append(poly_func) 3156 3175 try: 3157 3176 # 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(' ') 3160 3179 val = [float(a_val) for a_val in array_values[1:]] 3161 3180 weit = [float(a_weit) for a_weit in array_weights[1:]] … … 3205 3224 name = item[1] 3206 3225 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 3209 3230 if name.count('.') > 0: 3210 3231 # If this is parameter.width, then pd may be a floating … … 3229 3250 fun_val = self.model.fun_list[content[name][1]] 3230 3251 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 3231 3258 3232 3259 value = content[name][1:] … … 3273 3300 self.model.setParam(name, fun_val) 3274 3301 # 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 3275 3309 self._paste_poly_help(item, value) 3276 3310 if check == 'True': … … 3307 3341 """ 3308 3342 # Do nothing if not setting polydispersity 3309 if len(value[ 1]) == 0:3343 if len(value[3]) == 0: 3310 3344 return 3311 3345 -
src/sas/sasgui/perspectives/fitting/fitpage.py
r8662a58 r3bec50a 998 998 flag,is_modified = self._update_paramv_on_fit() 999 999 1000 wx.CallAfter(self._onparamEnter_helper (is_modified))1000 wx.CallAfter(self._onparamEnter_helper,is_modified) 1001 1001 if not flag: 1002 1002 msg = "The parameters are invalid"
Note: See TracChangeset
for help on using the changeset viewer.