Ignore:
Timestamp:
Mar 14, 2013 10:20:13 AM (12 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:
98b12205
Parents:
b4fdf0d
Message:

better time estimation for Debye computation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • calculatorview/src/sans/perspectives/calculator/gen_scatter_panel.py

    r4b30118 r2d8018f  
    130130        self.reader = None 
    131131        self.ext = None 
    132         self.id = 'Generic Scattering' 
     132        self.id = 'GenSANS' 
    133133        self.file_name = '' 
    134134        self.time_text = None 
     
    369369            Do the layout for the button widgets 
    370370        """  
    371         self.est_time = '*Estimated Computation time : %s' 
     371        self.est_time = '*Estimated Computation time :\n %s' 
    372372        self.time_text = wx.StaticText(self, -1, self.est_time% str('2 sec') ) 
    373373        self.orient_combo = self._fill_orient_combo() 
     
    384384        Calculation time estimation 
    385385        """ 
     386        # magic equation: not very accurate 
     387        factor = 1 
    386388        n_qbins = float(self.npt_ctl.GetValue()) 
    387389        n_qbins *= n_qbins 
    388390        n_pixs = float(self.parent.get_npix()) 
    389391        if self.is_avg: 
     392            factor = 6 
    390393            n_pixs *= (n_pixs / 200) 
    391394        x_in = n_qbins * n_pixs / 100000 
    392         # magic equation: not very accurate 
    393         etime = 1.0 + 0.085973 * x_in 
     395        etime = factor + 0.085973 * x_in  
    394396        return int(etime) 
    395397         
     
    939941        """ 
    940942        out = numpy.empty(0) 
    941         s = time.time() 
     943        #s = time.time() 
    942944        for ind in range(len(input[0])): 
    943945            if self.is_avg: 
     
    956958                outi = self.model.runXY(inputi) 
    957959                out = numpy.append(out, outi) 
    958         print time.time() - s 
     960        #print time.time() - s 
    959961        if self.is_avg or self.is_avg == None: 
    960962            self._draw1D(out) 
Note: See TracChangeset for help on using the changeset viewer.