Author: bugman Date: Wed Jun 20 15:49:26 2012 New Revision: 17007 URL: http://svn.gna.org/viewcvs/relax?rev=17007&view=rev Log: The relax_data.read user function now prints out all of the data read in. This is to better inform the user that something has happened. Modified: branches/interatomic/generic_fns/relax_data.py Modified: branches/interatomic/generic_fns/relax_data.py URL: http://svn.gna.org/viewcvs/relax/branches/interatomic/generic_fns/relax_data.py?rev=17007&r1=17006&r2=17007&view=diff ============================================================================== --- branches/interatomic/generic_fns/relax_data.py (original) +++ branches/interatomic/generic_fns/relax_data.py Wed Jun 20 15:49:26 2012 @@ -41,7 +41,7 @@ from generic_fns import value from physical_constants import element_from_isotope, number_from_isotope from relax_errors import RelaxError, RelaxMultiSpinIDError, RelaxNoRiError, RelaxNoSequenceError, RelaxNoSpinError, RelaxRiError -from relax_io import read_spin_data +from relax_io import read_spin_data, write_data from relax_warnings import RelaxWarning import specific_fns @@ -828,6 +828,7 @@ select_obj = Selection(spin_id) # Loop over the spin data. + data = [] for i in range(N): # Get the corresponding spin container. mol_names, res_nums, res_names, spins = return_spin(spin_ids[i], full_info=True, multi=True) @@ -842,8 +843,6 @@ new_spins.append(spin) spins = new_spins - # Create spin IDs for all remaining spins (for the error message). - # Check that only a singe spin is present. if len(spins) > 1: raise RelaxMultiSpinIDError(spin_ids[i]) @@ -865,6 +864,12 @@ # Update all data structures. spin.ri_data[ri_id] = values[i] spin.ri_data_err[ri_id] = errors[i] + + # Append the data for printing out. + data.append([spin_ids[i], repr(values[i]), repr(errors[i])]) + + # Print out. + write_data(out=sys.stdout, headings=["Spin_ID", "Value", "Error"], data=data) def peak_intensity_type(ri_id=None, type=None):