CSD fit issue

I believe there is a bug in the CSD code, it seems that we're fitting on spherical harmonic coefficients instead of the data in `csdeconv`. I've made a gist [here](https://gist.github.com/MrBago/9681461) which allows you to compare the results of fitting using the two approaches. The fix is pretty easy, but the documentation should also be update to reflect the fix. Also there are a few other functions in this module that might need a similar fix and we should write some tests for this. I don't have time to work on this any more tonight and I'd love some help if anyone feels like jumping in.
I just put in a PR against your branch with changes to the example.


On Wed, Jul 30, 2014 at 2:46 PM, MrBago <notifications@github.com> wrote:

> In dipy/reconst/csdeconv.py:
>
> > @@ -119,14 +119,17 @@ def __init__(self, gtab, response, reg_sphere=None, sh_order=8, lambda_=1,
> >          # scale lambda_ to account for differences in the number of
> >          # SH coefficients and number of mapped directions
> >          # This is exactly what is done in [4]_
> > -        self.lambda_ = lambda_ * self.R.shape[0] * r_rh[0] / self.B_reg.shape[0]
> > +        self.lambda_ = (lambda_  * self.R.shape[0] * r_rh[0] /
> > +                        (np.sqrt(self.B_reg.shape[0]) * np.sqrt(362.))
>
> No this is not specific to the 362 sphere, it should work for any sphere.
> Any value close to 20 should work fine here, it's an empirically determined
> constant. I put sqrt(362) because that way the default lambda is not
> effected by this change (the sqrt(self.B_reg.shape[0]) part).
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/nipy/dipy/pull/340/files#r15614590>.
>