This is a heuristic that I took from Bob Dougherty's implementation of this
algorithm.


On Thu, Jul 18, 2013 at 8:27 AM, Stefan van der Walt <
notifications@github.com> wrote:

> In dipy/reconst/dti.py:
>
> > +        # Do nlls using sigma weighting in this voxel:
> > +        if jac:
> > +            this_tensor, status = opt.leastsq(_nlls_err_func, start_params,
> > +                               args=(design_matrix, flat_data[vox],
> > +                                     'sigma', sigma),
> > +                                     Dfun=_nlls_jacobian_func)
> > +        else:
> > +            this_tensor, status = opt.leastsq(_nlls_err_func, start_params,
> > +                               args=(design_matrix, flat_data[vox],
> > +                                     'sigma', sigma))
> > +
> > +        # Get the residuals:
> > +        pred_sig = np.exp(np.dot(design_matrix, this_tensor))
> > +        residuals = flat_data[vox] - pred_sig
> > +        # If any of the residuals are outliers:
> > +        if np.any(residuals > 3 * sigma):
>
> Is this a standard heuristic suggested in the paper?
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/nipy/dipy/pull/54/files#r5270627>
> .
>