This PR makes a simple change to the convergence criteria (CC). The new CC is normalized by the average absolute value of the pixels.
Define:
$n$: iteration number.
$i$: voxel index.
Old CC:
$$CC(n)=\frac{\sum_i\mid x_i^{(n)} - x_i^{(n-1)} \mid}{\sum_i max \left\lbrace x_i^{(n)}, x_i^{(n-1)} \right\rbrace }$$
New CC:
$$CC(n)=\frac{\sum_i\mid x_i^{(n)} - x_i^{(n-1)} \mid}{\sum_i max \left\lbrace \mid x_i^{(n)}\mid , \mid x_i^{(n-1)}\mid \right\rbrace }$$
Tested demo_3D_shepp_logan.py and demo_nsi_preprocess.py. In both cases the image quality and number of iterations remain the same as before. This makes since because the images are non-negative.
This PR makes a simple change to the convergence criteria (CC). The new CC is normalized by the average absolute value of the pixels.
Define: $n$: iteration number. $i$: voxel index.
Old CC: $$CC(n)=\frac{\sum_i\mid x_i^{(n)} - x_i^{(n-1)} \mid}{\sum_i max \left\lbrace x_i^{(n)}, x_i^{(n-1)} \right\rbrace }$$
New CC: $$CC(n)=\frac{\sum_i\mid x_i^{(n)} - x_i^{(n-1)} \mid}{\sum_i max \left\lbrace \mid x_i^{(n)}\mid , \mid x_i^{(n-1)}\mid \right\rbrace }$$
Tested
demo_3D_shepp_logan.py
anddemo_nsi_preprocess.py
. In both cases the image quality and number of iterations remain the same as before. This makes since because the images are non-negative.