Author: bugman Date: Thu Sep 5 12:33:19 2013 New Revision: 20834 URL: http://svn.gna.org/viewcvs/relax?rev=20834&view=rev Log: Added some functions to specific_analyses.relax_disp.disp_data for checking if certain experiments exist. These are the has_cpmg_exp_type() and has_r1rho_exp_type() functions. Modified: branches/relax_disp/specific_analyses/relax_disp/disp_data.py Modified: branches/relax_disp/specific_analyses/relax_disp/disp_data.py URL: http://svn.gna.org/viewcvs/relax/branches/relax_disp/specific_analyses/relax_disp/disp_data.py?rev=20834&r1=20833&r2=20834&view=diff ============================================================================== --- branches/relax_disp/specific_analyses/relax_disp/disp_data.py (original) +++ branches/relax_disp/specific_analyses/relax_disp/disp_data.py Thu Sep 5 12:33:19 2013 @@ -293,6 +293,22 @@ return curve_type +def has_cpmg_exp_type(): + """Determine if the current data pipe contains CPMG experiment types. + + @return: True if CPMG experiment types exist, False otherwise. + @rtype: bool + """ + + # Loop over all experiment types. + for exp_type in cdp.exp_type_list: + if exp_type in EXP_TYPE_LIST_CPMG: + return True + + # No CPMG experiment types. + return False + + def has_exponential_exp_type(): """Determine if the current data pipe contains exponential curves. @@ -322,6 +338,22 @@ return True # No exponential data. + return False + + +def has_r1rho_exp_type(): + """Determine if the current data pipe contains R1rho experiment types. + + @return: True if R1rho experiment types exist, False otherwise. + @rtype: bool + """ + + # Loop over all experiment types. + for exp_type in cdp.exp_type_list: + if exp_type in EXP_TYPE_LIST_R1RHO: + return True + + # No CPMG experiment types. return False