Author: bugman Date: Thu Nov 29 09:02:29 2007 New Revision: 4127 URL: http://svn.gna.org/viewcvs/relax?rev=4127&view=rev Log: Updated the generic_fns.align_tensor.align_data_exists() function to use the 'tensor' key. Modified: branches/N_state_model/generic_fns/align_tensor.py Modified: branches/N_state_model/generic_fns/align_tensor.py URL: http://svn.gna.org/viewcvs/relax/branches/N_state_model/generic_fns/align_tensor.py?rev=4127&r1=4126&r2=4127&view=diff ============================================================================== --- branches/N_state_model/generic_fns/align_tensor.py (original) +++ branches/N_state_model/generic_fns/align_tensor.py Thu Nov 29 09:02:29 2007 @@ -33,9 +33,11 @@ from relax_errors import RelaxError, RelaxNoPipeError, RelaxNoTensorError, RelaxStrError, RelaxTensorError, RelaxUnknownParamCombError, RelaxUnknownParamError -def align_data_exists(pipe=None): +def align_data_exists(tensor, pipe=None): """Function for determining if alignment data exists in the current data pipe. + @param tensor: The alignment tensor identification string. + @type tensor: str @param pipe: The data pipe to search for data in. @type pipe: str @return: The answer to the question. @@ -47,7 +49,7 @@ pipe = relax_data_store.current_pipe # Test if Axy exists. - if hasattr(relax_data_store[pipe], 'align_tensor'): + if hasattr(relax_data_store[pipe], 'align_tensor') and relax_data_store[pipe].align_tensor.has_key(tensor): return True else: return False