Author: bugman Date: Tue Aug 12 15:15:52 2008 New Revision: 7182 URL: http://svn.gna.org/viewcvs/relax?rev=7182&view=rev Log: Modified the display() function to allow all alignment tensors to be displayed. Modified: branches/rdc_analysis/generic_fns/align_tensor.py Modified: branches/rdc_analysis/generic_fns/align_tensor.py URL: http://svn.gna.org/viewcvs/relax/branches/rdc_analysis/generic_fns/align_tensor.py?rev=7182&r1=7181&r2=7182&view=diff ============================================================================== --- branches/rdc_analysis/generic_fns/align_tensor.py (original) +++ branches/rdc_analysis/generic_fns/align_tensor.py Tue Aug 12 15:15:52 2008 @@ -190,11 +190,29 @@ """Function for displaying the alignment tensor. @param tensor: The alignment tensor identification string. - @type tensor: str + @type tensor: str or None """ # Test if the current data pipe exists. pipes.test(ds.current_pipe) + + # All tensors. + if tensor == None: + # Loop over the tensors. + for tensor in ds[ds.current_pipe].align_tensors: + # Header. + print "Tensor: " + tensor.name + "\n" + + # The parameter set {Axx, Ayy, Axy, Axz, Ayz}. + print "Parameters {Axx, Ayy, Axy, Axz, Ayz}." + print "%-15s%15.8f" % ("Axx: ", tensor.Axx) + print "%-15s%15.8f" % ("Ayy: ", tensor.Ayy) + print "%-15s%15.8f" % ("Axy: ", tensor.Axy) + print "%-15s%15.8f" % ("Axz: ", tensor.Axz) + print "%-15s%15.8f" % ("Ayz: ", tensor.Ayz) + + # Leave this function. + return # Test if alignment tensor data exists. if not align_data_exists(tensor):