cabouman / mbircone

BSD 3-Clause "New" or "Revised" License
11 stars 9 forks source link

Convergence criteria: normalize by absolute value of the pixels #140

Closed dyang37 closed 1 year ago

dyang37 commented 1 year ago

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.