Author: bugman Date: Fri Jun 19 16:39:03 2009 New Revision: 9106 URL: http://svn.gna.org/viewcvs/relax?rev=9106&view=rev Log: Modified the reduction() function to store alignment tensor indices rather than names. Modified: branches/frame_order/generic_fns/align_tensor.py Modified: branches/frame_order/generic_fns/align_tensor.py URL: http://svn.gna.org/viewcvs/relax/branches/frame_order/generic_fns/align_tensor.py?rev=9106&r1=9105&r2=9106&view=diff ============================================================================== --- branches/frame_order/generic_fns/align_tensor.py (original) +++ branches/frame_order/generic_fns/align_tensor.py Fri Jun 19 16:39:03 2009 @@ -834,14 +834,21 @@ # Alias the current data pipe. cdp = pipes.get_pipe() - # Test the tensor names. + # Tensor information. match_from = False match_to = False + i = 0 for tensor_cont in cdp.align_tensors: + # Test the tensor names. if tensor_cont.name == from_tensor: match_from = True + index_from = i if tensor_cont.name == to_tensor: match_to = True + index_to = i + + # Increment. + i = i + 1 # No match. if not match_from: @@ -852,7 +859,7 @@ # Store. if not hasattr(cdp.align_tensors, 'reduction'): cdp.align_tensors.reduction = [] - cdp.align_tensors.reduction.append([from_tensor, to_tensor]) + cdp.align_tensors.reduction.append([index_from, index_to]) def return_conversion_factor(param):