NIce! But don't we need to correct the small-n bias in the estimated stdev?

E.g.: http://nbviewer.ipython.org/4287207/

On 01/31/2013 12:16 PM, Ariel Rokem wrote:
>
> In mrDiffusion/utils/dtiComputeImageNoise.m:
>
> > +if strcmp('corner', noiseCalcMethod)
> > +
> > +    % According to Henkelman (1985), the expected signal variance (sigma) can
> > +    % be computed as 1.5267 * SD of the background (thermal) noise.
> > +    sz = size(dwRaw.data);
> > +    x  = 10;
> > +    y  = 10;
> > +    z  = round(sz(3)/2);
> > +
> > +    [x,y,z,s] = ndgrid(x-5:x+5, y-5:y:5, z-5:z+5, 1:sz(4));
> > +    noiseInds = sub2ind(sz, x(:), y(:), z(:), s(:));
> > +    sigma     = 1.5267 * std(double(dwRaw.data(noiseInds)));
> > +
> > +elseif strcmp('b0', noiseCalcMethod)
> > +    % Pull out the data from the brain mask
> > +    data =
> Excellent! Maybe @rfdougherty <https://github.com/rfdougherty> can 
> have a look when he gets a chance, to see that this is not crazy.
> … <#>
> On Thu, Jan 31, 2013 at 12:11 PM, Jason D. Yeatman 
> <notifications@github.com > wrote: > In 
> mrDiffusion/utils/dtiComputeImageNoise.m: > > > +if strcmp('corner', 
> noiseCalcMethod) > > + > > + % According to Henkelman (1985), the 
> expected signal variance (sigma) can > > + % be computed as 1.5267 * 
> SD of the background (thermal) noise. > > + sz = size(dwRaw.data); > > 
> + x = 10; > > + y = 10; > > + z = round(sz(3)/2); > > + > > + 
> [x,y,z,s] = ndgrid(x-5:x+5, y-5:y:5, z-5:z+5, 1:sz(4)); > > + 
> noiseInds = sub2ind(sz, x(:), y(:), z(:), s(:)); > > + sigma = 1.5267 
> * std(double(dwRaw.data(noiseInds))); > > + > > +elseif strcmp('b0', 
> noiseCalcMethod) > > + % Pull out the data from the brain mask > > + 
> data = > > Yes this part has not been finished. But the robust tesnor 
> fit function > works. It just needs to be modularized > … 
> <#13c923c0fde51498_> > On Thu, Jan 31, 2013 at 12:07 PM, Ariel Rokem 
> <notifications@github.com>wrote: In 
> mrDiffusion/utils/dtiComputeImageNoise.m: > +if strcmp('corner', 
> noiseCalcMethod) > + > + % According to Henkelman (1985), the expected 
> signal variance (sigma) can > + % be computed as 1.5267 * SD of the 
> background (thermal) noise. > + sz = size(dwRaw.data); > + x = 10; > + 
> y = 10; > + z = round(sz(3)/2); > + > + [x,y,z,s] = ndgrid(x-5:x+5, 
> y-5:y:5, z-5:z+5, 1:sz(4)); > + noiseInds = sub2ind(sz, x(:), y(:), 
> z(:), s(:)); > + sigma = 1.5267 * std(double(dwRaw.data(noiseInds))); 
> > + > +elseif strcmp('b0', noiseCalcMethod) > + % Pull out the data 
> from the brain mask > + data = This is still broken, no? — Reply to 
> this email directly or view it on 
> GitHub<https://github.com/vistalab/vistasoft/pull/4/files#r2850004>. — 
> Reply to this email directly or view it on 
> GitHub<https://github.com/vistalab/vistasoft/pull/4/files#r2850052>.
>
> —
> Reply to this email directly or view it on GitHub 
> <https://github.com/vistalab/vistasoft/pull/4/files#r2850129>.
>

-- 
Robert F. Dougherty, PhD
Research Director
Stanford Center for Cognitive and Neurobiological Imaging
70 Jordan Hall  *  Stanford CA 94305  *  650-725-0051
http://www.stanford.edu/~bobd