Ignore:
Timestamp:
Oct 5, 2016 11:28:25 AM (8 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, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
804fefa
Parents:
c65a265
Message:

Add unsmeared model to list of theories (re #687)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sasgui/perspectives/fitting/model_thread.py

    r934ce649 rc807957  
    166166        index = (self.qmin <= self.data.x) & (self.data.x <= self.qmax) 
    167167 
     168        # If we use a smearer, also return the unsmeared model 
     169        output_unsmeared = None 
    168170        ##smearer the ouput of the plot 
    169171        if self.smearer is not None: 
     
    171173                                                             self.qmax) 
    172174            mask = self.data.x[first_bin:last_bin+1] 
    173             output[first_bin:last_bin+1] = self.model.evalDistribution(mask) 
    174             output = self.smearer(output, first_bin, last_bin) 
     175            output_unsmeared = numpy.zeros((len(self.data.x))) 
     176            output_unsmeared[first_bin:last_bin+1] = self.model.evalDistribution(mask) 
     177            output = self.smearer(output_unsmeared, first_bin, last_bin) 
     178            output_unsmeared = output_unsmeared[index] 
    175179        else: 
    176180            output[index] = self.model.evalDistribution(self.data.x[index]) 
     
    187191                      data=self.data, 
    188192                      update_chisqr=self.update_chisqr, 
    189                       source=self.source) 
     193                      source=self.source, 
     194                      unsmeared_model=output_unsmeared) 
    190195 
    191196    def results(self): 
Note: See TracChangeset for help on using the changeset viewer.