Open MargaretDuff opened 1 year ago
I had a think about this one. It is relatively easy to create a square BlockOperator with a list of operators on the diagonal.
However, if we are considering block diagonal operators with the off-diagonals being non-zero then we only have geometries defined if there is at least one operator defined per each row and column. Thus I have had a play with implementing a BlockDiagonalOperator that by default takes in a main diagonal but the user could optionally give a list of offsets and a list of lists of operators, including the main diagonal. There is an issue calculating norms in this case.
Initial implementation is here https://github.com/MargaretDuff/CIL-margaret/blob/blockdiagonaloperator/Wrappers/Python/cil/optimisation/operators/DiagonalOperator.py
It feels like we want to implement some sort of sparse notation for BlockOperators??
See e.g. Tommi's user showcase: https://github.com/TomographicImaging/CIL-User-Showcase/blob/main/004_STEMPO-DynamicCT/stempo2d_v2_1.ipynb
Would want it to be implemented efficiently, e.g. without ZeroOperators