Author: bugman Date: Tue Jul 22 13:44:40 2014 New Revision: 24601 URL: http://svn.gna.org/viewcvs/relax?rev=24601&view=rev Log: Increased the amount of user feedback for the minimise.grid_search user function. Now a comment for each parameter is included in the printed grid search setup table. This includes if the lower or upper bounds, or both, have been supplied by the user and if a preset value has been used instead. Modified: branches/zooming_grid_search/pipe_control/minimise.py Modified: branches/zooming_grid_search/pipe_control/minimise.py URL: http://svn.gna.org/viewcvs/relax/branches/zooming_grid_search/pipe_control/minimise.py?rev=24601&r1=24600&r2=24601&view=diff ============================================================================== --- branches/zooming_grid_search/pipe_control/minimise.py (original) +++ branches/zooming_grid_search/pipe_control/minimise.py Tue Jul 22 13:44:40 2014 @@ -282,6 +282,15 @@ # Loop over the parameters. data = [] for i in range(n): + # A comment for user feedback. + comment = 'Default bounds' + if lower != None and upper != None: + comment = 'User supplied lower and upper bound' + elif lower != None: + comment = 'User supplied lower bound' + elif upper != None: + comment = 'User supplied upper bound' + # The lower bound for this parameter. if lower != None: lower_i = lower[i] @@ -299,6 +308,7 @@ lower_i = values[i] upper_i = values[i] model_inc[-1][i] = 1 + comment = 'Preset value' # Scale the bounds. scaling = param_object.scaling(names[i], model_info=model_info) @@ -310,11 +320,11 @@ model_upper[-1].append(upper_i) # Add to the data list for printing out. - data.append([names[i], "%20s" % lower_i, "%20s" % upper_i, "%20s" % model_inc[-1][i]]) + data.append([names[i], "%15s" % lower_i, "%15s" % upper_i, "%15s" % model_inc[-1][i], comment]) # Printout. if verbosity: - write_data(out=sys.stdout, headings=["Parameter", "Lower", "Upper", "Increments"], data=data) + write_data(out=sys.stdout, headings=["Parameter", "Lower", "Upper", "Increments", "Comment"], data=data) # Return the bounds. return model_lower, model_upper, model_inc