Author: bugman Date: Mon May 27 14:27:45 2013 New Revision: 19746 URL: http://svn.gna.org/viewcvs/relax?rev=19746&view=rev Log: Merged revisions 19745 via svnmerge from svn+ssh://bugman@xxxxxxxxxxx/svn/relax/trunk ........ r19745 | bugman | 2013-05-27 14:20:29 +0200 (Mon, 27 May 2013) | 3 lines The monte_carlo.error_analysis user function can now handle parameters which are lists. ........ Modified: branches/relax_disp/ (props changed) branches/relax_disp/pipe_control/monte_carlo.py Propchange: branches/relax_disp/ ------------------------------------------------------------------------------ --- svnmerge-integrated (original) +++ svnmerge-integrated Mon May 27 14:27:45 2013 @@ -1,1 +1,1 @@ -/trunk:1-19736 +/trunk:1-19745 Modified: branches/relax_disp/pipe_control/monte_carlo.py URL: http://svn.gna.org/viewcvs/relax/branches/relax_disp/pipe_control/monte_carlo.py?rev=19746&r1=19745&r2=19746&view=diff ============================================================================== --- branches/relax_disp/pipe_control/monte_carlo.py (original) +++ branches/relax_disp/pipe_control/monte_carlo.py Mon May 27 14:27:45 2013 @@ -171,6 +171,21 @@ # Calculate and store the SD. sd[key] = statistics.std(values=data, skip=select_sim) + # Handle list type parameters. + elif isinstance(param_array[0], list): + # Initialise the standard deviation structure as a list. + sd = [] + + # Loop over each element. + for j in range(len(param_array[0])): + # Create a list of the values for the current key. + data = [] + for i in range(len(param_array)): + data.append(param_array[i][j]) + + # Calculate and store the SD. + sd.append(statistics.std(values=data, skip=select_sim)) + # SD of simulation parameters with values (ie not None). elif param_array[0] != None: sd = statistics.std(values=param_array, skip=select_sim)