This is presumably faster. We are only using this to 'warm-start' the
optimization which comes later.


On Sun, Apr 14, 2013 at 10:33 AM, Stefan van der Walt <
notifications@github.com> wrote:

> In dipy/reconst/dti.py:
>
> > +        from some part of the image known to contain no signal (only noise).
> > +
> > +
> > +    Returns
> > +    -------
> > +    nlls_params: the eigen-values and eigen-vectors of the tensor in each voxel.
> > +
> > +    """
> > +    data, wrap = _makearray(data)
> > +    # Flatten for the iteration over voxels:
> > +    flat_data = data.reshape((-1, data.shape[-1]))
> > +    # Use the OLS method parameters as the starting point for the optimization:
> > +    inv_design = np.linalg.pinv(design_matrix)
> > +    sig = np.maximum(flat_data, min_signal)
> > +    log_s = np.log(sig)
> > +    D = np.dot(inv_design, log_s.T).T
>
> Why do this manually, and not just use leastsq to determine initial
> values?
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/nipy/dipy/pull/54/files#r3786248>
> .
>