Package user_functions :: Module bruker'
[hide private]
[frames] | no frames]

Source Code for Module user_functions.bruker'

 1  ############################################################################### 
 2  #                                                                             # 
 3  # Copyright (C) 2011-2012 Edward d'Auvergne                                   # 
 4  #                                                                             # 
 5  # This file is part of the program relax.                                     # 
 6  #                                                                             # 
 7  # relax is free software; you can redistribute it and/or modify               # 
 8  # it under the terms of the GNU General Public License as published by        # 
 9  # the Free Software Foundation; either version 2 of the License, or           # 
10  # (at your option) any later version.                                         # 
11  #                                                                             # 
12  # relax is distributed in the hope that it will be useful,                    # 
13  # but WITHOUT ANY WARRANTY; without even the implied warranty of              # 
14  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               # 
15  # GNU General Public License for more details.                                # 
16  #                                                                             # 
17  # You should have received a copy of the GNU General Public License           # 
18  # along with relax; if not, write to the Free Software                        # 
19  # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA   # 
20  #                                                                             # 
21  ############################################################################### 
22   
23  # Module docstring. 
24  """The bruker user function definitions for interfacing with the Bruker Dynamics Center.""" 
25   
26  # Python module imports. 
27  import wx 
28   
29  # relax module imports. 
30  from generic_fns import bruker 
31  from graphics import WIZARD_IMAGE_PATH 
32  from user_functions.data import Uf_info; uf_info = Uf_info() 
33  from user_functions.objects import Desc_container 
34   
35   
36  # The user function class. 
37  uf_class = uf_info.add_class('bruker') 
38  uf_class.title = "Class containing the function for reading the Bruker Dynamics Center (DC) files." 
39  uf_class.menu_text = "&bruker" 
40  uf_class.gui_icon = "relax.bruker" 
41   
42   
43  # The bruker.read user function. 
44  uf = uf_info.add_uf('bruker.read') 
45  uf.title = "Read a Bruker Dynamics Center (DC) relaxation data file." 
46  uf.title_short = "Read a Bruker Dynamics Center file." 
47  uf.add_keyarg( 
48      name = "ri_id", 
49      py_type = "str", 
50      desc_short = "relaxation data ID string", 
51      desc = "The relaxation data ID string.  This must be a unique identifier." 
52  ) 
53  uf.add_keyarg( 
54      name = "file", 
55      py_type = "str", 
56      arg_type = "file sel", 
57      desc_short = "file name", 
58      desc = "The name of the Bruker Dynamics Center file containing the relaxation data.", 
59      wiz_filesel_style = wx.FD_OPEN 
60  ) 
61  uf.add_keyarg( 
62      name = "dir", 
63      py_type = "str", 
64      arg_type = "dir", 
65      desc_short = "directory name", 
66      desc = "The directory where the file is located.", 
67      can_be_none = True 
68  ) 
69  # Description. 
70  uf.desc.append(Desc_container()) 
71  uf.desc[-1].add_paragraph("This user function is used to load all of the data out of a Bruker Dynamics Center (DC) relaxation data file for subsequent analysis within relax.  Currently the R1 and R2 relaxation rates and steady-state NOE data is supported.") 
72  uf.backend = bruker.read 
73  uf.menu_text = "&read" 
74  uf.gui_icon = "oxygen.actions.document-open" 
75  uf.wizard_size = (800, 500) 
76  uf.wizard_image = WIZARD_IMAGE_PATH + 'bruker.png' 
77