Changeset b293683 in sasview for sansview/perspectives


Ignore:
Timestamp:
Aug 8, 2009 9:05:13 AM (15 years ago)
Author:
Mathieu Doucet <doucetm@…>
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:
b1d45c1
Parents:
7f81665
Message:

sansview: remove try-except block that lets the new evalDistribution fail silently

File:
1 edited

Legend:

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

    r6534d4d rb293683  
    5454        index_model = (self.qmin <= radius)&(radius<= self.qmax) 
    5555        
    56         try: 
    57             ## receive only list of 2 numpy array  
    58             ## One must reshape to vertical and the other to horizontal 
    59             value = self.model.evalDistribution([self.y_array,self.x_array] ) 
    60             ## for data ignore the qmax  
    61             if self.data == None: 
    62                 # Only qmin value will be consider for the detector 
    63                 output = value *index_data   
    64             else: 
    65                 # The user can define qmin and qmax for the detector 
    66                 output = value*index_model 
    67         except: 
    68             ## looping trough all x and y points 
    69             output= self.compute_point()   
    70         
     56        ## receive only list of 2 numpy array  
     57        ## One must reshape to vertical and the other to horizontal 
     58        value = self.model.evalDistribution([self.y_array,self.x_array] ) 
     59        ## for data ignore the qmax  
     60        if self.data == None: 
     61            # Only qmin value will be consider for the detector 
     62            output = value *index_data   
     63        else: 
     64            # The user can define qmin and qmax for the detector 
     65            output = value*index_model 
     66         
    7167        elapsed = time.time()-self.starttime 
    7268        self.complete( image = output, 
     
    142138        self.starttime = time.time() 
    143139         
    144         try: 
    145             index= (self.qmin <= self.x)& (self.x <= self.qmax) 
    146             output = self.model.evalDistribution(self.x[index]) 
    147         except: 
    148             output= self.compute_point() 
    149  
     140        index= (self.qmin <= self.x)& (self.x <= self.qmax) 
     141        output = self.model.evalDistribution(self.x[index]) 
     142  
    150143        ##smearer the ouput of the plot     
    151144        if self.smearer!=None: 
Note: See TracChangeset for help on using the changeset viewer.