Skip to content

Commit

Permalink
CCPi Regularisation toolkit plugin: bugfix, docstrings, unittests, re…
Browse files Browse the repository at this point in the history
…move unused functions (#971)

General rework of the CCPi Regularisation toolkit plugin. 
Only FGP_TV, FGP_dTV, TGV and TNV are now available. 
Appropriate unittests are developed and docstrings are added.
Tests of functionality of the regularisers are to be developed in the CCPi Regularisation package.
Closes #931
  • Loading branch information
paskino committed Oct 21, 2021
1 parent fc6d963 commit cf87ba9
Show file tree
Hide file tree
Showing 6 changed files with 407 additions and 185 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
* 21.2.1
- CCPi Regularisation plugin is refactored, only FGP_TV, FGP_dTV, TGV and TNV are exposed. Docstrings and functionality unit tests are added. Tests of the functions are meant to be in the CCPi-Regularisation toolkit itself.
- Add dtype for ImageGeometry, AcquisitionGeometry, VectorGeometry, BlockGeometry
- Fix GradientOperator to handle pseudo 2D CIL geometries
- Created Reconstructor base class for simpler use of CIL methods
Expand Down
12 changes: 6 additions & 6 deletions Wrappers/Python/cil/framework/framework.py
Original file line number Diff line number Diff line change
Expand Up @@ -2401,11 +2401,6 @@ def log(self, *args, **kwargs):
'''Applies log pixel-wise to the DataContainer'''
return self.pixel_wise_unary(numpy.log, *args, **kwargs)

#def __abs__(self):
# operation = FM.OPERATION.ABS
# return self.callFieldMath(operation, None, self.mask, self.maskOnValue)
# __abs__

## reductions
def sum(self, *args, **kwargs):
return self.as_array().sum(*args, **kwargs)
Expand Down Expand Up @@ -3085,7 +3080,12 @@ def get_order_for_engine(engine, geometry):
if isinstance(geometry, AcquisitionGeometry):
dim_order = DataOrder.TIGRE_AG_LABELS
else:
dim_order = DataOrder.TIGRE_IG_LABELS
dim_order = DataOrder.TIGRE_IG_LABELS
elif engine == 'cil':
if isinstance(geometry, AcquisitionGeometry):
dim_order = DataOrder.CIL_AG_LABELS
else:
dim_order = DataOrder.CIL_IG_LABELS
else:
raise ValueError("Unknown engine expected 'tigre' or 'astra' got {}".format(engine))

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from .regularisers import FGP_TV, ROF_TV, TGV, LLT_ROF, FGP_dTV,\
SB_TV, TNV
from .regularisers import FGP_TV, TGV, FGP_dTV, TNV
Loading

0 comments on commit cf87ba9

Please sign in to comment.