FABLE-3DXRD / ImageD11

ImageD11 is a python code for identifying individual grains in spotty area detector X-ray diffraction images.
https://imaged11.readthedocs.io/
GNU General Public License v2.0
15 stars 24 forks source link

mask argument for mlem is not used internally #259

Open jonwright opened 6 months ago

jonwright commented 6 months ago

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 .

jonwright commented 6 months ago

If we pass in a 1/0 mask for startvalue I would expect that to be kept as zero later.

jadball commented 6 months ago

To fix this, we need to clarify:

jonwright commented 6 months ago

The 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.

jadball commented 6 months ago

Masking radon proving difficult as we're calling an external warp function, unassigning for now...

jonwright commented 1 month ago

A couple of bits of code to look at to resolve this: