Changeset eacf1d66 in sasview for sansview/perspectives
- Timestamp:
- Nov 8, 2009 11:11:41 AM (15 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, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- e2f7b92
- Parents:
- b421b1a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sansview/perspectives/fitting/fitpage.py
rb421b1a reacf1d66 368 368 ix = 3 369 369 ctl2 = wx.TextCtrl(self, -1, size=(_BOX_WIDTH,20), style=wx.TE_PROCESS_ENTER) 370 #ctl2.SetValue(str(format_number(fit_errs)))370 371 371 self.sizer4_4.Add(ctl2, (iy,ix),(1,1), wx.EXPAND|wx.ADJUST_MINSIZE, 0) 372 #if fit_errs==None or not numpy.isfinite(fit_errs):372 373 373 ctl2.Hide() 374 #else: 375 # if not text2.IsShown(): 376 # text2.Show(True) 377 # ctl2.Show(True) 378 #Prepare add min and max in model.details. 379 param_min, param_max= self.model.details[name1][1:] 374 380 375 ix = 4 381 376 ctl3 = BasicPage.ModelTextCtrl(self, -1, size=(_BOX_WIDTH/2,20), style=wx.TE_PROCESS_ENTER, 382 377 kill_focus_callback = self._on_paramRangeEnter, 383 378 set_focus_callback = self._on_paramRangeEnter) 384 if param_min ==None or not numpy.isfinite(param_min): 385 ctl3.SetValue("") 386 else: 387 ctl3.SetValue(str(param_min)) 379 388 380 self.sizer4_4.Add(ctl3, (iy,ix),(1,1), wx.EXPAND|wx.ADJUST_MINSIZE, 0) 389 381 ctl3.Hide() … … 394 386 set_focus_callback = self._on_paramRangeEnter) 395 387 self.sizer4_4.Add(ctl4, (iy,ix),(1,1), wx.EXPAND|wx.ADJUST_MINSIZE, 0) 396 if param_max==None or not numpy.isfinite(param_max): 397 ctl4.SetValue("") 398 else: 399 ctl4.SetValue(str(param_max)) 388 400 389 ctl4.Hide() 401 390 … … 482 471 ctl2.Hide() 483 472 484 param_min, param_max= self.model.details[name1][1:]485 473 ix = 4 486 474 ctl3 = BasicPage.ModelTextCtrl(self, -1, size=(_BOX_WIDTH/2,20), style=wx.TE_PROCESS_ENTER, 487 475 kill_focus_callback = self._onparamRangeEnter, 488 476 set_focus_callback = self._onparamRangeEnter) 489 if param_min ==None or not numpy.isfinite(param_min): 490 ctl3.SetValue("") 491 else: 492 ctl3.SetValue(str(param_min)) 477 493 478 self.sizer4_4.Add(ctl3, (iy,ix),(1,1), wx.EXPAND|wx.ADJUST_MINSIZE, 0) 494 479 … … 874 859 self.param_toFit[0][4].Refresh() 875 860 else: 876 #i=0861 877 862 if self.text2_3.IsShown(): 878 863 self.text2_3.Hide() 879 #print "fittable",self.print "fittable",self.fittable_param[p_name]864 880 865 #Set the panel when fit result are list 881 882 866 for item in self.param_toFit: 883 867 ## reset error value to initial state … … 910 894 item[3].Hide() 911 895 if item[4].IsShown: 912 item[4].Hide() 913 #k += 1 896 item[4].Hide() 914 897 915 898 else: … … 921 904 has_error = True 922 905 923 924 # i+=1925 906 #Show error title when any errors displayed 926 907 if has_error: … … 1137 1118 for item in self.fittable_param: 1138 1119 if item[0].GetValue(): 1139 #print item[0].GetValue()1140 1120 if not (item in self.param_toFit): 1141 1121 self.param_toFit.append(item) … … 1263 1243 ctl2.Hide() 1264 1244 1265 param_min, param_max= self.model.details[item][1:]1266 1245 ix += 1 1267 1246 ctl3 = BasicPage.ModelTextCtrl(self, -1, size=(_BOX_WIDTH/2,20), style=wx.TE_PROCESS_ENTER, 1268 1247 kill_focus_callback = self._on_paramRangeEnter, 1269 1248 set_focus_callback = self._on_paramRangeEnter) 1270 if param_min ==None or not numpy.isfinite(param_min): 1271 ctl3.SetValue("") 1272 else: 1273 ctl3.SetValue(str(param_min)) 1249 1274 1250 sizer.Add(ctl3, (iy,ix),(1,1), wx.EXPAND|wx.ADJUST_MINSIZE, 0) 1275 1251 ctl3.Hide() … … 1280 1256 set_focus_callback = self._on_paramRangeEnter) 1281 1257 sizer.Add(ctl4, (iy,ix),(1,1), wx.EXPAND|wx.ADJUST_MINSIZE, 0) 1282 if param_max==None or not numpy.isfinite(param_max): 1283 ctl4.SetValue("") 1284 else: 1285 ctl4.SetValue(str(param_max)) 1258 1286 1259 ctl4.Hide() 1287 1260 … … 1372 1345 ctl2.Show(True) 1373 1346 1374 param_min, param_max= self.model.details[item][1:]1347 #param_min, param_max= self.model.details[item][1:] 1375 1348 ix += 1 1376 1349 ctl3 = BasicPage.ModelTextCtrl(self, -1, size=(_BOX_WIDTH/2,20), style=wx.TE_PROCESS_ENTER, 1377 1350 kill_focus_callback = self._onparamRangeEnter, 1378 1351 set_focus_callback = self._onparamRangeEnter) 1379 if param_min ==None or not numpy.isfinite(param_min): 1380 ctl3.SetValue("") 1381 else: 1382 ctl3.SetValue(str(param_min)) 1352 1383 1353 sizer.Add(ctl3, (iy,ix),(1,1), wx.EXPAND|wx.ADJUST_MINSIZE, 0) 1384 1354 ctl3.Hide() … … 1394 1364 set_focus_callback = self._onparamRangeEnter) 1395 1365 sizer.Add(ctl4, (iy,ix),(1,1), wx.EXPAND|wx.ADJUST_MINSIZE, 0) 1396 if param_max ==None or not numpy.isfinite(param_max): 1397 ctl4.SetValue("") 1398 else: 1399 ctl4.SetValue(str(param_max)) 1366 1400 1367 ctl4.Hide() 1401 1368 if self.data.__class__.__name__ =="Data2D": … … 1504 1471 self.page = FitPage(self, myinfo) 1505 1472 1506 1507 1508 1473 self.Centre() 1509 1474 self.Show(True) 1510 1511 1512 1475 1513 1476 if __name__=="__main__": 1514 1477 app = wx.App()
Note: See TracChangeset
for help on using the changeset viewer.