Author: bugman Date: Sun Nov 25 23:52:27 2007 New Revision: 3984 URL: http://svn.gna.org/viewcvs/relax?rev=3984&view=rev Log: Extended generic_fns.diffusion_tensor.diff_data_exists() to accept an arbitrary data pipe as an arg. Modified: 1.3/generic_fns/diffusion_tensor.py Modified: 1.3/generic_fns/diffusion_tensor.py URL: http://svn.gna.org/viewcvs/relax/1.3/generic_fns/diffusion_tensor.py?rev=3984&r1=3983&r2=3984&view=diff ============================================================================== --- 1.3/generic_fns/diffusion_tensor.py (original) +++ 1.3/generic_fns/diffusion_tensor.py Sun Nov 25 23:52:27 2007 @@ -150,21 +150,21 @@ relax_data_store[relax_data_store.current_pipe].diff_tensor = DiffTensorData() -def diff_data_exists(): +def diff_data_exists(pipe=None): """Function for determining if diffusion data exists in the current data pipe. + @param pipe: The data pipe to search for data in. + @type pipe: str @return: The answer to the question. @type return: bool """ - # Alias the current data pipe. - cdp = relax_data_store[relax_data_store.current_pipe] - - # White list objects. - white_list = [] + # The data pipe to check. + if pipe == None: + pipe = relax_data_store.current_pipe # Test if tm exists. - if hasattr(cdp.diff_tensor, 'tm'): + if hasattr(relax_data_store[pipe].diff_tensor, 'tm'): return True else: return False