Changeset 5223602 in sasview for src/sas/sasgui
- Timestamp:
- Oct 10, 2016 5:19:50 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:
- b61bd57
- Parents:
- 3bec50a
- git-author:
- Piotr Rozyczko <rozyczko@…> (10/10/16 17:18:48)
- git-committer:
- Piotr Rozyczko <rozyczko@…> (10/10/16 17:19:50)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sasgui/perspectives/fitting/basepage.py
r3bec50a r5223602 3038 3038 """ 3039 3039 content = '' 3040 bound_hi = '' 3041 bound_lo = '' 3040 3042 # go through the str params 3041 3043 for item in param: … … 3069 3071 value = item[2].GetValue() 3070 3072 3073 # Bounds 3074 try: 3075 bound_lo = item[5].GetValue() 3076 bound_hi = item[6].GetValue() 3077 except Exception: 3078 # harmless - need to just pass 3079 pass 3080 3071 3081 # add to the content 3072 3082 if disfunc != '': … … 3084 3094 except Exception: 3085 3095 logging.error(traceback.format_exc()) 3086 content += name + ',' + str(check) + ',' + value + disfunc + ':' 3096 content += name + ',' + str(check) + ',' +\ 3097 value + disfunc + ',' + bound_lo + ',' +\ 3098 bound_hi + ':' 3087 3099 3088 3100 return content … … 3135 3147 # Transfer the text to content[dictionary] 3136 3148 context[name] = [check, value] 3149 3150 # limits 3151 limit_lo = item[3] 3152 context[name].append(limit_lo) 3153 limit_hi = item[4] 3154 context[name].append(limit_hi) 3155 3137 3156 # ToDo: PlugIn this poly disp function for pasting 3138 3157 try: 3139 poly_func = item[ 3]3158 poly_func = item[5] 3140 3159 context[name].append(poly_func) 3141 3160 try: 3142 3161 # take the vals and weights for array 3143 array_values = item[ 4].split(' ')3144 array_weights = item[ 5].split(' ')3162 array_values = item[6].split(' ') 3163 array_weights = item[7].split(' ') 3145 3164 val = [float(a_val) for a_val in array_values[1:]] 3146 3165 weit = [float(a_weit) for a_weit in array_weights[1:]] … … 3190 3209 name = item[1] 3191 3210 if name in content.keys(): 3192 check = content[name][0] 3193 pd = content[name][1] 3211 values = content[name] 3212 check = values[0] 3213 pd = values[1] 3214 3194 3215 if name.count('.') > 0: 3195 3216 # If this is parameter.width, then pd may be a floating … … 3214 3235 fun_val = self.model.fun_list[content[name][1]] 3215 3236 self.model.setParam(name, fun_val) 3237 try: 3238 item[5].SetValue(str(values[-3])) 3239 item[6].SetValue(str(values[-2])) 3240 except Exception: 3241 # passing as harmless non-update 3242 pass 3216 3243 3217 3244 value = content[name][1:] … … 3258 3285 self.model.setParam(name, fun_val) 3259 3286 # save state 3287 try: 3288 item[5].SetValue(str(value[-3])) 3289 item[6].SetValue(str(value[-2])) 3290 except Exception: 3291 # passing as harmless non-update 3292 pass 3293 3260 3294 self._paste_poly_help(item, value) 3261 3295 if check == 'True': … … 3292 3326 """ 3293 3327 # Do nothing if not setting polydispersity 3294 if len(value[ 1]) == 0:3328 if len(value[3]) == 0: 3295 3329 return 3296 3330
Note: See TracChangeset
for help on using the changeset viewer.