Changeset f50330b7 in sasview


Ignore:
Timestamp:
Jul 21, 2009 12:29:15 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:
f9e803e
Parents:
3087295
Message:

Reverted the previous code, but still cut off the output from smearer outside of the Qrange.

File:
1 edited

Legend:

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

    r3087295 rf50330b7  
    261261        self.starttime = time.time() 
    262262         
    263         i_x_min=1e+16 #<--Any BIG # works. 
    264         i_x_max=0 
    265263        for i_x in range(len(self.x)): 
    266264            self.update(x= self.x, output=output ) 
     
    268266            self.isquit() 
    269267            if self.qmin <= self.x[i_x] and self.x[i_x] <= self.qmax: 
    270                 #Determine the i_min and i_max (ie., min and max index of x) 
    271                 if i_x_min == 1e+16: 
    272                     i_x_min=i_x 
    273                 i_x_max=i_x 
    274268                value = self.model.run(self.x[i_x]) 
    275269                output[i_x] = value 
    276                  
     270 
    277271        ##smearer the ouput of the plot     
    278272        if self.smearer!=None: 
    279273            output = self.smearer(output) #Todo: Why always output[0]=0??? 
    280274         
    281         ######Temp. FIX for Qrange w/ smear. Should not pass all the data to 'run' or 'smear'... 
    282         for i_x in range(len(self.x)): 
    283             if (i_x < i_x_min or i_x > i_x_max): 
    284                 output[i_x] = 0 
     275        ######Temp. FIX for Qrange w/ smear. #ToDo: Should not pass all the data to 'run' or 'smear'... 
     276        for i_x in range(len(self.x)): 
     277            if self.qmin > self.x[i_x] or self.x[i_x] > self.qmax: 
     278                output[i_x] = None 
    285279                 
    286280        elapsed = time.time()-self.starttime 
Note: See TracChangeset for help on using the changeset viewer.