Author: bugman Date: Thu Apr 11 10:33:20 2013 New Revision: 19450 URL: http://svn.gna.org/viewcvs/relax?rev=19450&view=rev Log: Changed how pipe_control.plotting.assemble_data_seq_value() determines the number of graph sets. Instead of counting the maximum number of spins per residue, different spin names are now checked across the sequence. This is needed as a single residue could have a different type of spin. This was caught by the Mf.test_dauvergne_protocol system test. Modified: trunk/pipe_control/plotting.py Modified: trunk/pipe_control/plotting.py URL: http://svn.gna.org/viewcvs/relax/trunk/pipe_control/plotting.py?rev=19450&r1=19449&r2=19450&view=diff ============================================================================== --- trunk/pipe_control/plotting.py (original) +++ trunk/pipe_control/plotting.py Thu Apr 11 10:33:20 2013 @@ -29,7 +29,7 @@ # relax module imports. from lib.errors import RelaxError from pipe_control import minimise -from pipe_control.mol_res_spin import count_max_spins_per_residue, spin_loop +from pipe_control.mol_res_spin import spin_loop import specific_analyses @@ -254,10 +254,15 @@ x_err_flag = False y_err_flag = False + # Count the different spin types. + spin_names = [] + for spin, mol_name, res_num, res_name, id in spin_loop(full_info=True, selection=spin_id, return_id=True, skip_desel=True): + # A new spin name. + if spin.name not in spin_names: + spin_names.append(spin.name) + # The number of data sets. - set_count = 1 - if x_data_name == 'res_num' or y_data_name == 'res_num': - set_count = count_max_spins_per_residue(spin_id=spin_id) + set_count = len(spin_names) # Expand the data structures for the number of sets. if set_count > 1: @@ -278,12 +283,7 @@ points = 1 # Loop over the spins. - spin_names = [] for spin, mol_name, res_num, res_name, id in spin_loop(full_info=True, selection=spin_id, return_id=True, skip_desel=True): - # A new spin name. - if spin.name not in spin_names: - spin_names.append(spin.name) - # The set index. set_index = spin_names.index(spin.name)