Changeset dc5ef15 in sasview for src/sas/qtgui/Perspectives/Fitting
- Timestamp:
- May 18, 2017 5:36:57 AM (8 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:
- 6066a3f
- Parents:
- 2a432e7
- Location:
- src/sas/qtgui/Perspectives/Fitting
- Files:
-
- 2 added
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/Perspectives/Fitting/FittingLogic.py
r2add354 rdc5ef15 1 1 import numpy as np 2 2 3 from sas.sasgui.guiframe.dataFitting import Data1D 4 from sas.sasgui.guiframe.dataFitting import Data2D 3 from sas.qtgui.Plotting.PlotterData import Data1D 4 from sas.qtgui.Plotting.PlotterData import Data2D 5 5 6 from sas.sascalc.dataloader.data_info import Detector 6 7 from sas.sascalc.dataloader.data_info import Source -
src/sas/qtgui/Perspectives/Fitting/FittingPerspective.py
r1bc27f1 rdc5ef15 7 7 8 8 from sas.qtgui.Perspectives.Fitting.FittingWidget import FittingWidget 9 #from FitPage import FitPage10 9 11 10 class FittingWindow(QtGui.QTabWidget): -
src/sas/qtgui/Perspectives/Fitting/FittingUtilities.py
r1bc27f1 rdc5ef15 6 6 import numpy 7 7 8 from sas. sasgui.guiframe.dataFittingimport Data1D9 from sas. sasgui.guiframe.dataFittingimport Data2D8 from sas.qtgui.Plotting.PlotterData import Data1D 9 from sas.qtgui.Plotting.PlotterData import Data2D 10 10 11 11 def replaceShellName(param_name, value): … … 363 363 return [i >> d & 1 for d in xrange(digits)] 364 364 365 def getWeight(data, is2d, flag=None): 366 """ 367 Received flag and compute error on data. 368 :param flag: flag to transform error of data. 369 """ 370 weight = None 371 if is2d: 372 dy_data = data.err_data 373 data = data.data 374 else: 375 dy_data = data.dy 376 data = data.y 377 378 if flag == 0: 379 weight = numpy.ones_like(data) 380 elif flag == 1: 381 weight = dy_data 382 elif flag == 2: 383 weight = numpy.sqrt(numpy.abs(data)) 384 elif flag == 3: 385 weight = numpy.abs(data) 386 return weight -
src/sas/qtgui/Perspectives/Fitting/FittingWidget.py
r2a432e7 rdc5ef15 17 17 from sasmodels.sasview_model import load_standard_models 18 18 from sas.sascalc.fit.BumpsFitting import BumpsFit as Fit 19 from sas.sasgui.perspectives.fitting.fit_thread import FitThread 20 21 from sas.sasgui.guiframe.CategoryInstaller import CategoryInstaller 22 from sas.sasgui.guiframe.dataFitting import Data1D 23 from sas.sasgui.guiframe.dataFitting import Data2D 19 24 20 import sas.qtgui.Utilities.GuiUtils as GuiUtils 25 from sas. sasgui.perspectives.fitting.model_thread import Calc1D26 from sas. sasgui.perspectives.fitting.model_thread import Calc2D27 from sas. sasgui.perspectives.fitting.utils import get_weight21 from sas.qtgui.Utilities.CategoryInstaller import CategoryInstaller 22 from sas.qtgui.Plotting.PlotterData import Data1D 23 from sas.qtgui.Plotting.PlotterData import Data2D 28 24 29 25 from sas.qtgui.Perspectives.Fitting.UI.FittingWidgetUI import Ui_FittingWidgetUI 26 from sas.qtgui.Perspectives.Fitting.FitThread import FitThread 27 from sas.qtgui.Perspectives.Fitting.ModelThread import Calc1D 28 from sas.qtgui.Perspectives.Fitting.ModelThread import Calc2D 30 29 from sas.qtgui.Perspectives.Fitting.FittingLogic import FittingLogic 31 30 from sas.qtgui.Perspectives.Fitting import FittingUtilities … … 815 814 """ 816 815 # Send original data for weighting 817 weight = get_weight(data=data, is2d=self.is2D, flag=self.weighting)816 weight = FittingUtilities.getWeight(data=data, is2d=self.is2D, flag=self.weighting) 818 817 update_module = data.err_data if self.is2D else data.dy 819 818 update_module = weight -
src/sas/qtgui/Perspectives/Fitting/OptionsWidget.py
r1bc27f1 rdc5ef15 6 6 from PyQt4 import QtCore 7 7 8 from sas. sasgui.guiframe.dataFittingimport Data2D8 from sas.qtgui.Plotting.PlotterData import Data2D 9 9 10 10 # Local UI -
src/sas/qtgui/Perspectives/Fitting/SmearingWidget.py
r1bc27f1 rdc5ef15 5 5 from PyQt4 import QtCore 6 6 7 from sas. sasgui.guiframe.dataFittingimport Data1D8 from sas. sasgui.guiframe.dataFittingimport Data2D7 from sas.qtgui.Plotting.PlotterData import Data1D 8 from sas.qtgui.Plotting.PlotterData import Data2D 9 9 10 10 # Local UI -
src/sas/qtgui/Perspectives/Fitting/UnitTesting/FittingLogicTest.py
r83eb5208 rdc5ef15 11 11 from sas.qtgui.Utilities.GuiUtils import * 12 12 from sas.qtgui.Perspectives.Fitting.FittingWidget import * 13 from sas. sasgui.guiframe.dataFittingimport Data1D13 from sas.qtgui.Plotting.PlotterData import Data1D 14 14 15 15 app = QtGui.QApplication(sys.argv) -
src/sas/qtgui/Perspectives/Fitting/UnitTesting/FittingPerspectiveTest.py
r1bc27f1 rdc5ef15 13 13 # Local 14 14 import sas.qtgui.Utilities.GuiUtils as GuiUtils 15 from sas.sasgui.guiframe.dataFitting import Data1D 16 15 from sas.qtgui.Plotting.PlotterData import Data1D 17 16 from sas.qtgui.Perspectives.Fitting.FittingPerspective import FittingWindow 18 17 -
src/sas/qtgui/Perspectives/Fitting/UnitTesting/FittingUtilitiesTest.py
r9208346 rdc5ef15 3 3 from PyQt4 import QtGui 4 4 5 from sas. sasgui.guiframe.dataFittingimport Data1D6 from sas. sasgui.guiframe.dataFittingimport Data2D5 from sas.qtgui.Plotting.PlotterData import Data1D 6 from sas.qtgui.Plotting.PlotterData import Data2D 7 7 8 8 from UnitTesting.TestUtils import WarningTestNotImplemented -
src/sas/qtgui/Perspectives/Fitting/UnitTesting/FittingWidgetTest.py
r2241130 rdc5ef15 17 17 from sas.qtgui.UnitTesting.TestUtils import QtSignalSpy 18 18 19 from sas. sasgui.guiframe.dataFittingimport Data1D20 from sas. sasgui.guiframe.dataFittingimport Data2D19 from sas.qtgui.Plotting.PlotterData import Data1D 20 from sas.qtgui.Plotting.PlotterData import Data2D 21 21 22 22 app = QtGui.QApplication(sys.argv)
Note: See TracChangeset
for help on using the changeset viewer.