Hi Troels,

Is there a need to call the return_error() method?  This will not work
for the R2eff model where a list is returned - so you may need to
catch that situation (see how it is done in
pipe_control.error_analysis.monte_carlo_create_data() where the method
is called).  Otherwise the user will encounter IndexErrors rather than
RelaxImplementErrors.  I'm not sure why the dispersion return_error()
method returns a list for the R2eff model and a dictionary for all
other models.  It seems to work though.

Regards,

Edward

On 16 January 2015 at 23:20,  <tlin...@nmr-relax.com> wrote:
> 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
>
>
>
>
> _______________________________________________
> relax (http://www.nmr-relax.com)
>
> This is the relax-commits mailing list
> relax-comm...@gna.org
>
> 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

_______________________________________________
relax (http://www.nmr-relax.com)

This is the relax-devel mailing list
relax-devel@gna.org

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-devel

Reply via email to