Author: bugman Date: Mon Jan 7 15:52:55 2008 New Revision: 4430 URL: http://svn.gna.org/viewcvs/relax?rev=4430&view=rev Log: Bug fix for the read() and test_labels() methods of the specific_fns.relax_data.Rx_data class.
The arguments are not placed into self! Modified: 1.3/specific_fns/relax_data.py Modified: 1.3/specific_fns/relax_data.py URL: http://svn.gna.org/viewcvs/relax/1.3/specific_fns/relax_data.py?rev=4430&r1=4429&r2=4430&view=diff ============================================================================== --- 1.3/specific_fns/relax_data.py (original) +++ 1.3/specific_fns/relax_data.py Mon Jan 7 15:52:55 2008 @@ -547,9 +547,9 @@ if not exists_mol_res_spin_data(): raise RelaxNoSequenceError - # Test if relaxation data corresponding to 'self.ri_label' and 'self.frq_label' already exists. - if self.test_labels(): - raise RelaxRiError, (self.ri_label, self.frq_label) + # Test if relaxation data corresponding to 'ri_label' and 'frq_label' already exists. + if self.test_labels(ri_label, frq_label): + raise RelaxRiError, (ri_label, frq_label) # Minimum number of columns. min_col_num = max(mol_name_col, res_num_col, res_name_col, spin_num_col, spin_name_col, data_col, error_col) @@ -666,8 +666,8 @@ return value, error - def test_labels(self): - """Test if data corresponding to 'self.ri_label' and 'self.frq_label' currently exists. + def test_labels(self, ri_label, frq_label): + """Test if data corresponding to 'ri_label' and 'frq_label' currently exists. @return: The answer to the question of whether relaxation data exists corresponding to the given labels. @@ -682,8 +682,8 @@ # Loop over the relaxation data. for j in xrange(spin.num_ri): - # Test if the relaxation data matches 'self.ri_label' and 'self.frq_label'. - if self.ri_label == spin.ri_labels[j] and self.frq_label == spin.frq_labels[spin.remap_table[j]]: + # Test if the relaxation data matches 'ri_label' and 'frq_label'. + if ri_label == spin.ri_labels[j] and frq_label == spin.frq_labels[spin.remap_table[j]]: return True # No match. _______________________________________________ relax (http://nmr-relax.com) This is the relax-commits mailing list relax-commits@gna.org 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