Author: bugman Date: Sun Nov 25 19:05:37 2007 New Revision: 3936 URL: http://svn.gna.org/viewcvs/relax?rev=3936&view=rev Log: Implemented the function generic_fns.diffusion_tensor.diff_data_exists().
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=3936&r1=3935&r2=3936&view=diff ============================================================================== --- 1.3/generic_fns/diffusion_tensor.py (original) +++ 1.3/generic_fns/diffusion_tensor.py Sun Nov 25 19:05:37 2007 @@ -137,6 +137,29 @@ self.relax.generic.runs.eliminate_unused_runs() +def diff_data_exists(): + """Function for determining if diffusion data exists in the current data pipe. + + @return: The answer to the question. + @type return: bool + """ + + # Alias the current data pipe. + cdp = relax_data_store[relax_data_store.current_pipe] + + # Loop over the objects in the data structure. + for name in cdp.diff_tensor: + # White list names. + if name in white_list: + continue + + # Data exists. + return True + + # No data. + return False + + def display(self, run=None): """Function for displaying the diffusion tensor.""" _______________________________________________ relax (http://nmr-relax.com) This is the relax-commits mailing list relax-commits@gna.org To unsubscribe from this list, get a password reminder, or change your subscription options, visit the list information page at https://mail.gna.org/listinfo/relax-commits