Author: bugman Date: Wed Mar 10 17:39:33 2010 New Revision: 10965 URL: http://svn.gna.org/viewcvs/relax?rev=10965&view=rev Log: Fixes for the back_calc() method. The find_index() function was already defined (so renamed to find_ri_index()), and the analysis specific API back_calc_ri() method was incorrectly called. Modified: 1.3/generic_fns/relax_data.py Modified: 1.3/generic_fns/relax_data.py URL: http://svn.gna.org/viewcvs/relax/1.3/generic_fns/relax_data.py?rev=10965&r1=10964&r2=10965&view=diff ============================================================================== --- 1.3/generic_fns/relax_data.py (original) +++ 1.3/generic_fns/relax_data.py Wed Mar 10 17:39:33 2010 @@ -1,6 +1,6 @@ ############################################################################### # # -# Copyright (C) 2003-2009 Edward d'Auvergne # +# Copyright (C) 2003-2010 Edward d'Auvergne # # # # This file is part of the program relax. # # # @@ -29,7 +29,7 @@ # relax module imports. from data import Relax_data_store; ds = Relax_data_store() -from generic_fns.mol_res_spin import create_spin, exists_mol_res_spin_data, generate_spin_id, return_spin, spin_index_loop, spin_loop +from generic_fns.mol_res_spin import create_spin, exists_mol_res_spin_data, find_index, generate_spin_id, return_spin, spin_index_loop, spin_loop from generic_fns import pipes from generic_fns import value from relax_errors import RelaxError, RelaxNoRiError, RelaxNoSequenceError, RelaxNoSpinError, RelaxRiError @@ -196,7 +196,7 @@ update_data_structures_spin(spin, ri_label, frq_label, frq) # Back-calculate the relaxation value. - value = back_calculate(spin=spin_index, ri_label=ri_label, frq_label=frq_label, frq=frq) + value = back_calculate(spin_index=spin_index, ri_label=ri_label, frq_label=frq_label, frq=frq) # Update all data structures. update_data_structures_spin(spin, ri_label, frq_label, frq, value) @@ -278,7 +278,7 @@ spin_to = dp_to.mol[mol_index].res[res_index].spin[spin_index] # Find the index corresponding to 'ri_label' and 'frq_label'. - index = find_index(spin_from, ri_label, frq_label) + index = find_ri_index(spin_from, ri_label, frq_label) # Catch any problems. if index == None: @@ -426,7 +426,7 @@ global_flag = False # Find the index corresponding to 'ri_label' and 'frq_label'. - index = find_index(spin, ri_label, frq_label) + index = find_ri_index(spin, ri_label, frq_label) # Catch any problems. if index == None: @@ -488,7 +488,7 @@ value.write_data(param=(ri_label, frq_label), file=sys.stdout, return_value=return_value) -def find_index(data, ri_label, frq_label): +def find_ri_index(data, ri_label, frq_label): """Find the index corresponding to ri_label and frq_label. @param data: The class instance containing the ri_label and frq_label variables. @@ -700,7 +700,7 @@ error = None # Find the index corresponding to 'ri_label' and 'frq_label'. - index = find_index(spin, ri_label, frq_label) + index = find_ri_index(spin, ri_label, frq_label) # Get the data. if index != None: @@ -822,7 +822,7 @@ data_init(spin, global_flag=False) # Find the index corresponding to 'ri_label' and 'frq_label'. - index = find_index(spin, ri_label, frq_label) + index = find_ri_index(spin, ri_label, frq_label) # Append empty data. if index == None: