Changeset cad821b in sasview for sansview/perspectives/fitting


Ignore:
Timestamp:
Aug 11, 2009 10:33:14 AM (15 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:
975ec8e
Parents:
7e752fe
Message:

fix model plot with smear

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sansview/perspectives/fitting/model_thread.py

    r785c8233 rcad821b  
    5454        index_model = (self.qmin <= radius)&(radius<= self.qmax) 
    5555        
     56        output = numpy.zeros((len(self.x),len(self.y))) 
    5657        try: 
    5758            ## receive only list of 2 numpy array  
     
    112113         
    113114        self.starttime = time.time() 
    114          
    115         try: 
    116             index= (self.qmin <= self.x)& (self.x <= self.qmax) 
    117             output = self.model.evalDistribution(self.x[index]) 
    118         except: 
    119             raise 
    120              
    121  
     115        output = numpy.zeros((len(self.x))) 
     116        index= (self.qmin <= self.x)& (self.x <= self.qmax) 
     117        output[index] = self.model.evalDistribution(self.x[index]) 
     118       
    122119        ##smearer the ouput of the plot     
    123120        if self.smearer!=None: 
Note: See TracChangeset for help on using the changeset viewer.