Changeset 57668f8 in sasview
- Timestamp:
- Nov 5, 2008 4:59:05 PM (16 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:
- 743d75c
- Parents:
- 415bc97
- Location:
- sansview/perspectives/fitting
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sansview/perspectives/fitting/fitpage2D.py
r04edd0d r57668f8 226 226 for j in range(len(self.data.x_bins)): 227 227 if self.data.x_bins[j]>= xmin and self.data.x_bins[j]<= xmax: 228 res.append( (self.data. image[j][i]- self.model.runXY(\228 res.append( (self.data.data[j][i]- self.model.runXY(\ 229 229 [self.data.x_bins[j],self.data.y_bins[i]]))\ 230 /self.data.err_ image[j][i] )230 /self.data.err_data[j][i] ) 231 231 sum=0 232 232 -
sansview/perspectives/fitting/fitting.py
rd7d143b0 r57668f8 1 1 import os,os.path, re 2 2 import sys, wx, logging 3 import string, numpy, pylab,math3 import string, numpy, math 4 4 5 5 from copy import deepcopy 6 from danse.common.plottools.plottables import Data1D, Theory1D, Data2D6 from danse.common.plottools.plottables import Data1D, Theory1D,Data2D,Theory2D 7 7 from danse.common.plottools.PlotPanel import PlotPanel 8 8 from sans.guicomm.events import NewPlotEvent, StatusEvent … … 14 14 import fitpage1D,fitpage2D 15 15 import park 16 class Theory2D(Data2D): 17 def __init__(self,image=None,err_image=None,xmin=None, 18 xmax=None,ymin=None,ymax=None,zmin=None,zmax=None): 19 Data2D.__init__(self,image,err_image,xmin, 20 xmax,ymin,ymax,zmin,zmax) 16 21 17 class Plugin: 22 18 """ … … 96 92 return [["Select data for Fitting",\ 97 93 "Dialog with fitting parameters ", self._onSelect]] 94 #elif item.__class__.__name__ is "Theory2D": 95 # return [["Line Slicer [Q-view]","Sector Averaging as a function of Q", 96 # self.onLineSlicer], 97 # ["Annulus Slicer [Phi-view]","Sector Averaging as a function of Phi", 98 # self.onLineSlicer]] 98 99 else: 99 100 if item.name==graph.selected_plottable and\ … … 528 529 529 530 else: 530 theory= Data2D(data.image, data.err_image)531 theory=Theory2D(data.data, data.err_data) 531 532 #theory=Theory2D(data.image, data.err_image) 532 533 theory.x_bins= data.x_bins … … 542 543 ymax=data.ymax 543 544 544 theory. image= numpy.zeros((len(data.y_bins),len(data.x_bins)))545 theory.data = numpy.zeros((len(data.y_bins),len(data.x_bins))) 545 546 for i in range(len(data.y_bins)): 546 547 if data.y_bins[i]>= ymin and data.y_bins[i]<= ymax: 547 548 for j in range(len(data.x_bins)): 548 549 if data.x_bins[i]>= qmin and data.x_bins[i]<= qmax: 549 theory. image[j][i]=model.runXY([data.x_bins[j],data.y_bins[i]])550 theory.data[j][i]=model.runXY([data.x_bins[j],data.y_bins[i]]) 550 551 551 552 #print "fitting : plot_helper:", theory.image
Note: See TracChangeset
for help on using the changeset viewer.