Author: tlinnet Date: Fri Jan 16 23:20:11 2015 New Revision: 27212 URL: http://svn.gna.org/viewcvs/relax?rev=27212&view=rev Log: Implemented in the relaxation dispersion API, the function to return errors as the standard deviation of sums squared residuals. Task #7882 (https://gna.org/task/?7882): Implement Monte-Carlo simulation, where errors are generated with width of standard deviation or residuals. Modified: trunk/specific_analyses/relax_disp/api.py Modified: trunk/specific_analyses/relax_disp/api.py URL: http://svn.gna.org/viewcvs/relax/trunk/specific_analyses/relax_disp/api.py?rev=27212&r1=27211&r2=27212&view=diff ============================================================================== --- trunk/specific_analyses/relax_disp/api.py (original) +++ trunk/specific_analyses/relax_disp/api.py Fri Jan 16 23:20:11 2015 @@ -1034,6 +1034,31 @@ return r2eff_err # Return the error list. + return errors + + + def return_error_sum_squares(self, data_id=None): + """Return the sum of squares standard deviation data structure. + + @param data_id: The tuple of the spin container and the exponential curve identifying key, as yielded by the base_data_loop() generator method. + @type data_id: SpinContainer instance and float + @return: The sum of squares standard deviation data structure. + @rtype: list of float + """ + + # Use same method as return_error() function. + errors = self.return_error(data_id=data_id) + + # Replace if not the R2eff model. + if cdp.model_type != MODEL_R2EFF: + # Unpack the data. + spin, spin_id = data_id + + # Replace values with the stored value. + for id in errors: + errors[id] = spin.sos_std + + # Return the error list or dictionary. return errors