Author: tlinnet Date: Tue Jan 20 12:02:14 2015 New Revision: 27227 URL: http://svn.gna.org/viewcvs/relax?rev=27227&view=rev Log: Added to pipe_control.error_analysis.monte_carlo_create_data() the creation of datapoints for a fixed distribution.
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=27227&r1=27226&r2=27227&view=diff ============================================================================== --- trunk/pipe_control/error_analysis.py (original) +++ trunk/pipe_control/error_analysis.py Tue Jan 20 12:02:14 2015 @@ -169,6 +169,11 @@ # We need to scale the gauss error, before adding to datapoint. new_point = data[id] + g_error * error[id] + # If errors are drawn from fixed distribution. + elif distribution == 'fixed': + # Gaussian randomisation, centered at data point, with width of fixed error. + new_point = gauss(data[id], float(fixed_error)) + # If errors are drawn from measured values. else: # Gaussian randomisation, centered at data point, with width of measured error. _______________________________________________ relax (http://www.nmr-relax.com) This is the relax-commits mailing list [email protected] To unsubscribe from this list, get a password reminder, or change your subscription options, visit the list information page at https://mail.gna.org/listinfo/relax-commits

