source: sasview/sansview/perspectives/fitting/gui_thread.py @ 280a14b

ESS_GUIESS_GUI_DocsESS_GUI_batch_fittingESS_GUI_bumps_abstractionESS_GUI_iss1116ESS_GUI_iss879ESS_GUI_iss959ESS_GUI_openclESS_GUI_orderingESS_GUI_sync_sascalccostrafo411magnetic_scattrelease-4.1.1release-4.1.2release-4.2.2release_4.0.1ticket-1009ticket-1094-headlessticket-1242-2d-resolutionticket-1243ticket-1249ticket885unittest-saveload
Last change on this file since 280a14b was 41340860, checked in by Gervaise Alina <gervyh@…>, 16 years ago

remove print statement

  • Property mode set to 100644
File size: 1.2 KB
Line 
1
2
3import time
4import sys
5import wx
6
7from calcthread import CalcThread
8
9
10class SmearPlot(CalcThread):
11    """
12        Compute 2D model
13        This calculation assumes a 2-fold symmetry of the model
14        where points are computed for one half of the detector
15        and I(qx, qy) = I(-qx, -qy) is assumed.
16    """
17   
18    def __init__(self, enable_smearer=False,smearer=None,manager=None,
19                 completefn = None,
20                 updatefn   = None,
21                 yieldtime  = 0.01,
22                 worktime   = 0.01
23                 ):
24        CalcThread.__init__(self,completefn,
25                 updatefn,
26                 yieldtime,
27                 worktime)
28        self.enable_smearer = enable_smearer
29        self.smearer = smearer
30        self.manager= manager
31        self.starttime = 0 
32       
33    def compute(self):
34        """
35            Compute the data given a model function
36        """
37        ## set smearing value whether or not the data contain the smearing info
38        self.manager.set_smearer(self.smearer, qmin= float(self.qmin_x),
39                                      qmax= float(self.qmax_x)) 
40        ##Calculate chi2
41        self.compute_chisqr(smearer= temp_smearer) 
42        elapsed = time.time()-self.starttime
43       
44
Note: See TracBrowser for help on using the repository browser.