Author: bugman Date: Thu Mar 3 12:01:29 2011 New Revision: 12769 URL: http://svn.gna.org/viewcvs/relax?rev=12769&view=rev Log: Shifted the J(w) mapping and consistency testing create_mc_data() to the common methods. The new method is called _create_mc_relax_data(). Modified: branches/relax_data/specific_fns/api_common.py branches/relax_data/specific_fns/consistency_tests.py branches/relax_data/specific_fns/jw_mapping.py Modified: branches/relax_data/specific_fns/api_common.py URL: http://svn.gna.org/viewcvs/relax/branches/relax_data/specific_fns/api_common.py?rev=12769&r1=12768&r2=12769&view=diff ============================================================================== --- branches/relax_data/specific_fns/api_common.py (original) +++ branches/relax_data/specific_fns/api_common.py Thu Mar 3 12:01:29 2011 @@ -55,6 +55,29 @@ yield spin_id + def _create_mc_relax_data(self, data_id): + """Return the Monte Carlo relaxation data list for the corresponding spin. + + @param data_id: The spin identification string, as yielded by the base_data_loop() generator method. + @type data_id: str + @param sim_data: The Monte Carlo simulation data. + @type sim_data: list of float + """ + + # Get the spin container. + spin = return_spin(data_id) + + # Initialise the data structure. + data = [] + + # Add the data. + for ri_id in cdp.ri_ids: + data.append(spin.ri_data[ri_id]) + + # Return the data. + return data + + def _data_init_dummy(self, data_cont, sim=False): """Dummy method for initialising data structures. Modified: branches/relax_data/specific_fns/consistency_tests.py URL: http://svn.gna.org/viewcvs/relax/branches/relax_data/specific_fns/consistency_tests.py?rev=12769&r1=12768&r2=12769&view=diff ============================================================================== --- branches/relax_data/specific_fns/consistency_tests.py (original) +++ branches/relax_data/specific_fns/consistency_tests.py Thu Mar 3 12:01:29 2011 @@ -44,6 +44,7 @@ # Place methods into the API. self.base_data_loop = self._base_data_loop_spin + self.create_mc_data = self._create_mc_relax_data self.model_loop = self._model_loop_spin self.return_conversion_factor = self._return_no_conversion_factor self.return_error = self._return_error_relax_data @@ -197,21 +198,6 @@ spin.f_eta_sim.append(f_eta) spin.f_r2_sim.append(f_r2) - - def create_mc_data(self, data_id=None): - """Return the Monte Carlo Ri data structure for the corresponding spin. - - @keyword data_id: The spin identification string, as yielded by the base_data_loop() generator method. - @type data_id: str - @return: The Monte Carlo simulation data. - @rtype: list of floats - """ - - # Get the spin container. - spin = return_spin(data_id) - - # Return the data. - return spin.ri_data def data_init(self, data_cont, sim=False): Modified: branches/relax_data/specific_fns/jw_mapping.py URL: http://svn.gna.org/viewcvs/relax/branches/relax_data/specific_fns/jw_mapping.py?rev=12769&r1=12768&r2=12769&view=diff ============================================================================== --- branches/relax_data/specific_fns/jw_mapping.py (original) +++ branches/relax_data/specific_fns/jw_mapping.py Thu Mar 3 12:01:29 2011 @@ -43,6 +43,7 @@ # Place methods into the API. self.base_data_loop = self._base_data_loop_spin + self.create_mc_data = self._create_mc_relax_data self.model_loop = self._model_loop_spin self.return_conversion_factor = self._return_no_conversion_factor self.return_error = self._return_error_relax_data @@ -187,22 +188,6 @@ spin.j0_sim.append(j0) spin.jwx_sim.append(jwx) spin.jwh_sim.append(jwh) - - - def create_mc_data(self, data_id=None): - """Return the Monte Carlo Ri data structure for the corresponding spin. - - @keyword data_id: The spin identification string, as yielded by the base_data_loop() generator method. - @type data_id: str - @return: The Monte Carlo simulation data. - @rtype: list of floats - """ - - # Get the spin container. - spin = return_spin(data_id) - - # Return the data. - return spin.ri_data def data_init(self, data_cont, sim=False):