Author: bugman Date: Wed Dec 7 16:34:12 2011 New Revision: 15045 URL: http://svn.gna.org/viewcvs/relax?rev=15045&view=rev Log: Fix for the align_tensor.init user function - the tensor name is no longer stored as an alignment ID. The align_id arg is now used instead, and this prevents problems of multiple tensors defining too many alignment IDs. Modified: branches/frame_order_testing/generic_fns/align_tensor.py Modified: branches/frame_order_testing/generic_fns/align_tensor.py URL: http://svn.gna.org/viewcvs/relax/branches/frame_order_testing/generic_fns/align_tensor.py?rev=15045&r1=15044&r2=15045&view=diff ============================================================================== --- branches/frame_order_testing/generic_fns/align_tensor.py (original) +++ branches/frame_order_testing/generic_fns/align_tensor.py Wed Dec 7 16:34:12 2011 @@ -235,7 +235,9 @@ if tensor: tensors = [tensor] else: - tensors = cdp.align_ids + tensors = [] + for i in range(len(cdp.align_tensors)): + tensors.append(cdp.align_tensors[i].name) # Loop over the tensors. for tensor in tensors: @@ -668,11 +670,12 @@ if domain and (not hasattr(cdp, 'domain') or domain not in cdp.domain.keys()): raise RelaxError("The domain '%s' has not been defined. Please use the domain user function." % domain) - # Add the tensor ID to the current data pipe. - if not hasattr(cdp, 'align_ids'): - cdp.align_ids = [] - if tensor not in cdp.align_ids: - cdp.align_ids.append(tensor) + # Add the align ID to the current data pipe if needed. + if align_id: + if not hasattr(cdp, 'align_ids'): + cdp.align_ids = [] + if align_id not in cdp.align_ids: + cdp.align_ids.append(align_id) # Add the align_tensors object to the data pipe. if not errors: