source: sasview/sansview/perspectives/fitting/fitpage1D.py @ 0b99881

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 0b99881 was 0b99881, checked in by Gervaise Alina <gervyh@…>, 16 years ago

working opn refactoring files

  • Property mode set to 100644
File size: 23.0 KB
Line 
1import sys
2import wx
3import wx.lib
4import numpy,math
5import copy
6
7from sans.guicomm.events import StatusEvent
8from sans.guiframe.utils import format_number
9from modelpage import ModelPage 
10from modelpage import format_number
11(ModelEventbox, EVT_MODEL_BOX) = wx.lib.newevent.NewEvent()
12_BOX_WIDTH = 80
13
14
15#TODO: FitPage1D inherits from ModelPage but doesn't call its __init__ method!
16#TODO: refactor this class to have an __init__ that deals with data only, then calls a UI builder method.
17
18class FitPage1D(ModelPage):
19    """
20        FitPage1D class contains fields allowing to display results when
21        fitting  a model and one data.
22        This class used most of the methods of ModelPage class.
23        @note: For Fit to be performed the user should check at least one parameter
24        on fit Panel window.
25    """
26    ## Internal name for the AUI manager
27    window_name = "Fit page"
28    ## Title to appear on top of the window
29    window_caption = "Fit Page"
30   
31    name=None
32   
33    def __init__(self, parent,data,model=None, name=None, *args, **kwargs):
34        """
35            Initialization of the Panel
36        """
37        ModelPage.__init__(self, parent,model,name,data,*args, **kwargs)
38       
39        #TODO: remove this once the inheritence is cleaned up
40        ## Data member to store the dispersion object created
41       
42   
43       
44    def draw_panel(self):
45        #panel interface
46        self.vbox  = wx.BoxSizer(wx.VERTICAL)
47   
48        self.sizer9 = wx.GridBagSizer(5,5)
49        self.sizer8 = wx.GridBagSizer(5,5)
50        self.sizer7 = wx.GridBagSizer(5,5)
51        self.sizer6 = wx.GridBagSizer(5,5)
52        self.sizer5 = wx.GridBagSizer(5,5)
53        self.sizer4 = wx.GridBagSizer(5,5)
54        self.sizer3 = wx.GridBagSizer(5,5)
55        self.sizer2 = wx.GridBagSizer(5,5)
56        self.sizer1 = wx.GridBagSizer(5,5)
57        # Add layer
58        #data info layer
59        self.vbox.Add(self.sizer1)
60        #data range
61        self.vbox.Add(self.sizer2)
62        #instrument smearing selection layer
63        self.vbox.Add(self.sizer3)
64        #model selection
65        self.vbox.Add(wx.StaticLine(self, -1), 0, wx.EXPAND, 0)
66        self.vbox.Add(self.sizer4)
67        #model paramaters layer
68        self.vbox.Add(self.sizer5)
69        #polydispersion selected
70        self.vbox.Add(wx.StaticLine(self, -1), 0, wx.EXPAND, 0)
71        self.vbox.Add(self.sizer6)
72        #combox box for type of dispersion
73        self.vbox.Add(self.sizer7)
74        #dispersion parameters layer
75        self.vbox.Add(self.sizer8)
76        #fit info layer
77        self.vbox.Add(wx.StaticLine(self, -1), 0, wx.EXPAND, 0)
78        self.vbox.Add(self.sizer9)
79        #---------sizer 1 draw--------------------------------
80        #Filling the sizer containing data related fields
81        self.DataSource  =wx.StaticText(self, -1,str(self.data.name))
82        ix = 0
83        iy = 1
84        self.sizer1.Add(wx.StaticText(self, -1, 'Data Source Name : '),(iy,ix),\
85                 (1,1), wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15)
86        ix += 1
87        self.sizer1.Add(self.DataSource,(iy,ix),(1,1), wx.EXPAND|wx.ADJUST_MINSIZE, 0)
88       
89        #---------sizer 2 draw--------------------------------
90        #set maximum range for x in linear scale
91        if not hasattr(self.data,"data"): #Display only for 1D data fit
92            ix = 0
93            iy = 1
94            # Minimum value of data   
95            self.data_min = wx.StaticText(self, -1,str(format_number(numpy.min(self.data.x))))
96            # Maximum value of data 
97            self.data_max =  wx.StaticText(self, -1,str(format_number(numpy.max(self.data.x))))   
98            self.text4_3 = wx.StaticText(self, -1, 'Maximum Data Range(Linear)', style=wx.ALIGN_LEFT)
99            self.sizer2.Add(self.text4_3,(iy,ix),(1,1),\
100                   wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15)
101            ix += 2
102            self.sizer2.Add(wx.StaticText(self, -1, 'Min :'),(iy, ix),(1,1),\
103                            wx.EXPAND|wx.ADJUST_MINSIZE, 0)
104            ix += 1
105            self.sizer2.Add(self.data_min,(iy, ix),(1,1),\
106                            wx.EXPAND|wx.ADJUST_MINSIZE, 0)
107            ix += 1
108            self.sizer2.Add(wx.StaticText(self, -1, 'Max : '),(iy, ix),(1,1),\
109                            wx.EXPAND|wx.ADJUST_MINSIZE, 0)
110            ix += 1
111            self.sizer2.Add(self.data_max,(iy,ix),(1,1), wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 0)
112       
113        #----sizer 3 draw--------------------------------
114        #Filling the sizer containing instruments smearing info.
115        self.disable_smearer = wx.RadioButton(self, -1, 'No', (10, 10), style=wx.RB_GROUP)
116        self.enable_smearer = wx.RadioButton(self, -1, 'Yes', (10, 30))
117        self.Bind(wx.EVT_RADIOBUTTON, self.onSmear, id=self.disable_smearer.GetId())
118        self.Bind(wx.EVT_RADIOBUTTON, self.onSmear, id=self.enable_smearer.GetId())
119        ix = 0
120        iy = 1
121        self.sizer3.Add(wx.StaticText(self,-1,'Instrument Smearing'),(iy,ix),(1,1)\
122                  , wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15)
123        ix += 1
124        self.sizer3.Add(self.enable_smearer,(iy,ix),(1,1),  wx.EXPAND|wx.ADJUST_MINSIZE, 0)
125        ix += 1
126        self.sizer3.Add(self.disable_smearer,(iy,ix),(1,1),  wx.EXPAND|wx.ADJUST_MINSIZE, 0)
127        ix =0
128        iy+=1
129        self.sizer3.Add((20,20),(iy,ix),(1,1),wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15) 
130           
131        #------------------ sizer 4  draw------------------------   
132        # This sizer contains model list and chisqr value
133        #filling sizer4
134        self.modelbox = wx.ComboBox(self, -1)
135        self.tcChi    =  wx.StaticText(self, -1, str(0), style=wx.ALIGN_LEFT)
136        self.tcChi.Hide()
137        self.text1_1 = wx.StaticText(self, -1, 'Chi2/dof', style=wx.ALIGN_LEFT)
138        self.text1_1.Hide()
139        ix = 0
140        iy = 1
141        self.sizer4.Add(wx.StaticText(self,-1,'Model'),(iy,ix),(1,1)\
142                  , wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15)
143        ix += 1
144        self.sizer4.Add(self.modelbox,(iy,ix),(1,1),  wx.EXPAND|wx.ADJUST_MINSIZE, 0)
145        ix += 1
146        self.sizer4.Add(self.text1_1,(iy,ix),(1,1),\
147                   wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15)
148        ix += 1
149        self.sizer4.Add(self.tcChi,(iy,ix),(1,1), wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 0)
150        #----------sizer6-------------------------------------------------
151        #Sizer containing info on polydispersity
152        self.disable_disp = wx.RadioButton(self, -1, 'No', (10, 10), style=wx.RB_GROUP)
153        self.enable_disp = wx.RadioButton(self, -1, 'Yes', (10, 30))
154        self.Bind(wx.EVT_RADIOBUTTON, self.set_Dispers_Param, id=self.disable_disp.GetId())
155        self.Bind(wx.EVT_RADIOBUTTON, self.set_Dispers_Param, id=self.enable_disp.GetId())
156        ix= 0
157        iy=1
158        self.sizer6.Add(wx.StaticText(self,-1,'Polydispersity: '),(iy,ix),(1,1)\
159                  , wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15)
160        ix += 1
161        self.sizer6.Add(self.enable_disp ,(iy,ix),(1,1),  wx.EXPAND|wx.ADJUST_MINSIZE, 0)
162        ix += 1
163        self.sizer6.Add(self.disable_disp ,(iy,ix),(1,1),  wx.EXPAND|wx.ADJUST_MINSIZE, 0)
164        ix =0
165        iy+=1
166        self.sizer6.Add((20,20),(iy,ix),(1,1),wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15) 
167        #---------sizer 9 draw----------------------------------------
168       
169       
170        id = wx.NewId()
171        self.btFit =wx.Button(self,id,'Fit')
172        self.btFit.Bind(wx.EVT_BUTTON, self.onFit,id=id)
173        self.btFit.SetToolTipString("Perform fit.")
174        ## Q range
175        # Reversed to the codes; Need to think  carefully about consistency in q between 2D plot and fitting
176        if not hasattr(self.data,"data"):
177            self.qmin_x= numpy.min(self.data.x)
178            self.qmax_x= numpy.max(self.data.x)
179            self.num_points= len(self.data.x)
180        else:
181            # Reversed to the codes; Need to think  carefully about consistency in q between 2D plot and fitting
182            radius1= math.sqrt(math.pow(self.data.xmin, 2)+ math.pow(self.data.ymin, 2))
183            radius2= math.sqrt(math.pow(self.data.xmax, 2)+ math.pow(self.data.ymin, 2))
184            radius3= math.sqrt(math.pow(self.data.xmin, 2)+ math.pow(self.data.ymax, 2))
185            radius4= math.sqrt(math.pow(self.data.xmax, 2)+ math.pow(self.data.ymax, 2))
186           
187            self.qmin_x= 0
188            self.qmax_x= math.sqrt(math.pow(max(math.fabs(self.data.xmax),math.fabs(self.data.xmin)),2)
189                            +math.pow(max(math.fabs(self.data.ymax),math.fabs(self.data.ymin)),2))#self.data.xmax           
190       
191        self.num_points= 100
192        # The minimum fitting range
193        self.qmin    = wx.TextCtrl(self, -1,size=(_BOX_WIDTH,20))
194        self.qmin.SetValue(str(format_number(self.qmin_x)))
195        self.qmin.SetToolTipString("Minimun value of x in linear scale.")
196        self.qmin.Bind(wx.EVT_KILL_FOCUS, self._onparamEnter)
197        self.qmin.Bind(wx.EVT_TEXT_ENTER, self._onparamEnter)
198        self.qmin.Enable()
199        #The maximum fitting range
200        self.qmax    = wx.TextCtrl(self, -1,size=(_BOX_WIDTH,20))
201        self.qmax.SetValue(str(format_number(self.qmax_x)))
202        self.qmax.SetToolTipString("Maximum value of x in linear scale.")
203        self.qmax.Bind(wx.EVT_KILL_FOCUS, self._onparamEnter)
204        self.qmax.Bind(wx.EVT_TEXT_ENTER, self._onparamEnter)
205        self.qmax.Enable()
206        #The number of points to plots
207        self.npts    = wx.TextCtrl(self, -1,size=(_BOX_WIDTH,20))
208        self.npts.SetValue(format_number(self.num_points))
209        self.npts.SetToolTipString("Number of point to plot.")
210        self.npts.Bind(wx.EVT_KILL_FOCUS, self._onparamEnter)
211        self.npts.Bind(wx.EVT_TEXT_ENTER, self._onparamEnter)
212        self.npts.Disable()
213        self.npts.Hide()
214        ix = 0
215        iy = 1 
216        self.sizer9.Add(wx.StaticText(self, -1, 'Fitting Range'),(iy, ix),(1,1),\
217                            wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15)
218        ix += 1 
219        self.sizer9.Add(wx.StaticText(self, -1, 'Min'),(iy, ix),(1,1),\
220                            wx.EXPAND|wx.ADJUST_MINSIZE, 0)
221        ix += 1
222        self.sizer9.Add(wx.StaticText(self, -1, 'Max'),(iy, ix),(1,1),\
223                            wx.EXPAND|wx.ADJUST_MINSIZE, 0)
224        ix = 0
225        iy += 1
226        self.sizer9.Add(wx.StaticText(self, -1, 'Q range'),(iy, ix),(1,1),\
227                            wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15)
228        ix += 1
229        self.sizer9.Add(self.qmin,(iy, ix),(1,1), wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 0)
230        ix += 1
231        self.sizer9.Add(self.qmax,(iy,ix),(1,1), wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 0)
232        ix += 1
233        self.sizer9.Add(self.npts,(iy,ix),(1,1), wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 0)
234       
235        ix += 1
236        self.sizer9.Add(self.btFit,(iy,ix),(1,1), wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 0)
237       
238        ix =0
239        iy+=1 
240        self.sizer9.Add((20,20),(iy,ix),(1,1), wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 0)
241       
242   
243        self.vbox.Layout()
244        self.vbox.Fit(self) 
245        self.SetSizer(self.vbox)
246        self.SetScrollbars(20,20,55,40)
247       
248    def compute_chisqr2D(self):
249        """
250            compute chi square given a model and data 2D and set the value
251            to the tcChi txtcrl
252        """
253        flag=self.checkFitRange()
254        res=[]
255        if flag== True:
256            try:
257                self.qmin_x = float(self.qmin.GetValue())
258                self.qmax_x = float(self.qmax.GetValue())
259                for i in range(len(self.data.x_bins)):
260                    for j in range(len(self.data.y_bins)):
261                        #Check the range containing data between self.qmin_x and self.qmax_x
262                        radius = math.pow(self.data.x_bins[i],2)\
263                            + math.pow(self.data.y_bins[j],2)
264                           
265                        if radius >= math.pow(self.qmin_x,2):
266                            if radius <=math.pow(self.qmax_x,2):
267                                temp= self.model.runXY( [self.data.y_bins[j],self.data.x_bins[i]] )
268                                chisqrji=(self.data.data[j][i]- temp)/self.data.err_data[j][i]
269                                #Vector containing residuals
270                                res.append( math.pow(chisqrji,2) )
271                # compute sum of residual
272                sum=0
273                for item in res:
274                    if numpy.isfinite(item):
275                        sum +=item
276                self.tcChi.SetLabel(format_number(math.fabs(sum/ len(res))))
277            except:
278                msg= "Chisqr cannot be compute: %s"% sys.exc_value
279                wx.PostEvent(self.parent.GrandParent, StatusEvent(status= msg ))
280                return
281   
282       
283    def compute_chisqr(self):
284        """
285            compute chi square given a model and data 1D and set the value
286            to the tcChi txtcrl
287        """
288        flag=self.checkFitRange()
289        if flag== True:
290            try:
291                if hasattr(self.data,"data"):
292                    self.compute_chisqr2D()
293                    return
294                else:
295                    self.qmin_x = float(self.qmin.GetValue())
296                    self.qmax_x = float(self.qmax.GetValue())
297                    # Compute residuals within self.qmin_x and self.qmax_x
298                    x,y,dy = [numpy.asarray(v) for v in (self.data.x,self.data.y,self.data.dy)]
299                    if self.qmin_x==None and self.qmax_x==None: 
300                        fx =numpy.asarray([self.model.run(v) for v in x])
301                        temp=(y - fx)/dy
302                        res= temp*temp
303                    else:
304                        idx = (x>= self.qmin_x) & (x <=self.qmax_x)
305                        fx = numpy.asarray([self.model.run(item)for item in x[idx ]])
306                        temp=(y[idx] - fx)/dy[idx]
307                        res= temp*temp
308                    #sum of residuals
309                    sum=0
310                    for item in res:
311                        if numpy.isfinite(item):
312                            sum +=item
313                    self.tcChi.SetLabel(format_number(math.fabs(sum/ len(res))))
314            except:
315                msg=  "Chisqr cannot be compute: %s"% sys.exc_value
316                wx.PostEvent(self.parent.GrandParent, StatusEvent(status= msg))
317                return 
318           
319           
320    def _on_select_model(self,event):
321        """
322            react when a model is selected from page's combo box
323            post an event to its owner to draw an appropriate theory
324        """
325        self.btFit.SetFocus()
326        self.disable_disp.SetValue(True)
327        self.sizer8.Clear(True)
328        self.sizer7.Clear(True)       
329        self.vbox.Layout()
330        self.SetScrollbars(20,20,55,40)
331        self.Layout()
332        self.parent.GetSizer().Layout()
333
334        for item in self.model_list_box.itervalues():
335            name = item.__name__
336            if hasattr(item, "name"):
337                name = item.name
338           
339            if name == None:
340                self.qmin.Disable()
341                self.qmax.Disable() 
342            else:
343                self.qmin.Enable()
344                self.qmax.Enable() 
345           
346            if name ==event.GetString():
347                self.model=item()
348                self.back_up_model= self.model.clone()
349                evt = ModelEventbox(model=self.model,name=name)
350                wx.PostEvent(self.event_owner, evt)
351                try:
352                    self.compute_chisqr()
353                    self.tcChi.Show()
354                    self.text1_1.Show()
355                except:
356                    self.text1_1.Hide()
357                    pass
358                break 
359                 
360                 
361    def onFit(self,event):
362        """ signal for fitting"""
363         
364        flag=self.checkFitRange()
365        self.set_manager(self.manager)
366     
367        self.qmin_x=float(self.qmin.GetValue())
368        self.qmax_x =float( self.qmax.GetValue())
369        if len(self.param_toFit) >0 and flag==True:
370            self.manager.schedule_for_fit( value=1,fitproblem =None) 
371            if hasattr(self.data, "data"):
372                #single fit for Data2D
373                self.manager._on_single_fit(qmin=self.qmin_x,qmax=self.qmax_x,
374                                            ymin=self.data.ymin, ymax=self.data.ymax,
375                                            xmin=self.data.xmin,xmax=self.data.xmax)
376            else:
377                #single fit for Data1D
378                self.manager._on_single_fit(qmin=self.qmin_x,qmax=self.qmax_x)
379               
380            self.vbox.Layout()
381            self.SetScrollbars(20,20,55,40)
382            self.Layout()
383            self.parent.GetSizer().Layout()
384        else:
385            msg= "Select at least one parameter to fit "
386            wx.PostEvent(self.parent.parent, StatusEvent(status= msg ))
387 
388   
389    def get_param_list(self):
390        """
391            @return self.param_toFit: list containing  references to TextCtrl
392            checked.Theses TextCtrl will allow reference to parameters to fit.
393            @raise: if return an empty list of parameter fit will nnote work
394            properly so raise ValueError,"missing parameter to fit"
395        """
396        if self.param_toFit !=[]:
397            return self.param_toFit
398        else:
399            raise ValueError,"missing parameter to fit"
400       
401   
402    def _onparamEnter(self,event):
403        """
404            when enter value on panel redraw model according to changed
405        """
406        self.set_model()
407        try:
408            self.compute_chisqr()
409        except:
410            self.text1_1.Hide()
411            pass
412       
413    def set_model(self): 
414        """
415            Hide panel object related to the previous fit and set
416            values entered by the used inside the model
417        """
418        if len(self.parameters) !=0 and self.model !=None:
419            # Flag to register when a parameter has changed.
420            for item in self.parameters:
421                try:
422                    self.text2_3.Hide()
423                    item[2].Hide()
424                    item[3].Clear()
425                    item[3].Hide()
426                except:
427                    pass
428        self.set_model_parameter()
429       
430   
431    def select_all_param(self,event): 
432        """
433             set to true or false all checkBox given the main checkbox value cb1
434        """
435        self.select_all_param_helper()
436               
437               
438    def select_param(self,event):
439        """
440            Select TextCtrl  checked for fitting purpose and stores them
441            in  self.param_toFit=[] list
442        """
443        self.param_toFit=[]
444        for item in self.parameters:
445            #Select parameters to fit for list of primary parameters
446            if item[0].GetValue()==True:
447                list= [item[0],item[1],item[2],item[3]]
448                if not (list  in self.param_toFit):
449                    self.param_toFit.append(list ) 
450            else:
451                #remove parameters from the fitting list
452                if item in self.param_toFit:
453                    self.param_toFit.remove(item)
454        #Select parameters to fit for list of fittable parameters with dispersion         
455        for item in self.fittable_param:
456            if item[0].GetValue()==True:
457                list= [item[0],item[1],item[2],item[3]]
458                if not (list  in self.param_toFit):
459                    self.param_toFit.append(list ) 
460            else:
461                #remove parameters from the fitting list
462                if item in self.param_toFit:
463                    self.param_toFit.remove(item)           
464        #Set the value of checkbox that selected all checkboxes or not to true or false           
465        if len(self.parameters)+len(self.fittable_param) ==len(self.param_toFit):
466            self.cb1.SetValue(True)
467        else:
468            self.cb1.SetValue(False)
469       
470       
471    def onsetValues(self,chisqr, out,cov):
472        """
473            Build the panel from the fit result
474            @param chisqr:Value of the goodness of fit metric
475            @param out:list of parameter with the best value found during fitting
476            @param cov:Covariance matrix
477       
478        """
479        self.tcChi.SetLabel(format_number(chisqr))
480        params = {}
481        is_modified = False
482        has_error = False
483        #set the panel when fit result are float not list
484        if out.__class__==numpy.float64:
485            self.param_toFit[0][1].SetValue(format_number(out))
486            self.param_toFit[0][1].Refresh()
487            if cov !=None :
488                self.text2_3.Show()
489                self.param_toFit[0][2].Show()
490                self.param_toFit[0][3].Clear()
491                self.param_toFit[0][3].SetValue(format_number(cov[0]))
492                self.param_toFit[0][3].Show()
493        else:
494            i=0
495            j=0
496            #Set the panel when fit result are list
497            for item in self.param_toFit:
498                if( out != None ) and len(out)<=len(self.param_toFit)and i < len(out):
499                    item[1].SetValue(format_number(self.model.getParam(item[0].GetLabelText())))
500                    item[1].Refresh()
501                if(cov !=None)and len(cov)<=len(self.param_toFit)and i < len(cov):
502                    self.text2_3.Show() 
503                    item[2].Show()
504                    item[3].Clear()
505                    for j in range(len(out)):
506                        if out[j]==self.model.getParam(item[0].GetLabelText()):
507                            break
508                    item[3].SetValue(format_number(cov[j]))
509                    item[3].Show()   
510                i+=1
511       
512        self.vbox.Layout()
513        self.SetScrollbars(20,20,55,40)
514        self.Layout()
515        self.GrandParent.GetSizer().Layout()
516       
517       
518    def onSmear(self, event):
519        """
520            Create a smear object that will change the way residuals
521            are compute when fitting
522        """
523        smear =None
524        msg=""
525        if self.enable_smearer.GetValue():
526            from DataLoader.qsmearing import smear_selection
527            smear =smear_selection( self.data )
528            if hasattr(self.data,"dxl"):
529                msg= ": Resolution smearing parameters"
530            if hasattr(self.data,"dxw"):
531                msg= ": Slit smearing parameters"
532            if smear ==None:
533                wx.PostEvent(self.manager.parent, StatusEvent(status=\
534                            "Data contains no smearing information"))
535            else:
536                wx.PostEvent(self.manager.parent, StatusEvent(status=\
537                            "Data contains smearing information %s"%msg))
538        self.manager.set_smearer(smear)   
539           
540             
541       
542       
Note: See TracBrowser for help on using the repository browser.