- Timestamp:
- May 2, 2008 10:27:37 AM (17 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:
- 2e014bf
- Parents:
- ddff053
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
guitools/fitDialog.py
rddff053 r90640f2 13 13 #def __init__(self, parent, id, title): 14 14 def __init__(self, parent, plottable, push_data,transform, id, title): 15 wx.Dialog.__init__(self, parent, id, title, size=(450, 500))15 wx.Dialog.__init__(self, parent, id, title, size=(450, 400)) 16 16 """ 17 17 for the fit window … … 104 104 ix += 2 105 105 sizer.Add(self.FXmax, (iy, ix),(1,1), wx.EXPAND|wx.ADJUST_MINSIZE, 0) 106 107 #iy += 1 108 #ix = 1 109 #sizer.Add(wx.StaticText(panel, -1,"x is: "),(iy, ix),(1,1),\ 110 # wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15) 106 111 107 iy += 1 112 108 ix = 0 … … 147 143 self.tcErrB.SetLabel(str(0.0)) 148 144 self.tcChi.SetLabel(str(0.0)) 145 149 146 if self.plottable.x !=[]: 150 147 self.mini =min(self.plottable.x) 151 148 self.maxi =max(self.plottable.x) 149 152 150 self.FXmin.SetLabel(str(self.mini)) 153 151 self.FXmax.SetLabel(str(self.maxi)) 154 self.FXminX.SetLabel(str(self.mini))155 self.FXmaxX.SetLabel(str(self.maxi))156 152 self.FXmin.Disable() 157 153 self.FXmax.Disable() 154 158 155 self.PXmin.SetValue(str(self.mini)) 159 156 self.PXmax.SetValue(str(self.maxi)) 160 157 self.PXmin.Disable() 161 158 self.PXmax.Disable() 162 163 # new data for the fit 164 #self.file_data1 = Theory1D(x=[], y=[], dy=None) 165 #self.file_data1.name = "Fit" 166 #self.file_data1.ID = "isFit" 167 # Receive transformations of x and y 168 self.xtrans,self.ytrans= self.transform() 159 160 self.FXminX.SetLabel(str(self.mini)) 161 self.FXmaxX.SetLabel(str(self.maxi)) 162 163 169 164 def _onFit(self ,event): 170 165 """ … … 173 168 Push a plottable to 174 169 """ 175 176 170 tempx=[] 177 171 tempy=[] … … 180 174 #store the values of View in x,y, dx,dy 181 175 x,y,dx,dy=self.plottable.returnValuesOfView() 182 # Receive transformations of x and y183 self.xtrans,self.ytrans= self.transform()184 176 185 177 # Check if View contains a x array .we online fit when x exits … … 188 180 189 181 190 if(self.checkFitValues(self.FXmin ) == True):182 if(self.checkFitValues(self.FXminX) == True): 191 183 #Check if the field of Fit Dialog contain values and use the x max and min of the user 192 184 xmin,xmax = self._checkVal(self.FXminX.GetValue(),self.FXmaxX.GetValue()) … … 357 349 358 350 def setFitRange(self,xmin,xmax,Reelxmin,Reelxmax): 359 360 self.FXmin.SetValue(str(math.log10(xmin)))361 self.FXmax.SetValue(str(math.log10(xmax)))362 363 self.FXmin.SetValue(str(xmin))364 self.FXmax.SetValue(str(xmax))351 if (self.xtrans=="log10(x)"): 352 self.FXmin.SetValue(str(math.log10(xmin))) 353 self.FXmax.SetValue(str(math.log10(xmax))) 354 else: 355 self.FXmin.SetValue(str(xmin)) 356 self.FXmax.SetValue(str(xmax)) 365 357 self.FXminX.SetValue(str(Reelxmin)) 366 358 self.FXmaxX.SetValue(str(Reelxmax))
Note: See TracChangeset
for help on using the changeset viewer.