Changeset 64017a8 in sasview for theoryview/perspectives/theory


Ignore:
Timestamp:
Mar 30, 2010 7:36:49 PM (15 years ago)
Author:
Jae Cho <jhjcho@…>
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:
6e93a02
Parents:
9bd6c13c
Message:

fixed the bug: Errors on theory panel when changing # of points w/ 2D plot

Location:
theoryview/perspectives/theory
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • theoryview/perspectives/theory/model_thread.py

    r00d3528 r64017a8  
    4747         
    4848        if self.data != None: 
     49            self.I_data = self.data.data 
    4950            self.qx_data = self.data.qx_data 
    5051            self.qy_data = self.data.qy_data 
     
    6768            self.qy_data = new_ybin 
    6869            self.qx_data = new_xbin 
    69             
     70            # fake data 
     71            self.I_data = numpy.ones(len(self.qx_data)) 
     72             
    7073            self.mask = numpy.ones(len(self.qx_data),dtype=bool) 
    7174             
     
    7881        index_model = ((self.qmin <= radius)&(radius<= self.qmax)) 
    7982        self.mask = (index_model)&(self.mask) 
    80          
     83        self.mask = (self.mask)&(numpy.isfinite(self.I_data)) 
    8184        if self.data ==None: 
    8285            # Only qmin value will be consider for the detector 
     
    8689 
    8790        output = numpy.zeros(len(self.mask)) 
     91                 
     92        # output default is None 
     93        # This method is to distinguish between masked point and data point = 0. 
     94        output = output/output 
     95        # set value for self.mask==True, else still None to Plottools 
    8896        output[self.mask] = value  
    8997 
  • theoryview/perspectives/theory/theory.py

    r00d3528 r64017a8  
    367367         
    368368        # max and min taking account of the bin sizes 
    369         theory.xmin= xmin - xstep/2 
    370         theory.xmax= xmax + xstep/2 
    371         theory.ymin= ymin - ystep/2 
    372         theory.ymax= ymax + ystep/2 
     369        theory.xmin= xmin  
     370        theory.xmax= xmax  
     371        theory.ymin= ymin 
     372        theory.ymax= ymax  
    373373        theory.group_id ="Model" 
    374374        theory.id ="Model" 
Note: See TracChangeset for help on using the changeset viewer.