Author: bugman
Date: Fri Sep 12 09:54:31 2014
New Revision: 25764
URL: http://svn.gna.org/viewcvs/relax?rev=25764&view=rev
Log:
Modified the frame order check_pivot() function to operate on any data pipe.
The function now accepts the pipe_name argument so that checks can happen on
any data pipe.
Modified:
branches/frame_order_cleanup/specific_analyses/frame_order/checks.py
Modified: branches/frame_order_cleanup/specific_analyses/frame_order/checks.py
URL:
http://svn.gna.org/viewcvs/relax/branches/frame_order_cleanup/specific_analyses/frame_order/checks.py?rev=25764&r1=25763&r2=25764&view=diff
==============================================================================
--- branches/frame_order_cleanup/specific_analyses/frame_order/checks.py
(original)
+++ branches/frame_order_cleanup/specific_analyses/frame_order/checks.py
Fri Sep 12 09:54:31 2014
@@ -26,14 +26,23 @@
from lib.errors import RelaxError
-def check_pivot():
+def check_pivot(pipe_name=None):
"""Check that the pivot point has been set.
+ @keyword pipe_name: The data pipe to check the pivot for. This defaults
to the current data pipe if not set.
+ @type pipe_name: str
@raises RelaxError: If the pivot point has not been set.
"""
+ # The data pipe.
+ if pipe_name == None:
+ pipe_name = pipes.cdp_name()
+
+ # Get the data pipe.
+ dp = pipes.get_pipe(pipe_name)
+
# Check for the pivot_x parameter.
- if not hasattr(cdp, 'pivot_x'):
+ if not hasattr(dp, 'pivot_x'):
raise RelaxError("The pivot point has not been set, please use the
frame_order.pivot user function to define the point.")
_______________________________________________
relax (http://www.nmr-relax.com)
This is the relax-commits mailing list
[email protected]
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