Author: bugman Date: Thu Aug 7 22:47:31 2008 New Revision: 7097 URL: http://svn.gna.org/viewcvs/relax?rev=7097&view=rev Log: Updated create_mc_data() and sim_pack_data() to accept the spin_id yielded by base_data_loop(). Modified: 1.3/specific_fns/relax_fit.py Modified: 1.3/specific_fns/relax_fit.py URL: http://svn.gna.org/viewcvs/relax/1.3/specific_fns/relax_fit.py?rev=7097&r1=7096&r2=7097&view=diff ============================================================================== --- 1.3/specific_fns/relax_fit.py (original) +++ 1.3/specific_fns/relax_fit.py Thu Aug 7 22:47:31 2008 @@ -35,7 +35,7 @@ from dep_check import C_module_exp_fn from base_class import Common_functions from generic_fns import intensity -from generic_fns.mol_res_spin import count_spins, exists_mol_res_spin_data, generate_spin_id, return_spin_from_index, spin_loop +from generic_fns.mol_res_spin import count_spins, exists_mol_res_spin_data, generate_spin_id, return_spin, return_spin_from_index, spin_loop from minfx.generic import generic_minimise from relax_errors import RelaxError, RelaxFuncSetupError, RelaxLenError, RelaxNoModelError, RelaxNoPipeError, RelaxNoSequenceError @@ -203,17 +203,21 @@ return results[relax_time_index] - def create_mc_data(self, spin): + def create_mc_data(self, spin_id): """Create the Monte Carlo peak intensity data. - @param spin: The spin container. - @type spin: SpinContainer instance + @param spin_id: The spin identification string, as yielded by the base_data_loop() generator + method. + @type spin_id: str @return: The Monte Carlo simulation data. @rtype: list of floats """ # Initialise the MC data data structure. mc_data = [] + + # Get the spin container. + spin = return_spin(spin_id) # Skip deselected spins. if not spin.select: @@ -1195,14 +1199,18 @@ spin.select_sim = select_sim - def sim_pack_data(self, spin, sim_data): + def sim_pack_data(self, spin_id, sim_data): """Pack the Monte Carlo simulation data. - @param spin: The spin container. - @type spin: SpinContainer instance + @param spin_id: The spin identification string, as yielded by the base_data_loop() + generator method. + @type spin_id: str @param sim_data: The Monte Carlo simulation data. @type sim_data: list of float """ + + # Get the spin container. + spin = return_spin(spin_id) # Test if the simulation data already exists. if hasattr(spin, 'sim_intensities'):