mailr16612 - in /branches/uf_redesign/specific_fns: jw_mapping.py model_free/main.py n_state_model.py noe/main.py relax_fit.py


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by edward on June 03, 2012 - 23:19:
Author: bugman
Date: Sun Jun  3 23:19:32 2012
New Revision: 16612

URL: http://svn.gna.org/viewcvs/relax?rev=16612&view=rev
Log:
All of the user_function.object.Table instances in the specific code 
descriptions are now private.

This hides them from the specific API, and allows the unit tests to pass.


Modified:
    branches/uf_redesign/specific_fns/jw_mapping.py
    branches/uf_redesign/specific_fns/model_free/main.py
    branches/uf_redesign/specific_fns/n_state_model.py
    branches/uf_redesign/specific_fns/noe/main.py
    branches/uf_redesign/specific_fns/relax_fit.py

Modified: branches/uf_redesign/specific_fns/jw_mapping.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/uf_redesign/specific_fns/jw_mapping.py?rev=16612&r1=16611&r2=16612&view=diff
==============================================================================
--- branches/uf_redesign/specific_fns/jw_mapping.py (original)
+++ branches/uf_redesign/specific_fns/jw_mapping.py Sun Jun  3 23:19:32 2012
@@ -232,17 +232,17 @@
 
     default_value_doc = Desc_container("Reduced spectral density mapping 
default values")
     default_value_doc.add_paragraph("These default values are found in the 
file 'physical_constants.py'.")
-    table = uf_tables.add_table(label="table: J(w) default values", 
caption="Reduced spectral density mapping default values.")
-    table.add_headings(["Data type", "Object name", "Value"])
-    table.add_row(["Bond length", "'r'", "1.02 * 1e-10"])
-    table.add_row(["CSA", "'csa'", "-172 * 1e-6"])
-    table.add_row(["Heteronucleus type", "'heteronuc_type'", "'15N'"])
-    table.add_row(["Proton type", "'proton_type'", "'1H'"])
-    default_value_doc.add_table(table.label)
+    _table = uf_tables.add_table(label="table: J(w) default values", 
caption="Reduced spectral density mapping default values.")
+    _table.add_headings(["Data type", "Object name", "Value"])
+    _table.add_row(["Bond length", "'r'", "1.02 * 1e-10"])
+    _table.add_row(["CSA", "'csa'", "-172 * 1e-6"])
+    _table.add_row(["Heteronucleus type", "'heteronuc_type'", "'15N'"])
+    _table.add_row(["Proton type", "'proton_type'", "'1H'"])
+    default_value_doc.add_table(_table.label)
 
 
     def overfit_deselect(self):
-        """Deselect spins which have insufficient data to support 
calculation."""
+        """Deselect spins which _have insufficient data to support 
calculation."""
 
         # Print out.
         print("\n\nOver-fit spin deselection.\n")
@@ -277,16 +277,16 @@
 
 
     return_data_name_doc = Desc_container("Reduced spectral density mapping 
data type string matching patterns")
-    table = uf_tables.add_table(label="table: J(w) data types", 
caption="Reduced spectral density mapping data type string matching 
patterns.")
-    table.add_headings(["Data type", "Object name"])
-    table.add_row(["J(0)", "'j0'"])
-    table.add_row(["J(wX)", "'jwx'"])
-    table.add_row(["J(wH)", "'jwh'"])
-    table.add_row(["Bond length", "'r'"])
-    table.add_row(["CSA", "'csa'"])
-    table.add_row(["Heteronucleus type", "'heteronuc_type'"])
-    table.add_row(["Proton type", "'proton_type'"])
-    return_data_name_doc.add_table(table.label)
+    _table = uf_tables.add_table(label="table: J(w) data types", 
caption="Reduced spectral density mapping data type string matching 
patterns.")
+    _table.add_headings(["Data type", "Object name"])
+    _table.add_row(["J(0)", "'j0'"])
+    _table.add_row(["J(wX)", "'jwx'"])
+    _table.add_row(["J(wH)", "'jwh'"])
+    _table.add_row(["Bond length", "'r'"])
+    _table.add_row(["CSA", "'csa'"])
+    _table.add_row(["Heteronucleus type", "'heteronuc_type'"])
+    _table.add_row(["Proton type", "'proton_type'"])
+    return_data_name_doc.add_table(_table.label)
 
 
     set_doc = Desc_container("Reduced spectral density mapping set details")

Modified: branches/uf_redesign/specific_fns/model_free/main.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/uf_redesign/specific_fns/model_free/main.py?rev=16612&r1=16611&r2=16612&view=diff
==============================================================================
--- branches/uf_redesign/specific_fns/model_free/main.py (original)
+++ branches/uf_redesign/specific_fns/model_free/main.py Sun Jun  3 23:19:32 
2012
@@ -1285,19 +1285,19 @@
 
 
     default_value_doc = Desc_container("Model-free default values")
-    table = uf_tables.add_table(label="table: mf default values", 
caption="Model-free default values.")
-    table.add_headings(["Data type", "Object name", "Value"])
-    table.add_row(["Local tm", "'local_tm'", "10 * 1e-9"])
-    table.add_row(["Order parameters S2, S2f, and S2s", "'s2', 's2f', 
's2s'", "0.8"])
-    table.add_row(["Correlation time te", "'te'", "100 * 1e-12"])
-    table.add_row(["Correlation time tf", "'tf'", "10 * 1e-12"])
-    table.add_row(["Correlation time ts", "'ts'", "1000 * 1e-12"])
-    table.add_row(["Chemical exchange relaxation", "'rex'", "0.0"])
-    table.add_row(["Bond length", "'r'", "1.02 * 1e-10"])
-    table.add_row(["CSA", "'csa'", "-172 * 1e-6"])
-    table.add_row(["Heteronucleus type", "'heteronuc_type'", "'15N'"])
-    table.add_row(["Proton type", "'proton_type'", "'1H'"])
-    default_value_doc.add_table(table.label)
+    _table = uf_tables.add_table(label="table: mf default values", 
caption="Model-free default values.")
+    _table.add_headings(["Data type", "Object name", "Value"])
+    _table.add_row(["Local tm", "'local_tm'", "10 * 1e-9"])
+    _table.add_row(["Order parameters S2, S2f, and S2s", "'s2', 's2f', 
's2s'", "0.8"])
+    _table.add_row(["Correlation time te", "'te'", "100 * 1e-12"])
+    _table.add_row(["Correlation time tf", "'tf'", "10 * 1e-12"])
+    _table.add_row(["Correlation time ts", "'ts'", "1000 * 1e-12"])
+    _table.add_row(["Chemical exchange relaxation", "'rex'", "0.0"])
+    _table.add_row(["Bond length", "'r'", "1.02 * 1e-10"])
+    _table.add_row(["CSA", "'csa'", "-172 * 1e-6"])
+    _table.add_row(["Heteronucleus type", "'heteronuc_type'", "'15N'"])
+    _table.add_row(["Proton type", "'proton_type'", "'1H'"])
+    default_value_doc.add_table(_table.label)
 
     def default_value(self, param):
         """The default model-free parameter values.
@@ -1939,21 +1939,21 @@
 
 
     return_data_name_doc = Desc_container("Model-free data type string 
matching patterns")
-    table = uf_tables.add_table(label="table: mf data type patterns", 
caption="Model-free data type string matching patterns.")
-    table.add_headings(["Data type", "Object name"])
-    table.add_row(["Local tm", "'local_tm'"])
-    table.add_row(["Order parameter S2", "'s2'"])
-    table.add_row(["Order parameter S2f", "'s2f'"])
-    table.add_row(["Order parameter S2s", "'s2s'"])
-    table.add_row(["Correlation time te", "'te'"])
-    table.add_row(["Correlation time tf", "'tf'"])
-    table.add_row(["Correlation time ts", "'ts'"])
-    table.add_row(["Chemical exchange", "'rex'"])
-    table.add_row(["Bond length", "'r'"])
-    table.add_row(["CSA", "'csa'"])
-    table.add_row(["Heteronucleus type", "'heteronuc_type'"])
-    table.add_row(["Proton type", "'proton_type'"])
-    return_data_name_doc.add_table(table.label)
+    _table = uf_tables.add_table(label="table: mf data type patterns", 
caption="Model-free data type string matching patterns.")
+    _table.add_headings(["Data type", "Object name"])
+    _table.add_row(["Local tm", "'local_tm'"])
+    _table.add_row(["Order parameter S2", "'s2'"])
+    _table.add_row(["Order parameter S2f", "'s2f'"])
+    _table.add_row(["Order parameter S2s", "'s2s'"])
+    _table.add_row(["Correlation time te", "'te'"])
+    _table.add_row(["Correlation time tf", "'tf'"])
+    _table.add_row(["Correlation time ts", "'ts'"])
+    _table.add_row(["Chemical exchange", "'rex'"])
+    _table.add_row(["Bond length", "'r'"])
+    _table.add_row(["CSA", "'csa'"])
+    _table.add_row(["Heteronucleus type", "'heteronuc_type'"])
+    _table.add_row(["Proton type", "'proton_type'"])
+    return_data_name_doc.add_table(_table.label)
 
 
     set_doc = Desc_container("Model-free set details")

Modified: branches/uf_redesign/specific_fns/n_state_model.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/uf_redesign/specific_fns/n_state_model.py?rev=16612&r1=16611&r2=16612&view=diff
==============================================================================
--- branches/uf_redesign/specific_fns/n_state_model.py (original)
+++ branches/uf_redesign/specific_fns/n_state_model.py Sun Jun  3 23:19:32 
2012
@@ -1833,13 +1833,13 @@
 
 
     default_value_doc = Desc_container("N-state model default values")
-    table = uf_tables.add_table(label="table: N-state default values", 
caption="N-state model default values.")
-    table.add_headings(["Data type", "Object name", "Value"])
-    table.add_row(["Probabilities", "'p0', 'p1', 'p2', ..., 'pN'", "1/N"])
-    table.add_row(["Euler angle alpha", "'alpha0', 'alpha1', ...", "(c+1) * 
pi / (N+1)"])
-    table.add_row(["Euler angle beta", "'beta0', 'beta1', ...", "(c+1) * pi 
/ (N+1)"])
-    table.add_row(["Euler angle gamma", "'gamma0', 'gamma1', ...", "(c+1) * 
pi / (N+1)"])
-    default_value_doc.add_table(table.label)
+    _table = uf_tables.add_table(label="table: N-state default values", 
caption="N-state model default values.")
+    _table.add_headings(["Data type", "Object name", "Value"])
+    _table.add_row(["Probabilities", "'p0', 'p1', 'p2', ..., 'pN'", "1/N"])
+    _table.add_row(["Euler angle alpha", "'alpha0', 'alpha1', ...", "(c+1) * 
pi / (N+1)"])
+    _table.add_row(["Euler angle beta", "'beta0', 'beta1', ...", "(c+1) * pi 
/ (N+1)"])
+    _table.add_row(["Euler angle gamma", "'gamma0', 'gamma1', ...", "(c+1) * 
pi / (N+1)"])
+    default_value_doc.add_table(_table.label)
     default_value_doc.add_paragraph("In this table, N is the total number of 
states and c is the index of a given state ranging from 0 to N-1.  The 
default probabilities are all set to be equal whereas the angles are given a 
range of values so that no 2 states are equal at the start of optimisation.")
     default_value_doc.add_paragraph("Note that setting the probability for 
state N will do nothing as it is equal to one minus all the other 
probabilities.")
 
@@ -2161,16 +2161,16 @@
 
 
     return_data_name_doc = Desc_container("N-state model data type string 
matching patterns")
-    table = uf_tables.add_table(label="table: N-state data type patterns", 
caption="N-state model data type string matching patterns.")
-    table.add_headings(["Data type", "Object name", "Patterns"])
-    table.add_row(["Probabilities", "'probs'", "'p0', 'p1', 'p2', ..., 
'pN'"])
-    table.add_row(["Euler angle alpha", "'alpha'", "'alpha0', 'alpha1', 
..."])
-    table.add_row(["Euler angle beta", "'beta'", "'beta0', 'beta1', ..."])
-    table.add_row(["Euler angle gamma", "'gamma'", "'gamma0', 'gamma1', 
..."])
-    table.add_row(["Bond length", "'r'", "'^r$' or '[Bb]ond[ -_][Ll]ength'"])
-    table.add_row(["Heteronucleus type", "'heteronuc_type'", 
"'^[Hh]eteronucleus$'"])
-    table.add_row(["Proton type", "'proton_type'", "'^[Pp]roton$'"])
-    return_data_name_doc.add_table(table.label)
+    _table = uf_tables.add_table(label="table: N-state data type patterns", 
caption="N-state model data type string matching patterns.")
+    _table.add_headings(["Data type", "Object name", "Patterns"])
+    _table.add_row(["Probabilities", "'probs'", "'p0', 'p1', 'p2', ..., 
'pN'"])
+    _table.add_row(["Euler angle alpha", "'alpha'", "'alpha0', 'alpha1', 
..."])
+    _table.add_row(["Euler angle beta", "'beta'", "'beta0', 'beta1', ..."])
+    _table.add_row(["Euler angle gamma", "'gamma'", "'gamma0', 'gamma1', 
..."])
+    _table.add_row(["Bond length", "'r'", "'^r$' or '[Bb]ond[ 
-_][Ll]ength'"])
+    _table.add_row(["Heteronucleus type", "'heteronuc_type'", 
"'^[Hh]eteronucleus$'"])
+    _table.add_row(["Proton type", "'proton_type'", "'^[Pp]roton$'"])
+    return_data_name_doc.add_table(_table.label)
     return_data_name_doc.add_paragraph("The objects corresponding to the 
object names are lists (or arrays) with each element corrsponding to each 
state.")
 
     def return_data_name(self, param):

Modified: branches/uf_redesign/specific_fns/noe/main.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/uf_redesign/specific_fns/noe/main.py?rev=16612&r1=16611&r2=16612&view=diff
==============================================================================
--- branches/uf_redesign/specific_fns/noe/main.py (original)
+++ branches/uf_redesign/specific_fns/noe/main.py Sun Jun  3 23:19:32 2012
@@ -169,12 +169,12 @@
 
 
     return_data_name_doc = Desc_container("NOE calculation data type string 
matching patterns")
-    table = uf_tables.add_table(label="table: NOE data type patterns", 
caption="NOE data type string matching patterns.")
-    table.add_headings(["Data type", "Object name"])
-    table.add_row(["Reference intensity", "'ref'"])
-    table.add_row(["Saturated intensity", "'sat'"])
-    table.add_row(["NOE", "'noe'"])
-    return_data_name_doc.add_table(table.label)
+    _table = uf_tables.add_table(label="table: NOE data type patterns", 
caption="NOE data type string matching patterns.")
+    _table.add_headings(["Data type", "Object name"])
+    _table.add_row(["Reference intensity", "'ref'"])
+    _table.add_row(["Saturated intensity", "'sat'"])
+    _table.add_row(["NOE", "'noe'"])
+    return_data_name_doc.add_table(_table.label)
 
 
     def return_units(self, param):

Modified: branches/uf_redesign/specific_fns/relax_fit.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/uf_redesign/specific_fns/relax_fit.py?rev=16612&r1=16611&r2=16612&view=diff
==============================================================================
--- branches/uf_redesign/specific_fns/relax_fit.py (original)
+++ branches/uf_redesign/specific_fns/relax_fit.py Sun Jun  3 23:19:32 2012
@@ -580,12 +580,12 @@
 
     default_value_doc = Desc_container("Relaxation curve fitting default 
values")
     default_value_doc.add_paragraph("These values are completely arbitrary 
as peak heights (or volumes) are extremely variable and the Rx value is a 
compensation for both the R1 and R2 values.")
-    table = uf_tables.add_table(label="table: curve-fit default values", 
caption="Relaxation curve fitting default values.")
-    table.add_headings(["Data type", "Object name", "Value"])
-    table.add_row(["Relaxation rate", "'rx'", "8.0"])
-    table.add_row(["Initial intensity", "'i0'", "10000.0"])
-    table.add_row(["Intensity at infinity", "'iinf'", "0.0"])
-    default_value_doc.add_table(table.label)
+    _table = uf_tables.add_table(label="table: curve-fit default values", 
caption="Relaxation curve fitting default values.")
+    _table.add_headings(["Data type", "Object name", "Value"])
+    _table.add_row(["Relaxation rate", "'rx'", "8.0"])
+    _table.add_row(["Initial intensity", "'i0'", "10000.0"])
+    _table.add_row(["Intensity at infinity", "'iinf'", "0.0"])
+    default_value_doc.add_table(_table.label)
 
 
     def grid_search(self, lower=None, upper=None, inc=None, 
constraints=True, verbosity=1, sim_index=None):
@@ -844,14 +844,14 @@
 
 
     return_data_name_doc = Desc_container("Relaxation curve fitting data 
type string matching patterns")
-    table = uf_tables.add_table(label="table: curve-fit data type patterns", 
caption="Relaxation curve fitting data type string matching patterns.")
-    table.add_headings(["Data type", "Object name"])
-    table.add_row(["Relaxation rate", "'rx'"])
-    table.add_row(["Peak intensities (series)", "'intensities'"])
-    table.add_row(["Initial intensity", "'i0'"])
-    table.add_row(["Intensity at infinity", "'iinf'"])
-    table.add_row(["Relaxation period times (series)", "'relax_times'"])
-    return_data_name_doc.add_table(table.label)
+    _table = uf_tables.add_table(label="table: curve-fit data type 
patterns", caption="Relaxation curve fitting data type string matching 
patterns.")
+    _table.add_headings(["Data type", "Object name"])
+    _table.add_row(["Relaxation rate", "'rx'"])
+    _table.add_row(["Peak intensities (series)", "'intensities'"])
+    _table.add_row(["Initial intensity", "'i0'"])
+    _table.add_row(["Intensity at infinity", "'iinf'"])
+    _table.add_row(["Relaxation period times (series)", "'relax_times'"])
+    return_data_name_doc.add_table(_table.label)
 
 
     def return_error(self, data_id):




Related Messages


Powered by MHonArc, Updated Mon Jun 04 00:40:02 2012