Open jonwright opened 8 months ago
If we pass in a 1/0 mask for startvalue I would expect that to be kept as zero later.
To fix this, we need to clarify:
radon
iradon
currently isn't padded like we do with projection_shifts
- should we add this?startvalue
and mask
arguments, what each means and what data types they areThe purpose of the mask is to only reconstruct real space pixels in the masked region. It is meant to be an optimisation for small grains in big maps. It tells the code to only look at a small region in the sample space and assume everything else is zero. The reason to fork from skimage was to add this mask ROI (because it should be >1e4 times faster for some cases)
For adding mask to radon, it is a "todo". We only need to project the masked region onto the sinogram, not the whole 2D image. This is an optimisation, assuming the recon is zero outside the mask.
output_size and projection_shifts have to match mask.shape. Padding may come up here. If people supply conflicting options I guess we just stop and complain.
startvalue in MLEM is what to start iterating from. If you want to add more iterations, you run again with startvalue as the last output reconstruction. To converge faster, I have tried starting from abs(iradon) + constant
, but it is not clear if that helps.
Masking radon
proving difficult as we're calling an external warp
function, unassigning for now...
A couple of bits of code to look at to resolve this:
Within the iradon code, the calls to iradon and radon are using mask=None. I don't understand that. The point of adding the mask argument is to only run computations on a subset of the pixels. Probably something needs to be debugged.
If the aim is to 'zero' some part of the reconstruction then we need a different name for the argument .