Changeset 4fbc93e in sasview for sansview/perspectives/fitting
- Timestamp:
- May 11, 2010 9:51:05 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:
- 46fe6a6
- Parents:
- f72333f
- Location:
- sansview/perspectives/fitting
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sansview/perspectives/fitting/basepage.py
rf72333f r4fbc93e 1063 1063 self.fitrange = True 1064 1064 is_modified = False 1065 is_2Ddata = False 1066 1067 # check if 2d data 1068 if self.data.__class__.__name__ =="Data2D": 1069 is_2Ddata = True 1070 1065 1066 wx.PostEvent(self.manager.parent, StatusEvent(status=" \ 1067 updating ... ",type="update")) 1068 1071 1069 ##So make sure that update param values on_Fit. 1072 1070 #self._undo.Enable(True) … … 1101 1099 self.manager.set_smearer_nodraw(smearer=temp_smearer, qmin= float(self.qmin_x), 1102 1100 qmax= float(self.qmax_x)) 1103 elif not is_2Ddata:1101 elif not self._is_2D(): 1104 1102 self.manager.set_smearer(smearer=temp_smearer, qmin= float(self.qmin_x), 1105 1103 qmax= float(self.qmax_x)) … … 1107 1105 self.Npts_fit.SetValue(str(len(self.data.x[index_data==True]))) 1108 1106 flag = True 1109 if is_2Ddata:1107 if self._is_2D(): 1110 1108 # only 2D case set mask 1111 1109 flag = self._validate_Npts() … … 1119 1117 if not self.fitrange: 1120 1118 #self.btFit.Disable() 1121 if is_2Ddata:self.btEditMask.Disable()1119 if self._is_2D():self.btEditMask.Disable() 1122 1120 else: 1123 1121 #self.btFit.Enable(True) 1124 if is_2Ddata:self.btEditMask.Enable(True)1122 if self._is_2D():self.btEditMask.Enable(True) 1125 1123 1126 1124 -
sansview/perspectives/fitting/fitpage.py
rf72333f r4fbc93e 24 24 _DATA_BOX_WIDTH = 300 25 25 SMEAR_SIZE_L = 0.005 26 SMEAR_SIZE_H = 0.0 126 SMEAR_SIZE_H = 0.006 27 27 28 28 import basepage … … 883 883 #get event object 884 884 tcrtl= event.GetEventObject() 885 885 wx.PostEvent(self.manager.parent, StatusEvent(status=" \ 886 updating ... ",type="update")) 886 887 #Clear msg if previously shown. 887 888 msg= "" … … 1214 1215 """ 1215 1216 #event.Skip() 1216 accuracy = event.GetEventObject() 1217 1218 self.smear2d_accuracy = accuracy.GetValue() 1217 1218 # Check if the accuracy is same as before 1219 # Mac does not get the GetEventObject; use the line below 1220 #self.smear2d_accuracy = event.GetEventObject().GetValue() 1221 self.smear2d_accuracy = self.smear_accuracy.GetValue() 1219 1222 if self.pinhole_smearer.GetValue(): 1220 1223 self.onPinholeSmear(event=None) 1221 1222 else:self.onSmear(event=None)1223 if self.current_smearer !=None:1224 else: 1225 self.onSmear(event=None) 1226 if self.current_smearer != None: 1224 1227 self.current_smearer.set_accuracy(accuracy = self.smear2d_accuracy) 1228 1225 1229 event.Skip() 1230 1226 1231 def _onMask(self, event): 1227 1232 """ … … 1528 1533 Create a custom pinhole smear object that will change the way residuals 1529 1534 are compute when fitting 1535 @ accuracy: given by strings'High','Med', 'Low' FOR 2d, None for 1D 1530 1536 """ 1531 1537 … … 1658 1664 else: data.dx[data.dx==0] = self.dx_max 1659 1665 self.current_smearer = smear_selection(data) 1666 # 2D need to set accuracy 1667 if self._is_2D(): 1668 self.current_smearer.set_accuracy(accuracy = self.smear2d_accuracy) 1660 1669 1661 1670 if msg != None: … … 1666 1675 ## set smearing value whether or not the data contain the smearing info 1667 1676 self.manager.set_smearer(smearer=self.current_smearer, qmin= float(self.qmin_x),qmax= float(self.qmax_x)) 1668 1669 1677 return msg 1670 1678
Note: See TracChangeset
for help on using the changeset viewer.