Author: bugman
Date: Wed Oct 15 13:34:41 2014
New Revision: 26287
URL: http://svn.gna.org/viewcvs/relax?rev=26287&view=rev
Log:
Changed the model-free single spin optimisation title printouts.
The specific_analyses.model_free.optimisation.spin_print() function has been
deleted. It has
instead been replaced by a call to lib.text.sectioning.subtitle(). This is to
match the grid search
setup title printouts and to differentiate these titles from those printed out
by minfx being
underlined by '~' characters.
Modified:
trunk/specific_analyses/model_free/optimisation.py
Modified: trunk/specific_analyses/model_free/optimisation.py
URL:
http://svn.gna.org/viewcvs/relax/trunk/specific_analyses/model_free/optimisation.py?rev=26287&r1=26286&r2=26287&view=diff
==============================================================================
--- trunk/specific_analyses/model_free/optimisation.py (original)
+++ trunk/specific_analyses/model_free/optimisation.py Wed Oct 15 13:34:41 2014
@@ -27,12 +27,14 @@
from minfx.generic import generic_minimise
from minfx.grid import grid, grid_point_array
from numpy import array, dot, float64
+import sys
# relax module imports.
import lib.arg_check
from lib.errors import RelaxError, RelaxInfError, RelaxMultiVectorError,
RelaxNaNError
from lib.float import isNaN, isInf
from lib.periodic_table import periodic_table
+from lib.text.sectioning import subsection
from multi import Memo, Result_command, Slave_command
from pipe_control import pipes
from pipe_control.interatomic import return_interatom_list
@@ -485,25 +487,6 @@
return ri_data, ri_data_err, len(frq), num_ri, ri_labels, frq,
remap_table, noe_r1_table
-def spin_print(spin_id, verbosity):
- """Print out some header text for the spin.
-
- @param spin_id: The spin ID string.
- @type spin_id: str
- @param verbosity: The amount of information to print. The higher the
value, the greater the verbosity.
- @type verbosity: int
- """
-
- # Some extra spacing for verbose printouts.
- if verbosity >= 2:
- print("\n\n")
-
- # The header.
- string = "Fitting to spin " + repr(spin_id)
- print("\n\n" + string)
- print(len(string) * '~')
-
-
class MF_memo(Memo):
"""The model-free memo class.
@@ -568,9 +551,9 @@
# Initialise the function to minimise.
self.mf = Mf(init_params=self.opt_params.param_vector,
model_type=self.data.model_type, diff_type=self.data.diff_type,
diff_params=self.data.diff_params, scaling_matrix=self.data.scaling_matrix,
num_spins=self.data.num_spins, equations=self.data.equations,
param_types=self.data.param_types, param_values=self.data.param_values,
relax_data=self.data.ri_data, errors=self.data.ri_data_err,
bond_length=self.data.r, csa=self.data.csa, num_frq=self.data.num_frq,
frq=self.data.frq, num_ri=self.data.num_ri, remap_table=self.data.remap_table,
noe_r1_table=self.data.noe_r1_table, ri_labels=self.data.ri_types,
gx=self.data.gx, gh=self.data.gh, h_bar=self.data.h_bar, mu0=self.data.mu0,
num_params=self.data.num_params, vectors=self.data.xh_unit_vectors)
- # Print out.
+ # Printout.
if self.opt_params.verbosity >= 1 and (self.data.model_type == 'mf' or
self.data.model_type == 'local_tm'):
- spin_print(self.data.spin_id, self.opt_params.verbosity)
+ subsection(file=sys.stdout, text="Optimisation: Spin '%s'" %
self.data.spin_id, prespace=2, postspace=0)
# Preform optimisation.
results = self.optimise()
_______________________________________________
relax (http://www.nmr-relax.com)
This is the relax-commits mailing list
[email protected]
To unsubscribe from this list, get a password
reminder, or change your subscription options,
visit the list information page at
https://mail.gna.org/listinfo/relax-commits