Changeset cd2ced80 in sasview for DataLoader/qsmearing.py


Ignore:
Timestamp:
Jan 14, 2011 5:45:58 PM (14 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:
8fb8b0c
Parents:
67c7e89
Message:

new algorithm for slit smearing and its test

File:
1 edited

Legend:

Unmodified
Added
Removed
  • DataLoader/qsmearing.py

    r2ca00c4 rcd2ced80  
    157157        Perform smearing 
    158158        """ 
     159        import time 
     160        st = time.time() 
    159161        # If this is the first time we call for smearing, 
    160162        # initialize the C++ smearer object first 
     
    174176            temp_first, temp_last = self._get_extrapolated_bin( \ 
    175177                                                        first_bin, last_bin) 
    176             if self.nbins_low > 1: 
     178            if self.nbins_low > 0: 
    177179                iq_in_low = self.model.evalDistribution( \ 
    178180                                    numpy.fabs(self.qvalues[0:self.nbins_low])) 
     
    213215        temp_last = self.nbins - self.nbins_high 
    214216        out = iq_out[temp_first: temp_last] 
    215  
     217        print "time =", time.time() - st 
    216218        return out 
    217219     
     
    549551    # Make a new qx array 
    550552    if nbins_low > 0:   
    551         data_x_ext = numpy.append(extra_low, data_x) 
     553        data_x_ext = numpy.append(extra_low, data_x) 
    552554    else: 
    553         data_x_ext = data_x 
     555        data_x_ext = data_x 
    554556    data_x_ext = numpy.append(data_x_ext, extra_high) 
    555557     
Note: See TracChangeset for help on using the changeset viewer.