Changeset fff74cb in sasview


Ignore:
Timestamp:
Apr 14, 2009 2:54:38 PM (16 years ago)
Author:
Gervaise Alina <gervyh@…>
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:
780d095
Parents:
2a5bba7
Message:

compute residual for data2D

File:
1 edited

Legend:

Unmodified
Added
Removed
  • park_integration/AbstractFitEngine.py

    rb64fa56 rfff74cb  
    316316        res=[] 
    317317        if self.err_image== None or self.err_image ==[]: 
    318             self.err_image= numpy.zeros(len(self.x_bins),len(self.y_bins)) 
     318            self.err_image= numpy.zeros(len(self.y_bins),len(self.x_bins)) 
    319319        self.err_image[self.err_image==0]=1 
    320320         
    321         for i in range(len(self.y_bins)): 
    322             for j in range(len(self.x_bins)): 
    323                 radius = math.pow(self.data.x_bins[i],2)+math.pow(self.data.y_bins[j],2) 
     321        for i in range(len(self.x_bins)): 
     322            for j in range(len(self.y_bins)): 
     323                temp = math.pow(self.data.x_bins[i],2)+math.pow(self.data.y_bins[j],2) 
     324                radius= math.sqrt(temp) 
    324325                if self.qmin <= radius and radius <= self.qmax: 
    325326                    res.append( (self.image[j][i]- fn([self.x_bins[i],self.y_bins[j]]))\ 
Note: See TracChangeset for help on using the changeset viewer.