Author: bugman Date: Thu Apr 11 09:46:03 2013 New Revision: 19449 URL: http://svn.gna.org/viewcvs/relax?rev=19449&view=rev Log: Merged revisions 19442-19448 via svnmerge from svn+ssh://bugman@xxxxxxxxxxx/svn/relax/trunk ........ r19442 | bugman | 2013-04-10 19:44:37 +0200 (Wed, 10 Apr 2013) | 6 lines Added a link to the PDF user manual from the HTML user manual. This will affect all pages at http://www.nmr-relax.com/manual/ by adding an icon to the navigation bar pointing to the PDF manual at http://download.gna.org/relax/manual/relax.pdf. ........ r19443 | bugman | 2013-04-11 09:30:16 +0200 (Thu, 11 Apr 2013) | 5 lines Bug fix for the new pipe_control.mol_res_spin.count_max_spins_per_residue() function. This function, introduced at r19403, was not returning the correct variable. ........ r19444 | bugman | 2013-04-11 09:31:49 +0200 (Thu, 11 Apr 2013) | 6 lines The plotting of residue or spin numbers verses values now handles multiple spin types properly. This is in the pipe_control.plotting.assemble_data_seq_value() function. The spin name is being used to identify different spin types for the graph sets. ........ r19445 | bugman | 2013-04-11 09:32:57 +0200 (Thu, 11 Apr 2013) | 5 lines Fix for the Noe.test_noe_analysis system test. The set labels are now different in that they no longer end in '. '. ........ r19446 | bugman | 2013-04-11 09:40:53 +0200 (Thu, 11 Apr 2013) | 5 lines The pipe_control.mol_res_spin.count_max_spins_per_residue() function now accepts a spin ID argument. This can be used to restrict the spins to count. ........ r19447 | bugman | 2013-04-11 09:42:37 +0200 (Thu, 11 Apr 2013) | 5 lines The spin ID string is now being used by the plotting functions. The spin ID was not being passed into the assemble_data_*() functions. ........ r19448 | bugman | 2013-04-11 09:42:58 +0200 (Thu, 11 Apr 2013) | 3 lines Removed a debugging printout. ........ Modified: branches/relax_disp/ (props changed) branches/relax_disp/docs/latex/relax.tex branches/relax_disp/pipe_control/mol_res_spin.py branches/relax_disp/pipe_control/plotting.py branches/relax_disp/test_suite/system_tests/noe.py Propchange: branches/relax_disp/ ------------------------------------------------------------------------------ --- svnmerge-integrated (original) +++ svnmerge-integrated Thu Apr 11 09:46:03 2013 @@ -1,1 +1,1 @@ -/trunk:1-19434 +/trunk:1-19448 Modified: branches/relax_disp/docs/latex/relax.tex URL: http://svn.gna.org/viewcvs/relax/branches/relax_disp/docs/latex/relax.tex?rev=19449&r1=19448&r2=19449&view=diff ============================================================================== --- branches/relax_disp/docs/latex/relax.tex (original) +++ branches/relax_disp/docs/latex/relax.tex Thu Apr 11 09:46:03 2013 @@ -106,6 +106,7 @@ % latex2html stuff. \usepackage{html} +\htmladdtonavigation{\htmladdnormallink{\htmladdimg{http://www.nmr-relax.com/images/pdf_icon_nav.png}}{http://download.gna.org/relax/manual/relax.pdf}} \htmladdtonavigation{\htmladdnormallink{\htmladdimg{http://www.nmr-relax.com/images/relax_logo_nav.png}}{http://www.nmr-relax.com}} % Make the index. Modified: branches/relax_disp/pipe_control/mol_res_spin.py URL: http://svn.gna.org/viewcvs/relax/branches/relax_disp/pipe_control/mol_res_spin.py?rev=19449&r1=19448&r2=19449&view=diff ============================================================================== --- branches/relax_disp/pipe_control/mol_res_spin.py (original) +++ branches/relax_disp/pipe_control/mol_res_spin.py Thu Apr 11 09:46:03 2013 @@ -417,11 +417,13 @@ status.spin_lock.release(sys._getframe().f_code.co_name) -def count_max_spins_per_residue(pipe=None, skip_desel=True): +def count_max_spins_per_residue(pipe=None, spin_id=None, skip_desel=True): """Determine the maximum number of spins present per residue. @keyword pipe: The data pipe containing the spin. Defaults to the current data pipe. @type pipe: str + @param spin_id: The molecule, residue, and spin identifier string. + @type spin_id: str @keyword skip_desel: A flag which if true will cause deselected spins to be skipped in the count. @type skip_desel: bool @return: The number of non-empty spins. @@ -444,6 +446,9 @@ # Get the data pipe. dp = pipes.get_pipe(pipe) + + # Parse the selection string. + select_obj = Selection(spin_id) # Loop over the molecules. for mol in dp.mol: @@ -454,6 +459,10 @@ # Loop over the spins. for spin in res.spin: + # Skip the spin if there is no match to the selection. + if not select_obj.contains_spin(spin_num=spin.num, spin_name=spin.name, res_num=res.num, res_name=res.name, mol=mol.name): + continue + # Skip deselected spins. if skip_desel and not spin.select: continue @@ -465,7 +474,7 @@ max_num = max(max_num, spin_num) # Return the maximum number of spins. - return spin_num + return max_num def count_molecules(selection=None, pipe=None): Modified: branches/relax_disp/pipe_control/plotting.py URL: http://svn.gna.org/viewcvs/relax/branches/relax_disp/pipe_control/plotting.py?rev=19449&r1=19448&r2=19449&view=diff ============================================================================== --- branches/relax_disp/pipe_control/plotting.py (original) +++ branches/relax_disp/pipe_control/plotting.py Thu Apr 11 09:46:03 2013 @@ -61,13 +61,13 @@ # Assemble the different graph data structures. if graph_type == 'seq-value': - data, set_labels, x_err_flag, y_err_flag = assemble_data_seq_value(x_data_name=x_data_name, y_data_name=y_data_name, plot_data=plot_data) + data, set_labels, x_err_flag, y_err_flag = assemble_data_seq_value(spin_id=spin_id, x_data_name=x_data_name, y_data_name=y_data_name, plot_data=plot_data) elif graph_type == 'value-value': - data, set_labels, x_err_flag, y_err_flag = assemble_data_scatter(x_data_name=x_data_name, y_data_name=y_data_name, plot_data=plot_data) + data, set_labels, x_err_flag, y_err_flag = assemble_data_scatter(spin_id=spin_id, x_data_name=x_data_name, y_data_name=y_data_name, plot_data=plot_data) elif graph_type == 'seq-series': - data, set_labels, x_err_flag, y_err_flag = assemble_data_seq_series(x_data_name=x_data_name, y_data_name=y_data_name, plot_data=plot_data, x_type=x_type, y_type=y_type) + data, set_labels, x_err_flag, y_err_flag = assemble_data_seq_series(spin_id=spin_id, x_data_name=x_data_name, y_data_name=y_data_name, plot_data=plot_data, x_type=x_type, y_type=y_type) elif graph_type == 'series-series': - data, set_labels, x_err_flag, y_err_flag = assemble_data_series_series(x_data_name=x_data_name, y_data_name=y_data_name, plot_data=plot_data, x_type=x_type, y_type=y_type) + data, set_labels, x_err_flag, y_err_flag = assemble_data_series_series(spin_id=spin_id, x_data_name=x_data_name, y_data_name=y_data_name, plot_data=plot_data, x_type=x_type, y_type=y_type) else: raise RelaxError("Unknown graph type '%s'." % graph_type) @@ -257,7 +257,7 @@ # 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() + set_count = count_max_spins_per_residue(spin_id=spin_id) # Expand the data structures for the number of sets. if set_count > 1: @@ -278,7 +278,15 @@ 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) + # Loop over the data points (for simulations). for i in range(points): # The X and Y data. @@ -296,11 +304,11 @@ y_err_flag = True # Append the data. - data[0][0].append([x_val, y_val]) + data[0][set_index].append([x_val, y_val]) if x_err_flag: - data[0][0][-1].append(x_err) + data[0][set_index][-1].append(x_err) if y_err_flag: - data[0][0][-1].append(y_err) + data[0][set_index][-1].append(y_err) # Return the data. return data, set_labels, x_err_flag, y_err_flag Modified: branches/relax_disp/test_suite/system_tests/noe.py URL: http://svn.gna.org/viewcvs/relax/branches/relax_disp/test_suite/system_tests/noe.py?rev=19449&r1=19448&r2=19449&view=diff ============================================================================== --- branches/relax_disp/test_suite/system_tests/noe.py (original) +++ branches/relax_disp/test_suite/system_tests/noe.py Thu Apr 11 09:46:03 2013 @@ -102,14 +102,14 @@ '@ s0 errorbar size 0.5\n', '@ s0 errorbar linewidth 0.5\n', '@ s0 errorbar riser linewidth 0.5\n', - '@ s0 legend "N spins. "\n', + '@ s0 legend "N spins"\n', '@ s1 symbol 2\n', '@ s1 symbol size 0.45\n', '@ s1 symbol linewidth 0.5\n', '@ s1 errorbar size 0.5\n', '@ s1 errorbar linewidth 0.5\n', '@ s1 errorbar riser linewidth 0.5\n', - '@ s1 legend "NE1 spins. "\n', + '@ s1 legend "NE1 spins"\n', '@target G0.S0\n', '@type xydy\n', '4 0.033980647852827 0.020203299032766 \n',