source: sasview/prview/perspectives/pr/inversion_panel.py @ 34ab06d

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 34ab06d was f3d51f6, checked in by Mathieu Doucet <doucetm@…>, 16 years ago

Initial import: gui for P(r) inversion

  • Property mode set to 100644
File size: 20.5 KB
Line 
1#!/usr/bin/env python
2
3# version
4__id__ = "$Id: aboutdialog.py 1193 2007-05-03 17:29:59Z dmitriy $"
5__revision__ = "$Revision: 1193 $"
6
7import wx
8from sans.guicomm.events import StatusEvent   
9
10class InversionDlg(wx.Dialog):
11    def __init__(self, parent, id, title, plots, file=False, pars=True):
12       
13        # Estimate size
14        nplots = len(plots)
15        # y size for data set only
16        ysize  = 110 + nplots*20
17        # y size including parameters
18        if pars:
19            ysize  += 90
20       
21        wx.Dialog.__init__(self, parent, id, title, size=(250, ysize))
22        self.SetTitle(title)
23
24        # Data set
25        self.datasets = InversionPanel(self, -1, plots)
26        vbox = wx.BoxSizer(wx.VERTICAL)
27
28        vbox.Add(self.datasets)
29
30        # Parameters
31        self.pars_flag = False
32        if pars==True:
33            self.pars_flag = True
34            self.pars = ParsDialog(self, -1, file=file)
35            vbox.Add(self.pars)
36
37        static_line = wx.StaticLine(self, -1)
38        vbox.Add(static_line, 0, wx.EXPAND, 0)
39       
40        button_OK = wx.Button(self, wx.ID_OK, "OK")
41        button_Cancel = wx.Button(self, wx.ID_CANCEL, "Cancel")
42       
43        sizer_button = wx.BoxSizer(wx.HORIZONTAL)
44        sizer_button.Add((20, 20), 1, wx.EXPAND|wx.ADJUST_MINSIZE, 0)
45        sizer_button.Add(button_OK, 0, wx.LEFT|wx.ADJUST_MINSIZE, 10)
46        sizer_button.Add(button_Cancel, 0, wx.LEFT|wx.RIGHT|wx.ADJUST_MINSIZE, 10)       
47        vbox.Add(sizer_button, 0, wx.EXPAND|wx.BOTTOM|wx.TOP, 10)
48
49        self.SetSizer(vbox)
50        self.SetAutoLayout(True)
51       
52        self.Layout()
53        self.Centre()
54
55    def get_content(self):
56        dataset = self.datasets.get_selected()
57        if self.pars_flag:
58            nfunc, alpha, dmax, file = self.pars.getContent()
59            return dataset, nfunc, alpha, dmax
60        else:
61            return dataset
62   
63    def set_content(self, dataset, nfunc, alpha, dmax):
64        if not dataset==None and dataset in self.datasets.radio_buttons.keys():
65            self.datasets.radio_buttons[dataset].SetValue(True)
66        if self.pars_flag:
67            self.pars.setContent(nfunc, alpha, dmax, None)
68
69class InversionPanel(wx.Panel):
70   
71    def __init__(self, parent, id = -1, plots = None, **kwargs):
72        wx.Panel.__init__(self, parent, id = id, **kwargs)
73       
74        self.plots = plots
75        self.radio_buttons = {}
76       
77        self._do_layout()
78       
79    def _do_layout(self):
80        panel = wx.Panel(self, -1)
81        vbox = wx.BoxSizer(wx.VERTICAL)
82
83        ysize = 30+20*len(self.plots)
84        wx.StaticBox(panel, -1, 'Choose a data set', (5, 5), (230, ysize))
85        ypos = 30
86        self.radio_buttons = {}
87        for item in self.plots.keys():
88            self.radio_buttons[self.plots[item].name] = wx.RadioButton(panel, -1, self.plots[item].name, (15, ypos))
89            ypos += 20
90       
91        vbox.Add(panel)
92
93        self.SetSizer(vbox)
94       
95    def get_selected(self):
96        for item in self.radio_buttons:
97            if self.radio_buttons[item].GetValue():
98                return item
99        return None
100
101class InversionControl(wx.Panel):
102    window_name = 'pr_control'
103    window_caption = "P(r) control panel"
104    CENTER_PANE = True
105   
106    # Figure of merit parameters [default]
107    oscillation_max = 1.5
108   
109    def __init__(self, parent, id = -1, plots = None, **kwargs):
110        wx.Panel.__init__(self, parent, id = id, **kwargs)
111       
112        self.plots = plots
113        self.radio_buttons = {}
114       
115        ## Data file TextCtrl
116        self.data_file = None
117        self.plot_data = None
118        self.nfunc_ctl = None
119        self.alpha_ctl = None
120        self.dmax_ctl  = None
121        self.time_ctl  = None
122        self.chi2_ctl  = None
123        self.osc_ctl  = None
124        self.file_radio = None
125        self.plot_radio = None
126       
127        ## Estimates
128        self.alpha_estimate_ctl = None
129       
130        ## Data manager
131        self.manager   = None
132       
133        self._do_layout()
134       
135    def __setattr__(self, name, value):
136        """
137            Allow direct hooks to text boxes
138        """
139        if name=='nfunc':
140            self.nfunc_ctl.SetValue(str(value))
141        elif name=='d_max':
142            self.dmax_ctl.SetValue(str(value))
143        elif name=='alpha':
144            self.alpha_ctl.SetValue(str(value))
145        elif name=='chi2':
146            self.chi2_ctl.SetValue("%-5.3g" % value)
147        elif name=='elapsed':
148            self.time_ctl.SetValue("%-5.2g" % value)
149        elif name=='oscillation':
150            self.osc_ctl.SetValue("%-5.2g" % value)
151        elif name=='alpha_estimate':
152            self.alpha_estimate_ctl.SetValue("%-5.2g" % value)
153        elif name=='plotname':
154            self.plot_data.SetValue(str(value))
155            self.plot_radio.SetValue(True)
156            self._on_pars_changed(None)
157        else:
158            wx.Panel.__setattr__(self, name, value)
159       
160    def __getattr__(self, name):
161        """
162            Allow direct hooks to text boxes
163        """
164        if name=='nfunc':
165            int(self.nfunc_ctl.GetValue())
166        elif name=='d_max':
167            self.dmax_ctl.GetValue()
168        elif name=='alpha':
169            self.alpha_ctl.GetValue()
170        elif name=='chi2':
171            self.chi2_ctl.GetValue()
172        elif name=='elapsed':
173            self.time_ctl.GetValue()
174        elif name=='oscillation':
175            self.osc_ctl.GetValue()
176        elif name=='alpha_estimate':
177            self.alpha_estimate_ctl.GetValue()
178        elif name=='plotname':
179            self.plot_data.GetValue()
180        else:
181            wx.Panel.__getattr__(self, name)
182       
183    def set_manager(self, manager):
184        self.manager = manager
185        # Get data
186       
187        # Push data to form
188       
189       
190    def _do_layout(self):
191        #panel = wx.Panel(self, -1)
192        vbox = wx.BoxSizer(wx.VERTICAL)
193
194        # ----- I(q) data -----
195        databox = wx.StaticBox(self, -1, "I(q) data")
196       
197        boxsizer1 = wx.StaticBoxSizer(databox, wx.VERTICAL)
198        boxsizer1.SetMinSize((320,50))
199        pars_sizer = wx.GridBagSizer(5,5)
200
201        iy = 0
202        self.file_radio = wx.RadioButton(self, -1, "File data:")
203        self.data_file = wx.TextCtrl(self, -1, size=(100,20))
204        self.data_file.SetEditable(False)
205        self.data_file.SetValue("")
206        id = wx.NewId()
207        choose_button = wx.Button(self, id, "Choose file")
208        self.Bind(wx.EVT_BUTTON, self._change_file, id = id)   
209        pars_sizer.Add(self.file_radio, (iy,0), (1,1), wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15)
210        pars_sizer.Add(self.data_file, (iy,1), (1,1), wx.EXPAND|wx.ADJUST_MINSIZE, 15)
211        pars_sizer.Add(choose_button, (iy,3), (1,1), wx.RIGHT|wx.EXPAND|wx.ADJUST_MINSIZE, 15)
212       
213        iy += 1
214        self.plot_radio = wx.RadioButton(self, -1, "Plot data:")
215        self.plot_data = wx.TextCtrl(self, -1, size=(100,20))
216        self.plot_data.SetEditable(False)
217        pars_sizer.Add(self.plot_radio, (iy,0), (1,1), wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15)
218        pars_sizer.Add(self.plot_data, (iy,1), (1,1), wx.EXPAND|wx.ADJUST_MINSIZE, 15)
219       
220        boxsizer1.Add(pars_sizer, 0, wx.EXPAND)
221        vbox.Add(boxsizer1)
222
223        # ----- Parameters -----
224        parsbox = wx.StaticBox(self, -1, "Parameters")
225        boxsizer2 = wx.StaticBoxSizer(parsbox, wx.VERTICAL)
226        boxsizer2.SetMinSize((320,50))
227       
228        label_nfunc = wx.StaticText(self, -1, "Number of terms")
229        label_nfunc.SetMinSize((120,20))
230        label_alpha = wx.StaticText(self, -1, "Regularization constant")
231        label_dmax  = wx.StaticText(self, -1, "Max distance [A]")
232        label_sugg  = wx.StaticText(self, -1, "Suggested value")
233       
234        self.nfunc_ctl = wx.TextCtrl(self, -1, size=(60,20))
235        self.alpha_ctl = wx.TextCtrl(self, -1, size=(60,20))
236        self.dmax_ctl  = wx.TextCtrl(self, -1, size=(60,20))
237        self.alpha_estimate_ctl  = wx.TextCtrl(self, -1, size=(60,20))
238        self.alpha_estimate_ctl.Enable(False)
239       
240        # EVT_TEXT would trigger an event for each character entered
241        self.nfunc_ctl.Bind(wx.EVT_KILL_FOCUS, self._on_pars_changed)
242        #self.alpha_ctl.Bind(wx.EVT_KILL_FOCUS, self._on_pars_changed)
243        self.dmax_ctl.Bind(wx.EVT_KILL_FOCUS, self._on_pars_changed)
244        self.Bind(wx.EVT_TEXT_ENTER, self._on_pars_changed)
245       
246        sizer_params = wx.GridBagSizer(5,5)
247
248        iy = 0
249        sizer_params.Add(label_sugg, (iy,2), (1,1), wx.EXPAND|wx.ADJUST_MINSIZE, 15)
250        iy += 1
251        sizer_params.Add(label_nfunc, (iy,0), (1,1), wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15)
252        sizer_params.Add(self.nfunc_ctl,   (iy,1), (1,1), wx.RIGHT|wx.EXPAND|wx.ADJUST_MINSIZE, 15)
253        iy += 1
254        sizer_params.Add(label_alpha, (iy,0), (1,1), wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15)
255        sizer_params.Add(self.alpha_ctl,   (iy,1), (1,1), wx.RIGHT|wx.EXPAND|wx.ADJUST_MINSIZE, 15)
256        sizer_params.Add(self.alpha_estimate_ctl,   (iy,2), (1,1), wx.RIGHT|wx.EXPAND|wx.ADJUST_MINSIZE, 15)
257        iy += 1
258        sizer_params.Add(label_dmax, (iy,0), (1,1), wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15)
259        sizer_params.Add(self.dmax_ctl,   (iy,1), (1,1), wx.RIGHT|wx.EXPAND|wx.ADJUST_MINSIZE, 15)
260
261        boxsizer2.Add(sizer_params, 0)
262        vbox.Add(boxsizer2)
263
264        # ----- Results -----
265        resbox = wx.StaticBox(self, -1, "Outputs")
266        ressizer = wx.StaticBoxSizer(resbox, wx.VERTICAL)
267        ressizer.SetMinSize((320,50))
268       
269        label_time = wx.StaticText(self, -1, "Computation time")
270        label_time_unit = wx.StaticText(self, -1, "secs")
271        label_time.SetMinSize((120,20))
272        label_chi2 = wx.StaticText(self, -1, "Chi2/dof")
273        label_osc = wx.StaticText(self, -1, "Oscillations")
274       
275        self.time_ctl = wx.TextCtrl(self, -1, size=(60,20))
276        self.time_ctl.SetEditable(False)
277        self.chi2_ctl = wx.TextCtrl(self, -1, size=(60,20))
278        self.chi2_ctl.SetEditable(False)
279        self.osc_ctl = wx.TextCtrl(self, -1, size=(60,20))
280        self.osc_ctl.SetEditable(False)
281       
282        sizer_res = wx.GridBagSizer(5,5)
283
284        iy = 0
285        sizer_res.Add(label_time, (iy,0), (1,1), wx.LEFT|wx.EXPAND, 15)
286        sizer_res.Add(self.time_ctl,   (iy,1), (1,1), wx.RIGHT|wx.EXPAND, 15)
287        sizer_res.Add(label_time_unit,   (iy,2), (1,1), wx.RIGHT|wx.EXPAND, 15)
288        iy += 1
289        sizer_res.Add(label_chi2, (iy,0), (1,1), wx.LEFT|wx.EXPAND, 15)
290        sizer_res.Add(self.chi2_ctl,   (iy,1), (1,1), wx.RIGHT|wx.EXPAND, 15)
291        iy += 1
292        sizer_res.Add(label_osc, (iy,0), (1,1), wx.LEFT|wx.EXPAND, 15)
293        sizer_res.Add(self.osc_ctl,   (iy,1), (1,1), wx.RIGHT|wx.EXPAND, 15)
294
295        ressizer.Add(sizer_res, 0)
296        vbox.Add(ressizer)
297
298        # ----- Buttons -----
299        static_line = wx.StaticLine(self, -1)
300        vbox.Add(static_line, 0, wx.EXPAND|wx.TOP, 10)
301       
302        id = wx.NewId()
303        button_OK = wx.Button(self, id, "Compute")
304        self.Bind(wx.EVT_BUTTON, self._on_invert, id = id)   
305        #button_Cancel = wx.Button(self, wx.ID_CANCEL, "Cancel")
306       
307        sizer_button = wx.BoxSizer(wx.HORIZONTAL)
308        sizer_button.Add((20, 20), 1, wx.EXPAND|wx.ADJUST_MINSIZE, 0)
309        sizer_button.Add(button_OK, 0, wx.LEFT|wx.ADJUST_MINSIZE, 10)
310        #sizer_button.Add(button_Cancel, 0, wx.LEFT|wx.RIGHT|wx.ADJUST_MINSIZE, 10)       
311        vbox.Add(sizer_button, 0, wx.EXPAND|wx.BOTTOM|wx.TOP, 10)
312
313
314        self.SetSizer(vbox)
315       
316    def _on_pars_changed(self, evt):
317        """
318            Called when an input parameter has changed
319            We will estimate the alpha parameter behind the
320            scenes.
321        """
322        flag, alpha, dmax, nfunc = self._read_pars()
323       
324        # If the pars are valid, estimate alpha
325        if flag:
326            if self.plot_radio.GetValue():
327                dataset = self.plot_data.GetValue()
328                self.manager.estimate_plot_inversion(alpha=alpha, nfunc=nfunc, 
329                                                     d_max=dmax)
330            else:
331                path = self.data_file.GetValue()
332                self.manager.estimate_file_inversion(alpha=alpha, nfunc=nfunc, 
333                                                     d_max=dmax, path=path)
334       
335       
336    def _read_pars(self):   
337        alpha = 0
338        nfunc = 5
339        dmax  = 120
340       
341        flag = True
342       
343        # Read alpha
344        try:
345            alpha = float(self.alpha_ctl.GetValue())
346            self.alpha_ctl.SetBackgroundColour(wx.WHITE)
347            self.alpha_ctl.Refresh()
348        except:
349            flag = False
350            self.alpha_ctl.SetBackgroundColour("pink")
351            self.alpha_ctl.Refresh()
352       
353        # Read d_max   
354        try:
355            dmax = float(self.dmax_ctl.GetValue())
356            self.dmax_ctl.SetBackgroundColour(wx.WHITE)
357            self.dmax_ctl.Refresh()
358        except:
359            flag = False
360            self.dmax_ctl.SetBackgroundColour("pink")
361            self.dmax_ctl.Refresh()
362           
363        # Read nfunc
364        try:
365            nfunc = int(self.nfunc_ctl.GetValue())
366            self.nfunc_ctl.SetBackgroundColour(wx.WHITE)
367            self.nfunc_ctl.Refresh()
368        except:
369            flag = False
370            self.nfunc_ctl.SetBackgroundColour("pink")
371            self.nfunc_ctl.Refresh()
372       
373        return flag, alpha, dmax, nfunc
374   
375    def _on_invert(self, evt):
376        """
377            Perform inversion
378            @param silent: when True, there will be no output for the user
379        """
380        # Get the data from the form
381        # Push it to the manager
382       
383        flag, alpha, dmax, nfunc = self._read_pars()
384       
385        if flag:
386            if self.plot_radio.GetValue():
387                dataset = self.plot_data.GetValue()
388                self.manager.setup_plot_inversion(alpha=alpha, nfunc=nfunc, 
389                                                  d_max=dmax)
390            else:
391                path = self.data_file.GetValue()
392                self.manager.setup_file_inversion(alpha=alpha, nfunc=nfunc, 
393                                                  d_max=dmax, path=path)
394               
395        else:
396            message = "The P(r) form contains invalid values: please submit it again."
397            wx.PostEvent(self.parent, StatusEvent(status=message))
398       
399    def _change_file(self, evt):
400        """
401            Choose a new input file for I(q)
402        """
403        import os
404        if not self.manager==None:
405            path = self.manager.choose_file()
406           
407            if path and os.path.isfile(path):
408                self.data_file.SetValue(str(path))
409                self.file_radio.SetValue(True)
410                self._on_pars_changed(None)
411       
412
413class ParsDialog(wx.Panel):
414    """
415        Dialog box to let the user edit detector settings
416    """
417   
418    def __init__(self, parent, id = id, file=True, **kwargs):
419
420        wx.Panel.__init__(self, parent, id = id, **kwargs)
421        self.file = file
422       
423        self.label_nfunc = wx.StaticText(self, -1, "Number of terms")
424        self.label_alpha = wx.StaticText(self, -1, "Regularization constant")
425        self.label_dmax  = wx.StaticText(self, -1, "Max distance [A]")
426       
427        # Npts, q max
428        self.nfunc_ctl = wx.TextCtrl(self, -1, size=(60,20))
429        self.alpha_ctl = wx.TextCtrl(self, -1, size=(60,20))
430        self.dmax_ctl  = wx.TextCtrl(self, -1, size=(60,20))
431
432        self.label_file = None
433        self.file_ctl   = None
434
435        self.static_line_3 = wx.StaticLine(self, -1)
436       
437       
438
439        self.__do_layout()
440
441        self.Fit()
442       
443    def _load_file(self, evt):
444        import os
445        path = None
446        dlg = wx.FileDialog(self, "Choose a file", os.getcwd(), "", "*.txt", wx.OPEN)
447        if dlg.ShowModal() == wx.ID_OK:
448            path = dlg.GetPath()
449            mypath = os.path.basename(path)
450        dlg.Destroy()
451       
452        if path and os.path.isfile(path):
453            self.file_ctl.SetValue(str(path))
454
455       
456    def checkValues(self, event):
457        flag = True
458        try:
459            float(self.alpha_ctl.GetValue())
460            self.alpha_ctl.SetBackgroundColour(wx.WHITE)
461            self.alpha_ctl.Refresh()
462        except:
463            flag = False
464            self.alpha_ctl.SetBackgroundColour("pink")
465            self.alpha_ctl.Refresh()
466           
467        try:
468            float(self.dmax_ctl.GetValue())
469            self.dmax_ctl.SetBackgroundColour(wx.WHITE)
470            self.dmax_ctl.Refresh()
471        except:
472            flag = False
473            self.dmax_ctl.SetBackgroundColour("pink")
474            self.dmax_ctl.Refresh()
475           
476        try:
477            int(self.nfunc_ctl.GetValue())
478            self.nfunc_ctl.SetBackgroundColour(wx.WHITE)
479            self.nfunc_ctl.Refresh()
480        except:
481            flag = False
482            self.nfunc_ctl.SetBackgroundColour("pink")
483            self.nfunc_ctl.Refresh()
484       
485        if flag:
486            event.Skip(True)
487   
488    def setContent(self, nfunc, alpha, dmax, file):
489        self.nfunc_ctl.SetValue(str(nfunc))
490        self.alpha_ctl.SetValue(str(alpha))
491        self.dmax_ctl.SetValue(str(dmax))
492        if self.file:
493            self.file_ctl.SetValue(str(file))
494
495    def getContent(self):
496        nfunc = int(self.nfunc_ctl.GetValue())
497        alpha = float(self.alpha_ctl.GetValue())
498        dmax = float(self.dmax_ctl.GetValue())
499        file = None
500        if self.file:
501            file = self.file_ctl.GetValue()
502        return nfunc, alpha, dmax, file
503
504
505    def __do_layout(self):
506        sizer_main = wx.BoxSizer(wx.VERTICAL)
507        sizer_params = wx.GridBagSizer(5,5)
508
509        iy = 0
510        sizer_params.Add(self.label_nfunc, (iy,0), (1,1), wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15)
511        sizer_params.Add(self.nfunc_ctl,   (iy,1), (1,1), wx.EXPAND|wx.ADJUST_MINSIZE, 0)
512        iy += 1
513        sizer_params.Add(self.label_alpha, (iy,0), (1,1), wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15)
514        sizer_params.Add(self.alpha_ctl,   (iy,1), (1,1), wx.EXPAND|wx.ADJUST_MINSIZE, 0)
515        iy += 1
516        sizer_params.Add(self.label_dmax, (iy,0), (1,1), wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15)
517        sizer_params.Add(self.dmax_ctl,   (iy,1), (1,1), wx.EXPAND|wx.ADJUST_MINSIZE, 0)
518        iy += 1
519        if self.file:
520            self.label_file  = wx.StaticText(self, -1, "Input file")
521            self.file_ctl  = wx.TextCtrl(self, -1, size=(120,20))
522            sizer_params.Add(self.label_file, (iy,0), (1,1), wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15)
523            sizer_params.Add(self.file_ctl,   (iy,1), (1,1), wx.EXPAND|wx.ADJUST_MINSIZE, 0)
524
525        sizer_main.Add(sizer_params, 0, wx.EXPAND|wx.ALL, 10)
526       
527       
528        if self.file:
529            sizer_button = wx.BoxSizer(wx.HORIZONTAL)
530            self.button_load = wx.Button(self, 1, "Choose file")
531            self.Bind(wx.EVT_BUTTON, self._load_file, id = 1)       
532            sizer_button.Add(self.button_load, 0, wx.LEFT|wx.ADJUST_MINSIZE, 10)
533       
534       
535            sizer_main.Add(sizer_button, 0, wx.EXPAND|wx.BOTTOM|wx.TOP, 10)
536        self.SetAutoLayout(True)
537        self.SetSizer(sizer_main)
538        self.Layout()
539        self.Centre()
540        # end wxGlade
541
542
543# end of class DialogAbout
544
545##### testing code ############################################################
546class TestPlot:
547    def __init__(self, text):
548        self.name = text
549   
550class MyApp(wx.App):
551    def OnInit(self):
552        wx.InitAllImageHandlers()
553        plots = {}
554        plots['a'] = TestPlot("data 1")
555        plots['b'] = TestPlot("data 2")
556        #plots['c'] = TestPlot("data 3")
557        #plots['d'] = TestPlot("data 1")
558        #plots['e'] = TestPlot("data 2")
559        #plots['f'] = TestPlot("data 3")
560        dialog = InversionDlg(None, -1, "P(r) parameters", plots)
561        if dialog.ShowModal() == wx.ID_OK:
562            print dialog.get_content()
563        dialog.Destroy()
564       
565        return 1
566
567# end of class MyApp
568
569if __name__ == "__main__":
570    app = MyApp(0)
571    app.MainLoop()
572   
573##### end of testing code #####################################################   
Note: See TracBrowser for help on using the repository browser.