Author: bugman Date: Fri Jan 18 22:34:40 2013 New Revision: 18239 URL: http://svn.gna.org/viewcvs/relax?rev=18239&view=rev Log: Added a backwards compatibility hook for converting alignment tensors. The main trunk alignment tensors as associated with alignment IDs by having the same name, but in this branch there can be multiple tensors per alignment, hence each tensor has an associated ID in addition to the name. The hook duplicates the tensor name into the alignment ID string. Modified: branches/frame_order_testing/data/__init__.py Modified: branches/frame_order_testing/data/__init__.py URL: http://svn.gna.org/viewcvs/relax/branches/frame_order_testing/data/__init__.py?rev=18239&r1=18238&r2=18239&view=diff ============================================================================== --- branches/frame_order_testing/data/__init__.py (original) +++ branches/frame_order_testing/data/__init__.py Fri Jan 18 22:34:40 2013 @@ -285,6 +285,13 @@ if hasattr(spin, name): delattr(spin, name) + # Convert the alignment tensors. + if hasattr(dp, 'align_tensors'): + for i in range(len(dp.align_tensors)): + # Fix for the addition of the alignment ID structure as opposed to the tensor name or tag. + if not hasattr(dp.align_tensors[i], 'align_id'): + dp.align_tensors[i].set('align_id', dp.align_tensors[i].name) + def add(self, pipe_name, pipe_type, bundle=None, switch=True): """Method for adding a new data pipe container to the dictionary.