HPImaging / sv-mbirct

High Performance Model Based Image Reconstruction for Computed Tomography
BSD 3-Clause "New" or "Revised" License
6 stars 7 forks source link

Enable constant weights #7

Closed smajee closed 4 years ago

smajee commented 4 years ago

When weights are not supplied, intuitively, one would think that it would be set as constant weights with each entry equal to 1/sigmaY^2 similar to TomoPy. But it seems to be computed differently. There is a flag to control it (reconparams.weightType) but is is hardcoded to 1.

sjkisner commented 4 years ago

Soumendu, can you check this again? I don't think it's hard-coded. There's a line where it set's it to "1" but that's for the default value. The ReadReconParams() routine check's for the field value in the reconparams file. Did I miss something?

It's not documented anywhere yet.

sjkisner commented 4 years ago

I've tested this and it seems to work. If I add/change a weightType field in the reconparams file, it controls how the weight is computed. 0: w=1/SigY^2 1: w=exp(-y)/SigY^2 2: w=exp(-y/2)/SigY^2 Default is currently set to method "1".