Changeset e627f19 in sasview


Ignore:
Timestamp:
Sep 25, 2009 5:47:02 PM (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:
8eeb0b6
Parents:
6e9150d
Message:

sansview: fix plotting of smeared model

File:
1 edited

Legend:

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

    ra0bc608 re627f19  
    114114        output = numpy.zeros((len(self.x))) 
    115115        index= (self.qmin <= self.x)& (self.x <= self.qmax) 
    116         output[index] = self.model.evalDistribution(self.x[index]) 
    117116      
    118117        ##smearer the ouput of the plot     
    119118        if self.smearer!=None: 
    120119            first_bin, last_bin = self.smearer.get_bin_range(self.qmin, self.qmax) 
     120            output[first_bin:last_bin] = self.model.evalDistribution(self.x[first_bin:last_bin]) 
    121121            output = self.smearer(output, first_bin, last_bin)  
     122        else: 
     123            output[index] = self.model.evalDistribution(self.x[index]) 
    122124          
    123125        elapsed = time.time()-self.starttime 
Note: See TracChangeset for help on using the changeset viewer.