Author: bugman Date: Wed Mar 26 18:38:41 2014 New Revision: 22544 URL: http://svn.gna.org/viewcvs/relax?rev=22544&view=rev Log: Changed the Noe analysis sample script to properly handle the peak intensity Grace plots. This relates to bug #21863 (https://gna.org/bugs/?21863), the grace.write user function not being able to write ref/sat plots as described in sample script noe.py. Instead of trying to produce the 'ref.agr' and 'sat.agr' files for the non-existent 'ref' and 'sat' parameters, instead the 'intensities.agr' file is being produced for the peak intensity parameter. The reference and saturated intensities will appear as two graph sets within that plot. These changes match those of the test suite. Modified: trunk/docs/latex/noe.tex trunk/sample_scripts/noe.py Modified: trunk/docs/latex/noe.tex URL: http://svn.gna.org/viewcvs/relax/trunk/docs/latex/noe.tex?rev=22544&r1=22543&r2=22544&view=diff ============================================================================== --- trunk/docs/latex/noe.tex (original) +++ trunk/docs/latex/noe.tex Wed Mar 26 18:38:41 2014 @@ -84,13 +84,11 @@ value.write(param='noe', file='noe.out', force=True) # Create Grace files. -grace.write(y_data_type='ref', file='ref.agr', force=True) -grace.write(y_data_type='sat', file='sat.agr', force=True) +grace.write(y_data_type='intensities', file='intensities.agr', force=True) grace.write(y_data_type='noe', file='noe.agr', force=True) # View the Grace files. -grace.view(file='ref.agr') -grace.view(file='sat.agr') +grace.view(file='intensities.agr') grace.view(file='noe.agr') # Write the results. @@ -317,32 +315,23 @@ Any two dimensional data set can be plotted in relax in conjunction with the program \href{http://plasma-gate.weizmann.ac.il/Grace/}{Grace}\index{software!Grace|textbf}. The program is also known as Xmgrace and was previously known as ACE/gr or Xmgr. The highly flexible relax user function \uf{grace\ufsep{}write} is capable of producing 2D plots of any x-y data sets. -The three commands +The two commands \begin{lstlisting}[firstnumber=41] # Create Grace files. -grace.write(y_data_type='ref', file='ref.agr', force=True) -grace.write(y_data_type='sat', file='sat.agr', force=True) +grace.write(y_data_type='intensities', file='intensities.agr', force=True) grace.write(y_data_type='noe', file='noe.agr', force=True) \end{lstlisting} -will create three separate plots of the peak intensity of the reference and saturated spectra as well as the NOE. +will create one plot of the peak intensity of the reference and saturated spectra as different graph sets in the same plot as well as one plot for the NOE and its error. The x-axis in all three defaults to the residue number. -As the x and y-axes can be any parameter the command - -\begin{lstlisting}[numbers=none] -grace.write(x_data_type='ref', y_data_type='sat', file='ref_vs_sat.agr', force=True) -\end{lstlisting} - -would create a plot of the reference verses the saturated intensity with one point per residue. -Returning to the sample script three Grace data files are created \file{ref.agr}, \file{sat.agr}, and \file{noe.agr} and placed in the default directory \directory{.\ossep{}grace}. +Returning to the sample script three Grace data files are created \file{intensities.agr} and \file{noe.agr} and placed in the default directory \directory{.\ossep{}grace}. These can be visualised by opening the file within Grace. However relax will do that for you with the commands -\begin{lstlisting}[firstnumber=46] +\begin{lstlisting}[firstnumber=45] # View the Grace files. -grace.view(file='ref.agr') -grace.view(file='sat.agr') +grace.view(file='intensities.agr') grace.view(file='noe.agr') \end{lstlisting} Modified: trunk/sample_scripts/noe.py URL: http://svn.gna.org/viewcvs/relax/trunk/sample_scripts/noe.py?rev=22544&r1=22543&r2=22544&view=diff ============================================================================== --- trunk/sample_scripts/noe.py (original) +++ trunk/sample_scripts/noe.py Wed Mar 26 18:38:41 2014 @@ -1,6 +1,6 @@ ############################################################################### # # -# Copyright (C) 2004-2013 Edward d'Auvergne # +# Copyright (C) 2004-2014 Edward d'Auvergne # # # # This file is part of the program relax (http://www.nmr-relax.com). # # # @@ -59,13 +59,11 @@ value.write(param='noe', file='noe.out', force=True) # Create grace files. -grace.write(y_data_type='ref', file='ref.agr', force=True) -grace.write(y_data_type='sat', file='sat.agr', force=True) +grace.write(y_data_type='intensities', file='intensities.agr', force=True) grace.write(y_data_type='noe', file='noe.agr', force=True) # View the grace files. -grace.view(file='ref.agr') -grace.view(file='sat.agr') +grace.view(file='intensities.agr') grace.view(file='noe.agr') # Write the results.