Changeset d6b8a1d in sasview for src/sas/qtgui/Plotting/LinearFit.py
- Timestamp:
- Nov 9, 2017 8:43:56 AM (7 years ago)
- Branches:
- 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
- Children:
- 53c771e
- Parents:
- fbfc488
- git-author:
- Piotr Rozyczko <rozyczko@…> (11/07/17 08:29:59)
- git-committer:
- Piotr Rozyczko <rozyczko@…> (11/09/17 08:43:56)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/Plotting/LinearFit.py
r7969b9c rd6b8a1d 8 8 from PyQt5 import QtWidgets 9 9 10 from sas.qtgui.Utilities.GuiUtils import formatNumber 10 from sas.qtgui.Utilities.GuiUtils import formatNumber, DoubleValidator 11 11 12 12 from sas.qtgui.Plotting import Fittings … … 43 43 self.y_is_log = self.yLabel == "log10(y)" 44 44 45 self.txtFitRangeMin.setValidator( QtGui.QDoubleValidator())46 self.txtFitRangeMax.setValidator( QtGui.QDoubleValidator())45 self.txtFitRangeMin.setValidator(DoubleValidator()) 46 self.txtFitRangeMax.setValidator(DoubleValidator()) 47 47 48 48 # Default values in the line edits … … 158 158 y_model = self.model.run(xmin) 159 159 tempx.append(xminView) 160 tempy.append(numpy.power(10 , y_model) if self.y_is_log else y_model)160 tempy.append(numpy.power(10.0, y_model) if self.y_is_log else y_model) 161 161 162 162 # load tempy with the maximum transformation 163 163 y_model = self.model.run(xmax) 164 164 tempx.append(xmaxView) 165 tempy.append(numpy.power(10 , y_model) if self.y_is_log else y_model)165 tempy.append(numpy.power(10.0, y_model) if self.y_is_log else y_model) 166 166 167 167 # Set the fit parameter display when FitDialog is opened again … … 247 247 return numpy.sqrt(numpy.sqrt(x)) 248 248 elif self.xLabel == "log10(x)": 249 return numpy.power(10 , x)249 return numpy.power(10.0, x) 250 250 elif self.xLabel == "ln(x)": 251 251 return numpy.exp(x) 252 252 elif self.xLabel == "log10(x^(4))": 253 return numpy.sqrt(numpy.sqrt(numpy.power(10 , x)))253 return numpy.sqrt(numpy.sqrt(numpy.power(10.0, x))) 254 254 return x 255 255
Note: See TracChangeset
for help on using the changeset viewer.