Closed sttimmer closed 10 months ago
Thanks for opening an issue! This erros occurs because the basicpy model used for illumination correction does not converge. A fix would be to explicitely check for convergence of this model, and if not just proceed with other processing (inpainting). Then you will not have illumination correction, but there will still be inpainting done. I will implement a fix for this, and let you know when it is merged in main.
This issue should now be fixed on main.
If this is input image (for which basicpy model does not converge):
Then result of nas.im.tiling_correction( sdata, img_layer="raw_image" )
will now be:
So only inpainting is done.
If this this does not completely fix your issue, please feel free to reopen the issue
Running the tiling correction (nas.im.tiling_correction) returns an error for some images with messages about "Reweighting did not converge" and "All-NaN slice encountered":
It seems to occur more for smaller images, but there is no real pattern to it. If it occurs, the "tiling_correction" layer contains an entirely black image.