ulas bagci wrote:
> Hi everybody,
> in coregistration code( spm_coreg and spm_powell)
> do you know that what is the meaning of
> xi = diag(sc*20); where sc is defined as follows:
> sc=[0.02 0.02 0.02 0.001 0.001 0.001 0.01 0.01 0.01 0.001 0.001 0.001]';
sc gets passed to spm_powell as tolsc, the tolerance/stopping
criteria, as described in the help for spm_powell.
The 12 numbers are the affine parameters, as described in spm_matrix.
The motivation for setting these is that e.g. translation in mm
requires looser precision as a number (0.02mm) than rotation in
radians (0.001). Phrasing that differently, you would notice an error
of 0.1 radian in rotation (much) more than you would 0.1mm of translation.
Note that in spm_coreg, only the first 6 rigid Degrees of Freedom of
the 12 affine DF are used:
sc = sc(1:length(flags.params));
> in powell optimization xi should show the direction of search
> [...] in spm code, it is taken multiple of tolerance with 20.
Indeed, it's the initial search direction *and size*. 20 times the
tolerance was probably guessed to be a reasonable search step size. It
means that e.g. from the starting position, the code will begin by
considering a translation of 20*0.02=0.4mm, etc. which sounds fair enough.
> [...] When I enter manually, identity in replace to xi,
> co-registration result is not promising.
I'm guessing that an initial step of 1 radian is just too large for
the bracketing in the line minimisation to work. You'd need to look
into the search and bracketing subfunctions in spm_powell (and
Numerical Recipes book?) to be more certain of what's going wrong.
Hope that helps,
Ged.
|