Author: bugman Date: Thu Jul 17 17:31:50 2014 New Revision: 24559 URL: http://svn.gna.org/viewcvs/relax?rev=24559&view=rev Log: Implemented get_param_names() and get_param_values() for the relaxation curve-fitting analysis. These are part of the specific analysis API. Modified: branches/zooming_grid_search/specific_analyses/relax_fit/api.py Modified: branches/zooming_grid_search/specific_analyses/relax_fit/api.py URL: http://svn.gna.org/viewcvs/relax/branches/zooming_grid_search/specific_analyses/relax_fit/api.py?rev=24559&r1=24558&r2=24559&view=diff ============================================================================== --- branches/zooming_grid_search/specific_analyses/relax_fit/api.py (original) +++ branches/zooming_grid_search/specific_analyses/relax_fit/api.py Thu Jul 17 17:31:50 2014 @@ -134,6 +134,37 @@ # If the name is not in 'data_cont', add it. if not hasattr(data_cont, name): setattr(data_cont, name, init_data) + + + def get_param_names(self, model_info=None): + """Return a vector of parameter names. + + @keyword model_info: The spin container and the spin ID string from the _model_loop_spin() method. + @type model_info: SpinContainer instance, str + @return: The vector of parameter names. + @rtype: list of str + """ + + # Simply return the two parameter names. + return ['rx', 'i0'] + + + def get_param_values(self, model_info=None, sim_index=None): + """Return a vector of parameter values. + + @keyword model_info: The spin container and the spin ID string from the _model_loop_spin() method. + @type model_info: SpinContainer instance, str + @keyword sim_index: The optional Monte Carlo simulation index. + @type sim_index: int + @return: The vector of parameter values. + @rtype: list of str + """ + + # Unpack the data. + spin, spin_id = model_info + + # Return the vector. + return assemble_param_vector(spin=spin, sim_index=sim_index) def grid_search(self, lower=None, upper=None, inc=None, constraints=True, verbosity=1, sim_index=None):