Author: tlinnet Date: Tue Jan 20 12:41:21 2015 New Revision: 27229 URL: http://svn.gna.org/viewcvs/relax?rev=27229&view=rev Log: In pipe_control.error_analysis.monte_carlo_create_data(), if data is of list type or ndarray, then modify the datapoint according to the fixed error if the distribution is set to 'fixed'. Task #7882 (https://gna.org/task/?7882): Implement Monte-Carlo simulation, where errors are generated with width of standard deviation or residuals.): Implement Monte-Carlo simulation, where errors are generated with width of standard deviation or residuals. Modified: trunk/pipe_control/error_analysis.py Modified: trunk/pipe_control/error_analysis.py URL: http://svn.gna.org/viewcvs/relax/trunk/pipe_control/error_analysis.py?rev=27229&r1=27228&r2=27229&view=diff ============================================================================== --- trunk/pipe_control/error_analysis.py (original) +++ trunk/pipe_control/error_analysis.py Tue Jan 20 12:41:21 2015 @@ -146,7 +146,11 @@ continue # Gaussian randomisation. - random[j].append(gauss(data[k], error[k])) + if distribution == 'fixed': + random[j].append(gauss(data[k], float(fixed_error))) + + else: + random[j].append(gauss(data[k], error[k])) # Dictionary type data. if isinstance(data, dict):