Author: tlinnet Date: Mon Aug 25 01:08:55 2014 New Revision: 25233 URL: http://svn.gna.org/viewcvs/relax?rev=25233&view=rev Log: Modified check for model, to accept model as input, for error printing. task #7822(https://gna.org/task/index.php?7822): Implement user function to estimate R2eff and associated errors for exponential curve fitting. Modified: trunk/specific_analyses/relax_disp/checks.py Modified: trunk/specific_analyses/relax_disp/checks.py URL: http://svn.gna.org/viewcvs/relax/trunk/specific_analyses/relax_disp/checks.py?rev=25233&r1=25232&r2=25233&view=diff ============================================================================== --- trunk/specific_analyses/relax_disp/checks.py (original) +++ trunk/specific_analyses/relax_disp/checks.py Mon Aug 25 01:08:55 2014 @@ -155,15 +155,21 @@ raise RelaxError("Fixed time and exponential curves cannot be analysed simultaneously.") -def check_model_type(): +def check_model_type(model=None): """Check that the dispersion model has been set. + @keyword model: The model which to select. + @type model: str @raises RelaxError: If the dispersion model has not been specified. """ # Test if the model has been set. if not hasattr(cdp, 'model_type'): - raise RelaxError("The relaxation dispersion model has not been specified.") + if model != None: + text = "The relaxation dispersion model '%s' has not been specified. Set by: relax_disp.select_model('%s')." % (model, model) + else: + text = "The relaxation dispersion model has not been specified." + raise RelaxError(text) def check_pipe_type():