daducci / COMMIT

Linear framework to combine tractography and tissue micro-structure estimation with diffusion MRI
Other
43 stars 33 forks source link

fixed preconditioning #13

Closed barakovic closed 7 years ago

barakovic commented 7 years ago

Fixed order of repetitions for each kernels.

Checked that the norm of the matrix A generated with 'doNormalizeKernels' = False

norm_A1 = np.linalg.norm(A,axis=0)`

is approximately equal to the norm calculate by COMMIT generate with 'doNormalizeKernels' = True

norm1 = np.repeat(mit.KERNELS['wmr_norm'],nF)
norm2 = np.repeat(mit.KERNELS['wmh_norm'],nE)
norm3 = np.repeat(mit.KERNELS['iso_norm'],nV)
norm_fib = np.kron(np.ones(mit.KERNELS['wmr'].shape[0]), mit.DICTIONARY['TRK']['norm'])

norm_A2 =  np.hstack( (norm1*norm_fib,norm2,norm3) )

norm_A1 ≈ norm_A2