summaryrefslogtreecommitdiffstats
path: root/Wrappers/Python
diff options
context:
space:
mode:
Diffstat (limited to 'Wrappers/Python')
-rw-r--r--Wrappers/Python/ccpi/__init__.py9
-rwxr-xr-xWrappers/Python/ccpi/framework/BlockDataContainer.py21
-rwxr-xr-xWrappers/Python/ccpi/framework/BlockGeometry.py17
-rwxr-xr-xWrappers/Python/ccpi/framework/TestData.py36
-rwxr-xr-xWrappers/Python/ccpi/framework/Vector.py11
-rwxr-xr-xWrappers/Python/ccpi/framework/__init__.py19
-rwxr-xr-xWrappers/Python/ccpi/framework/framework.py10
-rw-r--r--Wrappers/Python/ccpi/io/NEXUSDataReader.py18
-rw-r--r--Wrappers/Python/ccpi/io/NEXUSDataWriter.py19
-rw-r--r--Wrappers/Python/ccpi/io/__init__.py9
-rw-r--r--Wrappers/Python/ccpi/io/reader.py14
-rwxr-xr-xWrappers/Python/ccpi/optimisation/algorithms/Algorithm.py9
-rwxr-xr-xWrappers/Python/ccpi/optimisation/algorithms/CGLS.py14
-rwxr-xr-xWrappers/Python/ccpi/optimisation/algorithms/FISTA.py19
-rwxr-xr-xWrappers/Python/ccpi/optimisation/algorithms/GradientDescent.py14
-rw-r--r--Wrappers/Python/ccpi/optimisation/algorithms/PDHG.py20
-rw-r--r--Wrappers/Python/ccpi/optimisation/algorithms/SIRT.py10
-rw-r--r--Wrappers/Python/ccpi/optimisation/algorithms/__init__.py14
-rw-r--r--Wrappers/Python/ccpi/optimisation/functions/BlockFunction.py20
-rw-r--r--Wrappers/Python/ccpi/optimisation/functions/Function.py9
-rw-r--r--Wrappers/Python/ccpi/optimisation/functions/FunctionOperatorComposition.py19
-rw-r--r--Wrappers/Python/ccpi/optimisation/functions/FunctionOperatorComposition_old.py85
-rwxr-xr-xWrappers/Python/ccpi/optimisation/functions/IndicatorBox.py36
-rw-r--r--Wrappers/Python/ccpi/optimisation/functions/KullbackLeibler.py10
-rw-r--r--Wrappers/Python/ccpi/optimisation/functions/L1Norm.py36
-rw-r--r--Wrappers/Python/ccpi/optimisation/functions/L2NormSquared.py9
-rwxr-xr-xWrappers/Python/ccpi/optimisation/functions/MixedL21Norm.py9
-rwxr-xr-xWrappers/Python/ccpi/optimisation/functions/Norm2Sq.py9
-rwxr-xr-xWrappers/Python/ccpi/optimisation/functions/ScaledFunction.py9
-rw-r--r--Wrappers/Python/ccpi/optimisation/functions/ZeroFunction.py9
-rw-r--r--Wrappers/Python/ccpi/optimisation/functions/__init__.py15
-rwxr-xr-xWrappers/Python/ccpi/optimisation/operators/BlockOperator.py20
-rw-r--r--Wrappers/Python/ccpi/optimisation/operators/BlockScaledOperator.py17
-rw-r--r--Wrappers/Python/ccpi/optimisation/operators/FiniteDifferenceOperator.py19
-rw-r--r--Wrappers/Python/ccpi/optimisation/operators/GradientOperator.py19
-rw-r--r--Wrappers/Python/ccpi/optimisation/operators/IdentityOperator.py20
-rwxr-xr-xWrappers/Python/ccpi/optimisation/operators/LinearOperator.py19
-rw-r--r--Wrappers/Python/ccpi/optimisation/operators/LinearOperatorMatrix.py17
-rwxr-xr-xWrappers/Python/ccpi/optimisation/operators/Operator.py19
-rw-r--r--Wrappers/Python/ccpi/optimisation/operators/ScaledOperator.py17
-rw-r--r--Wrappers/Python/ccpi/optimisation/operators/ShrinkageOperator.py20
-rw-r--r--Wrappers/Python/ccpi/optimisation/operators/SparseFiniteDiff.py20
-rw-r--r--Wrappers/Python/ccpi/optimisation/operators/SymmetrizedGradientOperator.py20
-rw-r--r--Wrappers/Python/ccpi/optimisation/operators/ZeroOperator.py20
-rwxr-xr-xWrappers/Python/ccpi/optimisation/operators/__init__.py19
-rwxr-xr-xWrappers/Python/ccpi/processors/CenterOfRotationFinder.py11
-rwxr-xr-xWrappers/Python/ccpi/processors/Normalizer.py11
-rwxr-xr-xWrappers/Python/ccpi/processors/Resizer.py12
-rwxr-xr-xWrappers/Python/ccpi/processors/__init__.py18
-rw-r--r--Wrappers/Python/setup.py10
-rwxr-xr-xWrappers/Python/test/test_BlockDataContainer.py19
-rw-r--r--Wrappers/Python/test/test_BlockOperator.py17
-rwxr-xr-xWrappers/Python/test/test_DataContainer.py19
-rwxr-xr-xWrappers/Python/test/test_DataProcessor.py17
-rwxr-xr-xWrappers/Python/test/test_Gradient.py19
-rwxr-xr-xWrappers/Python/test/test_NexusReader.py19
-rw-r--r--Wrappers/Python/test/test_NexusReaderWriter.py17
-rw-r--r--Wrappers/Python/test/test_Operator.py19
-rwxr-xr-xWrappers/Python/test/test_TestData.py17
-rwxr-xr-xWrappers/Python/test/test_algorithms.py19
-rw-r--r--Wrappers/Python/test/test_functions.py22
-rwxr-xr-xWrappers/Python/test/test_run_test.py21
-rwxr-xr-xWrappers/Python/test/testclass.py17
63 files changed, 744 insertions, 384 deletions
diff --git a/Wrappers/Python/ccpi/__init__.py b/Wrappers/Python/ccpi/__init__.py
index cf2d93d..17c74a0 100644
--- a/Wrappers/Python/ccpi/__init__.py
+++ b/Wrappers/Python/ccpi/__init__.py
@@ -1,15 +1,14 @@
# -*- coding: utf-8 -*-
-# This work is part of the Core Imaging Library developed by
-# Visual Analytics and Imaging System Group of the Science Technology
-# Facilities Council, STFC
+# CCP in Tomographic Imaging (CCPi) Core Imaging Library (CIL).
-# Copyright 2018 Edoardo Pasca
+# Copyright 2017 UKRI-STFC
+# Copyright 2017 University of Manchester
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
-# http://www.apache.org/licenses/LICENSE-2.0
+# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/Wrappers/Python/ccpi/framework/BlockDataContainer.py b/Wrappers/Python/ccpi/framework/BlockDataContainer.py
index 670e214..b5116e5 100755
--- a/Wrappers/Python/ccpi/framework/BlockDataContainer.py
+++ b/Wrappers/Python/ccpi/framework/BlockDataContainer.py
@@ -1,9 +1,20 @@
- # -*- coding: utf-8 -*-
-"""
-Created on Tue Mar 5 16:04:45 2019
+# -*- coding: utf-8 -*-
+# CCP in Tomographic Imaging (CCPi) Core Imaging Library (CIL).
-@author: ofn77899
-"""
+# Copyright 2017 UKRI-STFC
+# Copyright 2017 University of Manchester
+
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+
+# http://www.apache.org/licenses/LICENSE-2.0
+
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
diff --git a/Wrappers/Python/ccpi/framework/BlockGeometry.py b/Wrappers/Python/ccpi/framework/BlockGeometry.py
index e58035b..ec2b940 100755
--- a/Wrappers/Python/ccpi/framework/BlockGeometry.py
+++ b/Wrappers/Python/ccpi/framework/BlockGeometry.py
@@ -1,3 +1,20 @@
+# -*- coding: utf-8 -*-
+# CCP in Tomographic Imaging (CCPi) Core Imaging Library (CIL).
+
+# Copyright 2017 UKRI-STFC
+# Copyright 2017 University of Manchester
+
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+
+# http://www.apache.org/licenses/LICENSE-2.0
+
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
diff --git a/Wrappers/Python/ccpi/framework/TestData.py b/Wrappers/Python/ccpi/framework/TestData.py
index eda14ab..2f4c685 100755
--- a/Wrappers/Python/ccpi/framework/TestData.py
+++ b/Wrappers/Python/ccpi/framework/TestData.py
@@ -1,4 +1,20 @@
# -*- coding: utf-8 -*-
+# CCP in Tomographic Imaging (CCPi) Core Imaging Library (CIL).
+
+# Copyright 2017 UKRI-STFC
+# Copyright 2017 University of Manchester
+
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+
+# http://www.apache.org/licenses/LICENSE-2.0
+
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
from ccpi.framework import ImageData, ImageGeometry, DataContainer
import numpy
import numpy as np
@@ -18,6 +34,17 @@ data_dir = os.path.abspath(
)
class TestData(object):
+ '''Class to return test data
+
+ provides 6 dataset:
+ BOAT = 'boat.tiff'
+ CAMERA = 'camera.png'
+ PEPPERS = 'peppers.tiff'
+ RESOLUTION_CHART = 'resolution_chart.tiff'
+ SIMPLE_PHANTOM_2D = 'hotdog'
+ SHAPES = 'shapes.png'
+
+ '''
BOAT = 'boat.tiff'
CAMERA = 'camera.png'
PEPPERS = 'peppers.tiff'
@@ -78,6 +105,15 @@ class TestData(object):
@staticmethod
def random_noise(image, mode='gaussian', seed=None, clip=True, **kwargs):
+ '''Function to add noise to input image
+
+ :param image: input dataset, DataContainer of numpy.ndarray
+ :param mode: type of noise
+ :param seed: seed for random number generator
+ :param clip: should clip the data.
+ See https://github.com/scikit-image/scikit-image/blob/master/skimage/util/noise.py
+
+ '''
if issubclass(type(image), DataContainer):
arr = TestData.scikit_random_noise(image.as_array(), mode=mode, seed=seed, clip=clip,
**kwargs)
diff --git a/Wrappers/Python/ccpi/framework/Vector.py b/Wrappers/Python/ccpi/framework/Vector.py
index 542cb7a..1885822 100755
--- a/Wrappers/Python/ccpi/framework/Vector.py
+++ b/Wrappers/Python/ccpi/framework/Vector.py
@@ -1,15 +1,14 @@
# -*- coding: utf-8 -*-
-# This work is part of the Core Imaging Library developed by
-# Visual Analytics and Imaging System Group of the Science Technology
-# Facilities Council, STFC
+# CCP in Tomographic Imaging (CCPi) Core Imaging Library (CIL).
-# Copyright 2018-2019 Edoardo Pasca
+# Copyright 2017 UKRI-STFC
+# Copyright 2017 University of Manchester
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
-# http://www.apache.org/licenses/LICENSE-2.0
+# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
@@ -31,6 +30,7 @@ from numbers import Number
from ccpi.framework import DataContainer
class VectorData(DataContainer):
+ '''DataContainer to contain 1D array'''
def __init__(self, array=None, **kwargs):
self.geometry = kwargs.get('geometry', None)
self.dtype = kwargs.get('dtype', numpy.float32)
@@ -58,6 +58,7 @@ class VectorData(DataContainer):
super(VectorData, self).__init__(out, deep_copy, None)
class VectorGeometry(object):
+ '''Geometry describing VectorData to contain 1D array'''
RANDOM = 'random'
RANDOM_INT = 'random_int'
diff --git a/Wrappers/Python/ccpi/framework/__init__.py b/Wrappers/Python/ccpi/framework/__init__.py
index 3de27ed..cae8988 100755
--- a/Wrappers/Python/ccpi/framework/__init__.py
+++ b/Wrappers/Python/ccpi/framework/__init__.py
@@ -1,9 +1,20 @@
# -*- coding: utf-8 -*-
-"""
-Created on Tue Mar 5 16:00:18 2019
+# CCP in Tomographic Imaging (CCPi) Core Imaging Library (CIL).
-@author: ofn77899
-"""
+# Copyright 2017 UKRI-STFC
+# Copyright 2017 University of Manchester
+
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+
+# http://www.apache.org/licenses/LICENSE-2.0
+
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
diff --git a/Wrappers/Python/ccpi/framework/framework.py b/Wrappers/Python/ccpi/framework/framework.py
index caea1e1..9435106 100755
--- a/Wrappers/Python/ccpi/framework/framework.py
+++ b/Wrappers/Python/ccpi/framework/framework.py
@@ -1,22 +1,20 @@
# -*- coding: utf-8 -*-
-# This work is part of the Core Imaging Library developed by
-# Visual Analytics and Imaging System Group of the Science Technology
-# Facilities Council, STFC
+# CCP in Tomographic Imaging (CCPi) Core Imaging Library (CIL).
-# Copyright 2018-2019 Edoardo Pasca
+# Copyright 2017 UKRI-STFC
+# Copyright 2017 University of Manchester
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
-# http://www.apache.org/licenses/LICENSE-2.0
+# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
-
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
diff --git a/Wrappers/Python/ccpi/io/NEXUSDataReader.py b/Wrappers/Python/ccpi/io/NEXUSDataReader.py
index e6d4d3b..dbada02 100644
--- a/Wrappers/Python/ccpi/io/NEXUSDataReader.py
+++ b/Wrappers/Python/ccpi/io/NEXUSDataReader.py
@@ -1,12 +1,20 @@
-#!/usr/bin/env python3
# -*- coding: utf-8 -*-
-"""
-Created on Wed Apr 3 10:30:25 2019
+# CCP in Tomographic Imaging (CCPi) Core Imaging Library (CIL).
-@author: evelina
-"""
+# Copyright 2017 UKRI-STFC
+# Copyright 2017 University of Manchester
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
import numpy
import os
from ccpi.framework import AcquisitionData, AcquisitionGeometry, ImageData, ImageGeometry
diff --git a/Wrappers/Python/ccpi/io/NEXUSDataWriter.py b/Wrappers/Python/ccpi/io/NEXUSDataWriter.py
index 6f5c0b2..c0b4fae 100644
--- a/Wrappers/Python/ccpi/io/NEXUSDataWriter.py
+++ b/Wrappers/Python/ccpi/io/NEXUSDataWriter.py
@@ -1,11 +1,20 @@
-#!/usr/bin/env python3
# -*- coding: utf-8 -*-
-"""
-Created on Thu May 2 10:11:20 2019
+# CCP in Tomographic Imaging (CCPi) Core Imaging Library (CIL).
-@author: evelina
-"""
+# Copyright 2017 UKRI-STFC
+# Copyright 2017 University of Manchester
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+
+# http://www.apache.org/licenses/LICENSE-2.0
+
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
import numpy
import os
diff --git a/Wrappers/Python/ccpi/io/__init__.py b/Wrappers/Python/ccpi/io/__init__.py
index 455faba..96e8cd6 100644
--- a/Wrappers/Python/ccpi/io/__init__.py
+++ b/Wrappers/Python/ccpi/io/__init__.py
@@ -1,15 +1,14 @@
# -*- coding: utf-8 -*-
-# This work is part of the Core Imaging Library developed by
-# Visual Analytics and Imaging System Group of the Science Technology
-# Facilities Council, STFC
+# CCP in Tomographic Imaging (CCPi) Core Imaging Library (CIL).
-# Copyright 2018 Edoardo Pasca
+# Copyright 2017 UKRI-STFC
+# Copyright 2017 University of Manchester
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
-# http://www.apache.org/licenses/LICENSE-2.0
+# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/Wrappers/Python/ccpi/io/reader.py b/Wrappers/Python/ccpi/io/reader.py
index 07e3bf9..926c2e0 100644
--- a/Wrappers/Python/ccpi/io/reader.py
+++ b/Wrappers/Python/ccpi/io/reader.py
@@ -1,15 +1,14 @@
# -*- coding: utf-8 -*-
-# This work is part of the Core Imaging Library developed by
-# Visual Analytics and Imaging System Group of the Science Technology
-# Facilities Council, STFC
+# CCP in Tomographic Imaging (CCPi) Core Imaging Library (CIL).
-# Copyright 2018 Jakob Jorgensen, Daniil Kazantsev, Edoardo Pasca and Srikanth Nagella
+# Copyright 2017 UKRI-STFC
+# Copyright 2017 University of Manchester
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
-# http://www.apache.org/licenses/LICENSE-2.0
+# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
@@ -17,11 +16,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-'''
-This is a reader module with classes for loading 3D datasets.
-
-@author: Mr. Srikanth Nagella
-'''
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
diff --git a/Wrappers/Python/ccpi/optimisation/algorithms/Algorithm.py b/Wrappers/Python/ccpi/optimisation/algorithms/Algorithm.py
index f9f65b2..1168db3 100755
--- a/Wrappers/Python/ccpi/optimisation/algorithms/Algorithm.py
+++ b/Wrappers/Python/ccpi/optimisation/algorithms/Algorithm.py
@@ -1,15 +1,14 @@
# -*- coding: utf-8 -*-
-# This work is part of the Core Imaging Library developed by
-# Visual Analytics and Imaging System Group of the Science Technology
-# Facilities Council, STFC
+# CCP in Tomographic Imaging (CCPi) Core Imaging Library (CIL).
-# Copyright 2019 Edoardo Pasca
+# Copyright 2017 UKRI-STFC
+# Copyright 2017 University of Manchester
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
-# http://www.apache.org/licenses/LICENSE-2.0
+# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/Wrappers/Python/ccpi/optimisation/algorithms/CGLS.py b/Wrappers/Python/ccpi/optimisation/algorithms/CGLS.py
index d3aea8e..de904fb 100755
--- a/Wrappers/Python/ccpi/optimisation/algorithms/CGLS.py
+++ b/Wrappers/Python/ccpi/optimisation/algorithms/CGLS.py
@@ -1,26 +1,20 @@
# -*- coding: utf-8 -*-
-# This work is part of the Core Imaging Library developed by
-# Visual Analytics and Imaging System Group of the Science Technology
-# Facilities Council, STFC
+# CCP in Tomographic Imaging (CCPi) Core Imaging Library (CIL).
-# Copyright 2018 Edoardo Pasca
+# Copyright 2017 UKRI-STFC
+# Copyright 2017 University of Manchester
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
-# http://www.apache.org/licenses/LICENSE-2.0
+# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
-"""
-Created on Thu Feb 21 11:11:23 2019
-
-@author: ofn77899
-"""
from ccpi.optimisation.algorithms import Algorithm
from ccpi.optimisation.functions import Norm2Sq
diff --git a/Wrappers/Python/ccpi/optimisation/algorithms/FISTA.py b/Wrappers/Python/ccpi/optimisation/algorithms/FISTA.py
index c8fd0d4..9e40c95 100755
--- a/Wrappers/Python/ccpi/optimisation/algorithms/FISTA.py
+++ b/Wrappers/Python/ccpi/optimisation/algorithms/FISTA.py
@@ -1,9 +1,20 @@
# -*- coding: utf-8 -*-
-"""
-Created on Thu Feb 21 11:07:30 2019
+# CCP in Tomographic Imaging (CCPi) Core Imaging Library (CIL).
-@author: ofn77899
-"""
+# Copyright 2017 UKRI-STFC
+# Copyright 2017 University of Manchester
+
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+
+# http://www.apache.org/licenses/LICENSE-2.0
+
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
from ccpi.optimisation.algorithms import Algorithm
from ccpi.optimisation.functions import ZeroFunction
diff --git a/Wrappers/Python/ccpi/optimisation/algorithms/GradientDescent.py b/Wrappers/Python/ccpi/optimisation/algorithms/GradientDescent.py
index 34bf954..cbccd73 100755
--- a/Wrappers/Python/ccpi/optimisation/algorithms/GradientDescent.py
+++ b/Wrappers/Python/ccpi/optimisation/algorithms/GradientDescent.py
@@ -1,26 +1,20 @@
# -*- coding: utf-8 -*-
-# This work is part of the Core Imaging Library developed by
-# Visual Analytics and Imaging System Group of the Science Technology
-# Facilities Council, STFC
+# CCP in Tomographic Imaging (CCPi) Core Imaging Library (CIL).
-# Copyright 2019 Edoardo Pasca
+# Copyright 2017 UKRI-STFC
+# Copyright 2017 University of Manchester
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
-# http://www.apache.org/licenses/LICENSE-2.0
+# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
-"""
-Created on Thu Feb 21 11:05:09 2019
-
-@author: ofn77899
-"""
from ccpi.optimisation.algorithms import Algorithm
class GradientDescent(Algorithm):
diff --git a/Wrappers/Python/ccpi/optimisation/algorithms/PDHG.py b/Wrappers/Python/ccpi/optimisation/algorithms/PDHG.py
index 3afd8b0..2503fe6 100644
--- a/Wrappers/Python/ccpi/optimisation/algorithms/PDHG.py
+++ b/Wrappers/Python/ccpi/optimisation/algorithms/PDHG.py
@@ -1,10 +1,20 @@
-#!/usr/bin/env python3
# -*- coding: utf-8 -*-
-"""
-Created on Mon Feb 4 16:18:06 2019
+# CCP in Tomographic Imaging (CCPi) Core Imaging Library (CIL).
-@author: evangelos
-"""
+# Copyright 2017 UKRI-STFC
+# Copyright 2017 University of Manchester
+
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+
+# http://www.apache.org/licenses/LICENSE-2.0
+
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
from ccpi.optimisation.algorithms import Algorithm
from ccpi.framework import ImageData, DataContainer
import numpy as np
diff --git a/Wrappers/Python/ccpi/optimisation/algorithms/SIRT.py b/Wrappers/Python/ccpi/optimisation/algorithms/SIRT.py
index c73d323..02ca937 100644
--- a/Wrappers/Python/ccpi/optimisation/algorithms/SIRT.py
+++ b/Wrappers/Python/ccpi/optimisation/algorithms/SIRT.py
@@ -1,16 +1,14 @@
-#!/usr/bin/env python3
# -*- coding: utf-8 -*-
-# This work is part of the Core Imaging Library developed by
-# Visual Analytics and Imaging System Group of the Science Technology
-# Facilities Council, STFC
+# CCP in Tomographic Imaging (CCPi) Core Imaging Library (CIL).
-# Copyright 2018 Edoardo Pasca
+# Copyright 2017 UKRI-STFC
+# Copyright 2017 University of Manchester
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
-# http://www.apache.org/licenses/LICENSE-2.0
+# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/Wrappers/Python/ccpi/optimisation/algorithms/__init__.py b/Wrappers/Python/ccpi/optimisation/algorithms/__init__.py
index 8f255f3..3915254 100644
--- a/Wrappers/Python/ccpi/optimisation/algorithms/__init__.py
+++ b/Wrappers/Python/ccpi/optimisation/algorithms/__init__.py
@@ -1,26 +1,20 @@
# -*- coding: utf-8 -*-
-# This work is part of the Core Imaging Library developed by
-# Visual Analytics and Imaging System Group of the Science Technology
-# Facilities Council, STFC
+# CCP in Tomographic Imaging (CCPi) Core Imaging Library (CIL).
-# Copyright 2019 Edoardo Pasca
+# Copyright 2017 UKRI-STFC
+# Copyright 2017 University of Manchester
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
-# http://www.apache.org/licenses/LICENSE-2.0
+# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
-"""
-Created on Thu Feb 21 11:03:13 2019
-
-@author: ofn77899
-"""
from .Algorithm import Algorithm
from .CGLS import CGLS
diff --git a/Wrappers/Python/ccpi/optimisation/functions/BlockFunction.py b/Wrappers/Python/ccpi/optimisation/functions/BlockFunction.py
index 3765685..6d4b4e1 100644
--- a/Wrappers/Python/ccpi/optimisation/functions/BlockFunction.py
+++ b/Wrappers/Python/ccpi/optimisation/functions/BlockFunction.py
@@ -1,10 +1,20 @@
-#!/usr/bin/env python3
# -*- coding: utf-8 -*-
-"""
-Created on Fri Mar 8 10:01:31 2019
+# CCP in Tomographic Imaging (CCPi) Core Imaging Library (CIL).
-@author: evangelos
-"""
+# Copyright 2017 UKRI-STFC
+# Copyright 2017 University of Manchester
+
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+
+# http://www.apache.org/licenses/LICENSE-2.0
+
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
from ccpi.optimisation.functions import Function
from ccpi.framework import BlockDataContainer
diff --git a/Wrappers/Python/ccpi/optimisation/functions/Function.py b/Wrappers/Python/ccpi/optimisation/functions/Function.py
index ba33666..9a6009f 100644
--- a/Wrappers/Python/ccpi/optimisation/functions/Function.py
+++ b/Wrappers/Python/ccpi/optimisation/functions/Function.py
@@ -1,15 +1,14 @@
# -*- coding: utf-8 -*-
-# This work is part of the Core Imaging Library developed by
-# Visual Analytics and Imaging System Group of the Science Technology
-# Facilities Council, STFC
+# CCP in Tomographic Imaging (CCPi) Core Imaging Library (CIL).
-# Copyright 2018-2019 Jakob Jorgensen, Daniil Kazantsev and Edoardo Pasca
+# Copyright 2017 UKRI-STFC
+# Copyright 2017 University of Manchester
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
-# http://www.apache.org/licenses/LICENSE-2.0
+# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/Wrappers/Python/ccpi/optimisation/functions/FunctionOperatorComposition.py b/Wrappers/Python/ccpi/optimisation/functions/FunctionOperatorComposition.py
index a2445cd..24ebbf0 100644
--- a/Wrappers/Python/ccpi/optimisation/functions/FunctionOperatorComposition.py
+++ b/Wrappers/Python/ccpi/optimisation/functions/FunctionOperatorComposition.py
@@ -1,11 +1,20 @@
-#!/usr/bin/env python3
# -*- coding: utf-8 -*-
-"""
-Created on Fri Mar 8 09:55:36 2019
+# CCP in Tomographic Imaging (CCPi) Core Imaging Library (CIL).
-@author: evangelos
-"""
+# Copyright 2017 UKRI-STFC
+# Copyright 2017 University of Manchester
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+
+# http://www.apache.org/licenses/LICENSE-2.0
+
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
from ccpi.optimisation.functions import Function
from ccpi.optimisation.functions import ScaledFunction
diff --git a/Wrappers/Python/ccpi/optimisation/functions/FunctionOperatorComposition_old.py b/Wrappers/Python/ccpi/optimisation/functions/FunctionOperatorComposition_old.py
deleted file mode 100644
index 70511bb..0000000
--- a/Wrappers/Python/ccpi/optimisation/functions/FunctionOperatorComposition_old.py
+++ /dev/null
@@ -1,85 +0,0 @@
-#!/usr/bin/env python3
-# -*- coding: utf-8 -*-
-"""
-Created on Fri Mar 8 09:55:36 2019
-
-@author: evangelos
-"""
-
-from ccpi.optimisation.functions import Function
-from ccpi.optimisation.functions import ScaledFunction
-
-
-class FunctionOperatorComposition(Function):
-
- ''' Function composition with Operator, i.e., f(Ax)
-
- A: operator
- f: function
-
- '''
-
- def __init__(self, operator, function):
-
- super(FunctionOperatorComposition, self).__init__()
- self.function = function
- self.operator = operator
- alpha = 1
-
- if isinstance (function, ScaledFunction):
- alpha = function.scalar
- self.L = 2 * alpha * operator.norm()**2
-
-
- def __call__(self, x):
-
- ''' Evaluate FunctionOperatorComposition at x
-
- returns f(Ax)
-
- '''
-
- return self.function(self.operator.direct(x))
-
- #TODO do not know if we need it
- def call_adjoint(self, x):
-
- return self.function(self.operator.adjoint(x))
-
-
- def convex_conjugate(self, x):
-
- ''' convex_conjugate does not take into account the Operator'''
- return self.function.convex_conjugate(x)
-
- def proximal(self, x, tau, out=None):
-
- '''proximal does not take into account the Operator'''
- if out is None:
- return self.function.proximal(x, tau)
- else:
- self.function.proximal(x, tau, out=out)
-
-
- def proximal_conjugate(self, x, tau, out=None):
-
- ''' proximal conjugate does not take into account the Operator'''
- if out is None:
- return self.function.proximal_conjugate(x, tau)
- else:
- self.function.proximal_conjugate(x, tau, out=out)
-
- def gradient(self, x, out=None):
-
- ''' Gradient takes into account the Operator'''
- if out is None:
- return self.operator.adjoint(
- self.function.gradient(self.operator.direct(x))
- )
- else:
- self.operator.adjoint(
- self.function.gradient(self.operator.direct(x),
- out=out)
- )
-
- \ No newline at end of file
diff --git a/Wrappers/Python/ccpi/optimisation/functions/IndicatorBox.py b/Wrappers/Python/ccpi/optimisation/functions/IndicatorBox.py
index 7fec65e..2001a56 100755
--- a/Wrappers/Python/ccpi/optimisation/functions/IndicatorBox.py
+++ b/Wrappers/Python/ccpi/optimisation/functions/IndicatorBox.py
@@ -1,24 +1,20 @@
-#========================================================================
-# Copyright 2019 Science Technology Facilities Council
-# Copyright 2019 University of Manchester
-#
-# This work is part of the Core Imaging Library developed by Science Technology
-# Facilities Council and University of Manchester
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0.txt
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-#=========================================================================
+# -*- coding: utf-8 -*-
+# CCP in Tomographic Imaging (CCPi) Core Imaging Library (CIL).
+# Copyright 2017 UKRI-STFC
+# Copyright 2017 University of Manchester
+
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+
+# http://www.apache.org/licenses/LICENSE-2.0
+
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
from ccpi.optimisation.functions import Function
import numpy
diff --git a/Wrappers/Python/ccpi/optimisation/functions/KullbackLeibler.py b/Wrappers/Python/ccpi/optimisation/functions/KullbackLeibler.py
index 6920829..2a87205 100644
--- a/Wrappers/Python/ccpi/optimisation/functions/KullbackLeibler.py
+++ b/Wrappers/Python/ccpi/optimisation/functions/KullbackLeibler.py
@@ -1,22 +1,20 @@
# -*- coding: utf-8 -*-
-# This work is part of the Core Imaging Library developed by
-# Visual Analytics and Imaging System Group of the Science Technology
-# Facilities Council, STFC
+# CCP in Tomographic Imaging (CCPi) Core Imaging Library (CIL).
-# Copyright 2018-2019 Evangelos Papoutsellis and Edoardo Pasca
+# Copyright 2017 UKRI-STFC
+# Copyright 2017 University of Manchester
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
-# http://www.apache.org/licenses/LICENSE-2.0
+# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
-
import numpy
from ccpi.optimisation.functions import Function
from ccpi.optimisation.functions.ScaledFunction import ScaledFunction
diff --git a/Wrappers/Python/ccpi/optimisation/functions/L1Norm.py b/Wrappers/Python/ccpi/optimisation/functions/L1Norm.py
index 37c2016..08c3d17 100644
--- a/Wrappers/Python/ccpi/optimisation/functions/L1Norm.py
+++ b/Wrappers/Python/ccpi/optimisation/functions/L1Norm.py
@@ -1,24 +1,20 @@
-#========================================================================
-# Copyright 2019 Science Technology Facilities Council
-# Copyright 2019 University of Manchester
-#
-# This work is part of the Core Imaging Library developed by Science Technology
-# Facilities Council and University of Manchester
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0.txt
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-#=========================================================================
+# -*- coding: utf-8 -*-
+# CCP in Tomographic Imaging (CCPi) Core Imaging Library (CIL).
+# Copyright 2017 UKRI-STFC
+# Copyright 2017 University of Manchester
+
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+
+# http://www.apache.org/licenses/LICENSE-2.0
+
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
from ccpi.optimisation.functions import Function
from ccpi.optimisation.functions.ScaledFunction import ScaledFunction
diff --git a/Wrappers/Python/ccpi/optimisation/functions/L2NormSquared.py b/Wrappers/Python/ccpi/optimisation/functions/L2NormSquared.py
index 2f05119..2afae25 100644
--- a/Wrappers/Python/ccpi/optimisation/functions/L2NormSquared.py
+++ b/Wrappers/Python/ccpi/optimisation/functions/L2NormSquared.py
@@ -1,15 +1,14 @@
# -*- coding: utf-8 -*-
-# This work is part of the Core Imaging Library developed by
-# Visual Analytics and Imaging System Group of the Science Technology
-# Facilities Council, STFC
+# CCP in Tomographic Imaging (CCPi) Core Imaging Library (CIL).
-# Copyright 2018-2019 Evangelos Papoutsellis and Edoardo Pasca
+# Copyright 2017 UKRI-STFC
+# Copyright 2017 University of Manchester
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
-# http://www.apache.org/licenses/LICENSE-2.0
+# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/Wrappers/Python/ccpi/optimisation/functions/MixedL21Norm.py b/Wrappers/Python/ccpi/optimisation/functions/MixedL21Norm.py
index e8f6da4..d7d23a5 100755
--- a/Wrappers/Python/ccpi/optimisation/functions/MixedL21Norm.py
+++ b/Wrappers/Python/ccpi/optimisation/functions/MixedL21Norm.py
@@ -1,15 +1,14 @@
# -*- coding: utf-8 -*-
-# This work is part of the Core Imaging Library developed by
-# Visual Analytics and Imaging System Group of the Science Technology
-# Facilities Council, STFC
+# CCP in Tomographic Imaging (CCPi) Core Imaging Library (CIL).
-# Copyright 2018-2019 Evangelos Papoutsellis and Edoardo Pasca
+# Copyright 2017 UKRI-STFC
+# Copyright 2017 University of Manchester
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
-# http://www.apache.org/licenses/LICENSE-2.0
+# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/Wrappers/Python/ccpi/optimisation/functions/Norm2Sq.py b/Wrappers/Python/ccpi/optimisation/functions/Norm2Sq.py
index 8e77f56..204fdc4 100755
--- a/Wrappers/Python/ccpi/optimisation/functions/Norm2Sq.py
+++ b/Wrappers/Python/ccpi/optimisation/functions/Norm2Sq.py
@@ -1,15 +1,14 @@
# -*- coding: utf-8 -*-
-# This work is part of the Core Imaging Library developed by
-# Visual Analytics and Imaging System Group of the Science Technology
-# Facilities Council, STFC
+# CCP in Tomographic Imaging (CCPi) Core Imaging Library (CIL).
-# Copyright 2018-2019 Jakob Jorgensen, Daniil Kazantsev and Edoardo Pasca
+# Copyright 2017 UKRI-STFC
+# Copyright 2017 University of Manchester
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
-# http://www.apache.org/licenses/LICENSE-2.0
+# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/Wrappers/Python/ccpi/optimisation/functions/ScaledFunction.py b/Wrappers/Python/ccpi/optimisation/functions/ScaledFunction.py
index 8bf502a..df008e0 100755
--- a/Wrappers/Python/ccpi/optimisation/functions/ScaledFunction.py
+++ b/Wrappers/Python/ccpi/optimisation/functions/ScaledFunction.py
@@ -1,15 +1,14 @@
# -*- coding: utf-8 -*-
-# This work is part of the Core Imaging Library developed by
-# Visual Analytics and Imaging System Group of the Science Technology
-# Facilities Council, STFC
+# CCP in Tomographic Imaging (CCPi) Core Imaging Library (CIL).
-# Copyright 2018-2019 Evangelos Papoutsellis and Edoardo Pasca
+# Copyright 2017 UKRI-STFC
+# Copyright 2017 University of Manchester
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
-# http://www.apache.org/licenses/LICENSE-2.0
+# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/Wrappers/Python/ccpi/optimisation/functions/ZeroFunction.py b/Wrappers/Python/ccpi/optimisation/functions/ZeroFunction.py
index a019815..fb990f8 100644
--- a/Wrappers/Python/ccpi/optimisation/functions/ZeroFunction.py
+++ b/Wrappers/Python/ccpi/optimisation/functions/ZeroFunction.py
@@ -1,15 +1,14 @@
# -*- coding: utf-8 -*-
-# This work is part of the Core Imaging Library developed by
-# Visual Analytics and Imaging System Group of the Science Technology
-# Facilities Council, STFC
+# CCP in Tomographic Imaging (CCPi) Core Imaging Library (CIL).
-# Copyright 2018-2019 Evangelos Papoutsellis and Edoardo Pasca
+# Copyright 2017 UKRI-STFC
+# Copyright 2017 University of Manchester
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
-# http://www.apache.org/licenses/LICENSE-2.0
+# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/Wrappers/Python/ccpi/optimisation/functions/__init__.py b/Wrappers/Python/ccpi/optimisation/functions/__init__.py
index c0eab31..67abeef 100644
--- a/Wrappers/Python/ccpi/optimisation/functions/__init__.py
+++ b/Wrappers/Python/ccpi/optimisation/functions/__init__.py
@@ -1,5 +1,20 @@
# -*- coding: utf-8 -*-
+# CCP in Tomographic Imaging (CCPi) Core Imaging Library (CIL).
+# Copyright 2017 UKRI-STFC
+# Copyright 2017 University of Manchester
+
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+
+# http://www.apache.org/licenses/LICENSE-2.0
+
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
from .Function import Function
from .ZeroFunction import ZeroFunction
from .L1Norm import L1Norm
diff --git a/Wrappers/Python/ccpi/optimisation/operators/BlockOperator.py b/Wrappers/Python/ccpi/optimisation/operators/BlockOperator.py
index cbdc420..5dfd6ba 100755
--- a/Wrappers/Python/ccpi/optimisation/operators/BlockOperator.py
+++ b/Wrappers/Python/ccpi/optimisation/operators/BlockOperator.py
@@ -1,10 +1,20 @@
# -*- coding: utf-8 -*-
-"""
-Created on Thu Feb 14 12:36:40 2019
+# CCP in Tomographic Imaging (CCPi) Core Imaging Library (CIL).
-@author: ofn77899
-"""
-#from ccpi.optimisation.ops import Operator
+# Copyright 2017 UKRI-STFC
+# Copyright 2017 University of Manchester
+
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+
+# http://www.apache.org/licenses/LICENSE-2.0
+
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
import numpy
from numbers import Number
import functools
diff --git a/Wrappers/Python/ccpi/optimisation/operators/BlockScaledOperator.py b/Wrappers/Python/ccpi/optimisation/operators/BlockScaledOperator.py
index 74ba9e4..30b750d 100644
--- a/Wrappers/Python/ccpi/optimisation/operators/BlockScaledOperator.py
+++ b/Wrappers/Python/ccpi/optimisation/operators/BlockScaledOperator.py
@@ -1,3 +1,20 @@
+# -*- coding: utf-8 -*-
+# CCP in Tomographic Imaging (CCPi) Core Imaging Library (CIL).
+
+# Copyright 2017 UKRI-STFC
+# Copyright 2017 University of Manchester
+
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+
+# http://www.apache.org/licenses/LICENSE-2.0
+
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
from numbers import Number
import numpy
from ccpi.optimisation.operators import ScaledOperator
diff --git a/Wrappers/Python/ccpi/optimisation/operators/FiniteDifferenceOperator.py b/Wrappers/Python/ccpi/optimisation/operators/FiniteDifferenceOperator.py
index 876f45f..cb8cb65 100644
--- a/Wrappers/Python/ccpi/optimisation/operators/FiniteDifferenceOperator.py
+++ b/Wrappers/Python/ccpi/optimisation/operators/FiniteDifferenceOperator.py
@@ -1,11 +1,20 @@
-#!/usr/bin/env python3
# -*- coding: utf-8 -*-
-"""
-Created on Fri Mar 1 22:51:17 2019
+# CCP in Tomographic Imaging (CCPi) Core Imaging Library (CIL).
-@author: evangelos
-"""
+# Copyright 2017 UKRI-STFC
+# Copyright 2017 University of Manchester
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+
+# http://www.apache.org/licenses/LICENSE-2.0
+
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
from ccpi.optimisation.operators import LinearOperator
from ccpi.framework import ImageData, BlockDataContainer
import numpy as np
diff --git a/Wrappers/Python/ccpi/optimisation/operators/GradientOperator.py b/Wrappers/Python/ccpi/optimisation/operators/GradientOperator.py
index cd58b7d..b3b23bf 100644
--- a/Wrappers/Python/ccpi/optimisation/operators/GradientOperator.py
+++ b/Wrappers/Python/ccpi/optimisation/operators/GradientOperator.py
@@ -1,11 +1,20 @@
-#!/usr/bin/env python3
# -*- coding: utf-8 -*-
-"""
-Created on Fri Mar 1 22:50:04 2019
+# CCP in Tomographic Imaging (CCPi) Core Imaging Library (CIL).
-@author: evangelos
-"""
+# Copyright 2017 UKRI-STFC
+# Copyright 2017 University of Manchester
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+
+# http://www.apache.org/licenses/LICENSE-2.0
+
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
from ccpi.optimisation.operators import Operator, LinearOperator, ScaledOperator
from ccpi.framework import ImageData, ImageGeometry, BlockGeometry, BlockDataContainer
import numpy
diff --git a/Wrappers/Python/ccpi/optimisation/operators/IdentityOperator.py b/Wrappers/Python/ccpi/optimisation/operators/IdentityOperator.py
index 8f35373..54dce08 100644
--- a/Wrappers/Python/ccpi/optimisation/operators/IdentityOperator.py
+++ b/Wrappers/Python/ccpi/optimisation/operators/IdentityOperator.py
@@ -1,10 +1,20 @@
-#!/usr/bin/env python3
# -*- coding: utf-8 -*-
-"""
-Created on Wed Mar 6 19:30:51 2019
+# CCP in Tomographic Imaging (CCPi) Core Imaging Library (CIL).
-@author: evangelos
-"""
+# Copyright 2017 UKRI-STFC
+# Copyright 2017 University of Manchester
+
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+
+# http://www.apache.org/licenses/LICENSE-2.0
+
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
from ccpi.optimisation.operators import LinearOperator
import scipy.sparse as sp
diff --git a/Wrappers/Python/ccpi/optimisation/operators/LinearOperator.py b/Wrappers/Python/ccpi/optimisation/operators/LinearOperator.py
index 55eb692..b254d08 100755
--- a/Wrappers/Python/ccpi/optimisation/operators/LinearOperator.py
+++ b/Wrappers/Python/ccpi/optimisation/operators/LinearOperator.py
@@ -1,9 +1,20 @@
# -*- coding: utf-8 -*-
-"""
-Created on Tue Mar 5 15:57:52 2019
+# CCP in Tomographic Imaging (CCPi) Core Imaging Library (CIL).
-@author: ofn77899
-"""
+# Copyright 2017 UKRI-STFC
+# Copyright 2017 University of Manchester
+
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+
+# http://www.apache.org/licenses/LICENSE-2.0
+
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
from ccpi.optimisation.operators import Operator
from ccpi.framework import ImageGeometry
diff --git a/Wrappers/Python/ccpi/optimisation/operators/LinearOperatorMatrix.py b/Wrappers/Python/ccpi/optimisation/operators/LinearOperatorMatrix.py
index 90ef938..fbc3c83 100644
--- a/Wrappers/Python/ccpi/optimisation/operators/LinearOperatorMatrix.py
+++ b/Wrappers/Python/ccpi/optimisation/operators/LinearOperatorMatrix.py
@@ -1,3 +1,20 @@
+# -*- coding: utf-8 -*-
+# CCP in Tomographic Imaging (CCPi) Core Imaging Library (CIL).
+
+# Copyright 2017 UKRI-STFC
+# Copyright 2017 University of Manchester
+
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+
+# http://www.apache.org/licenses/LICENSE-2.0
+
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
import numpy
from scipy.sparse.linalg import svds
from ccpi.framework import DataContainer
diff --git a/Wrappers/Python/ccpi/optimisation/operators/Operator.py b/Wrappers/Python/ccpi/optimisation/operators/Operator.py
index c1adf62..2678bf2 100755
--- a/Wrappers/Python/ccpi/optimisation/operators/Operator.py
+++ b/Wrappers/Python/ccpi/optimisation/operators/Operator.py
@@ -1,9 +1,20 @@
# -*- coding: utf-8 -*-
-"""
-Created on Tue Mar 5 15:55:56 2019
+# CCP in Tomographic Imaging (CCPi) Core Imaging Library (CIL).
-@author: ofn77899
-"""
+# Copyright 2017 UKRI-STFC
+# Copyright 2017 University of Manchester
+
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+
+# http://www.apache.org/licenses/LICENSE-2.0
+
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
from ccpi.optimisation.operators.ScaledOperator import ScaledOperator
class Operator(object):
diff --git a/Wrappers/Python/ccpi/optimisation/operators/ScaledOperator.py b/Wrappers/Python/ccpi/optimisation/operators/ScaledOperator.py
index f7be5de..b9ebef1 100644
--- a/Wrappers/Python/ccpi/optimisation/operators/ScaledOperator.py
+++ b/Wrappers/Python/ccpi/optimisation/operators/ScaledOperator.py
@@ -1,3 +1,20 @@
+# -*- coding: utf-8 -*-
+# CCP in Tomographic Imaging (CCPi) Core Imaging Library (CIL).
+
+# Copyright 2017 UKRI-STFC
+# Copyright 2017 University of Manchester
+
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+
+# http://www.apache.org/licenses/LICENSE-2.0
+
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
from numbers import Number
import numpy
diff --git a/Wrappers/Python/ccpi/optimisation/operators/ShrinkageOperator.py b/Wrappers/Python/ccpi/optimisation/operators/ShrinkageOperator.py
index f47c655..1a9f1d8 100644
--- a/Wrappers/Python/ccpi/optimisation/operators/ShrinkageOperator.py
+++ b/Wrappers/Python/ccpi/optimisation/operators/ShrinkageOperator.py
@@ -1,10 +1,20 @@
-#!/usr/bin/env python3
# -*- coding: utf-8 -*-
-"""
-Created on Wed Mar 6 19:30:51 2019
+# CCP in Tomographic Imaging (CCPi) Core Imaging Library (CIL).
-@author: evangelos
-"""
+# Copyright 2017 UKRI-STFC
+# Copyright 2017 University of Manchester
+
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+
+# http://www.apache.org/licenses/LICENSE-2.0
+
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
from ccpi.framework import DataContainer
diff --git a/Wrappers/Python/ccpi/optimisation/operators/SparseFiniteDiff.py b/Wrappers/Python/ccpi/optimisation/operators/SparseFiniteDiff.py
index cb76dce..6b4d822 100644
--- a/Wrappers/Python/ccpi/optimisation/operators/SparseFiniteDiff.py
+++ b/Wrappers/Python/ccpi/optimisation/operators/SparseFiniteDiff.py
@@ -1,10 +1,20 @@
-#!/usr/bin/env python3
# -*- coding: utf-8 -*-
-"""
-Created on Tue Apr 2 14:06:15 2019
+# CCP in Tomographic Imaging (CCPi) Core Imaging Library (CIL).
-@author: vaggelis
-"""
+# Copyright 2017 UKRI-STFC
+# Copyright 2017 University of Manchester
+
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+
+# http://www.apache.org/licenses/LICENSE-2.0
+
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
import scipy.sparse as sp
import numpy as np
diff --git a/Wrappers/Python/ccpi/optimisation/operators/SymmetrizedGradientOperator.py b/Wrappers/Python/ccpi/optimisation/operators/SymmetrizedGradientOperator.py
index 205f7e1..bed56b6 100644
--- a/Wrappers/Python/ccpi/optimisation/operators/SymmetrizedGradientOperator.py
+++ b/Wrappers/Python/ccpi/optimisation/operators/SymmetrizedGradientOperator.py
@@ -1,10 +1,20 @@
-#!/usr/bin/env python3
# -*- coding: utf-8 -*-
-"""
-Created on Fri Mar 1 22:53:55 2019
+# CCP in Tomographic Imaging (CCPi) Core Imaging Library (CIL).
-@author: evangelos
-"""
+# Copyright 2017 UKRI-STFC
+# Copyright 2017 University of Manchester
+
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+
+# http://www.apache.org/licenses/LICENSE-2.0
+
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
from ccpi.optimisation.operators import Gradient, Operator, LinearOperator, ScaledOperator
from ccpi.framework import ImageData, ImageGeometry, BlockGeometry, BlockDataContainer
diff --git a/Wrappers/Python/ccpi/optimisation/operators/ZeroOperator.py b/Wrappers/Python/ccpi/optimisation/operators/ZeroOperator.py
index 67808de..b9345da 100644
--- a/Wrappers/Python/ccpi/optimisation/operators/ZeroOperator.py
+++ b/Wrappers/Python/ccpi/optimisation/operators/ZeroOperator.py
@@ -1,10 +1,20 @@
-#!/usr/bin/env python3
# -*- coding: utf-8 -*-
-"""
-Created on Wed Mar 6 19:25:53 2019
+# CCP in Tomographic Imaging (CCPi) Core Imaging Library (CIL).
-@author: evangelos
-"""
+# Copyright 2017 UKRI-STFC
+# Copyright 2017 University of Manchester
+
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+
+# http://www.apache.org/licenses/LICENSE-2.0
+
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
import numpy as np
from ccpi.framework import ImageData
diff --git a/Wrappers/Python/ccpi/optimisation/operators/__init__.py b/Wrappers/Python/ccpi/optimisation/operators/__init__.py
index 23222d4..15c8932 100755
--- a/Wrappers/Python/ccpi/optimisation/operators/__init__.py
+++ b/Wrappers/Python/ccpi/optimisation/operators/__init__.py
@@ -1,9 +1,20 @@
# -*- coding: utf-8 -*-
-"""
-Created on Tue Mar 5 15:56:27 2019
+# CCP in Tomographic Imaging (CCPi) Core Imaging Library (CIL).
-@author: ofn77899
-"""
+# Copyright 2017 UKRI-STFC
+# Copyright 2017 University of Manchester
+
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+
+# http://www.apache.org/licenses/LICENSE-2.0
+
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
from .Operator import Operator
from .LinearOperator import LinearOperator
diff --git a/Wrappers/Python/ccpi/processors/CenterOfRotationFinder.py b/Wrappers/Python/ccpi/processors/CenterOfRotationFinder.py
index 936dc05..a93d761 100755
--- a/Wrappers/Python/ccpi/processors/CenterOfRotationFinder.py
+++ b/Wrappers/Python/ccpi/processors/CenterOfRotationFinder.py
@@ -1,21 +1,20 @@
# -*- coding: utf-8 -*-
-# This work is part of the Core Imaging Library developed by
-# Visual Analytics and Imaging System Group of the Science Technology
-# Facilities Council, STFC
+# CCP in Tomographic Imaging (CCPi) Core Imaging Library (CIL).
-# Copyright 2018 Edoardo Pasca
+# Copyright 2017 UKRI-STFC
+# Copyright 2017 University of Manchester
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
-# http://www.apache.org/licenses/LICENSE-2.0
+# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
-# limitations under the License
+# limitations under the License.
from ccpi.framework import DataProcessor, DataContainer, AcquisitionData,\
AcquisitionGeometry, ImageGeometry, ImageData
diff --git a/Wrappers/Python/ccpi/processors/Normalizer.py b/Wrappers/Python/ccpi/processors/Normalizer.py
index da65e5c..905a06b 100755
--- a/Wrappers/Python/ccpi/processors/Normalizer.py
+++ b/Wrappers/Python/ccpi/processors/Normalizer.py
@@ -1,21 +1,20 @@
# -*- coding: utf-8 -*-
-# This work is part of the Core Imaging Library developed by
-# Visual Analytics and Imaging System Group of the Science Technology
-# Facilities Council, STFC
+# CCP in Tomographic Imaging (CCPi) Core Imaging Library (CIL).
-# Copyright 2018 Edoardo Pasca
+# Copyright 2017 UKRI-STFC
+# Copyright 2017 University of Manchester
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
-# http://www.apache.org/licenses/LICENSE-2.0
+# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
-# limitations under the License
+# limitations under the License.
from ccpi.framework import DataProcessor, DataContainer, AcquisitionData,\
AcquisitionGeometry, ImageGeometry, ImageData
diff --git a/Wrappers/Python/ccpi/processors/Resizer.py b/Wrappers/Python/ccpi/processors/Resizer.py
index 7509a90..6ddd823 100755
--- a/Wrappers/Python/ccpi/processors/Resizer.py
+++ b/Wrappers/Python/ccpi/processors/Resizer.py
@@ -1,22 +1,20 @@
# -*- coding: utf-8 -*-
-# This work is part of the Core Imaging Library developed by
-# Visual Analytics and Imaging System Group of the Science Technology
-# Facilities Council, STFC
+# CCP in Tomographic Imaging (CCPi) Core Imaging Library (CIL).
-# Copyright 2018 Edoardo Pasca
+# Copyright 2017 UKRI-STFC
+# Copyright 2017 University of Manchester
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
-# http://www.apache.org/licenses/LICENSE-2.0
+# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
-# limitations under the License
-
+# limitations under the License.
from ccpi.framework import DataProcessor, AcquisitionData, ImageData
import warnings
diff --git a/Wrappers/Python/ccpi/processors/__init__.py b/Wrappers/Python/ccpi/processors/__init__.py
index cba5897..180a8c5 100755
--- a/Wrappers/Python/ccpi/processors/__init__.py
+++ b/Wrappers/Python/ccpi/processors/__init__.py
@@ -1,10 +1,20 @@
# -*- coding: utf-8 -*-
-"""
-Created on Tue Apr 30 13:51:09 2019
+# CCP in Tomographic Imaging (CCPi) Core Imaging Library (CIL).
-@author: ofn77899
-"""
+# Copyright 2017 UKRI-STFC
+# Copyright 2017 University of Manchester
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+
+# http://www.apache.org/licenses/LICENSE-2.0
+
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
from .CenterOfRotationFinder import CenterOfRotationFinder
from .Normalizer import Normalizer
from .Resizer import Resizer
diff --git a/Wrappers/Python/setup.py b/Wrappers/Python/setup.py
index 9e9b1f5..e680df3 100644
--- a/Wrappers/Python/setup.py
+++ b/Wrappers/Python/setup.py
@@ -1,16 +1,14 @@
-#!/usr/bin/env python
# -*- coding: utf-8 -*-
-# This work is part of the Core Imaging Library developed by
-# Visual Analytics and Imaging System Group of the Science Technology
-# Facilities Council, STFC
+# CCP in Tomographic Imaging (CCPi) Core Imaging Library (CIL).
-# Copyright 2018 Edoardo Pasca
+# Copyright 2017 UKRI-STFC
+# Copyright 2017 University of Manchester
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
-# http://www.apache.org/licenses/LICENSE-2.0
+# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/Wrappers/Python/test/test_BlockDataContainer.py b/Wrappers/Python/test/test_BlockDataContainer.py
index aeb8454..e73b7c6 100755
--- a/Wrappers/Python/test/test_BlockDataContainer.py
+++ b/Wrappers/Python/test/test_BlockDataContainer.py
@@ -1,9 +1,20 @@
# -*- coding: utf-8 -*-
-"""
-Created on Tue Mar 5 16:08:23 2019
+# CCP in Tomographic Imaging (CCPi) Core Imaging Library (CIL).
-@author: ofn77899
-"""
+# Copyright 2017 UKRI-STFC
+# Copyright 2017 University of Manchester
+
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+
+# http://www.apache.org/licenses/LICENSE-2.0
+
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
import unittest
import numpy
diff --git a/Wrappers/Python/test/test_BlockOperator.py b/Wrappers/Python/test/test_BlockOperator.py
index b82c849..d0f568b 100644
--- a/Wrappers/Python/test/test_BlockOperator.py
+++ b/Wrappers/Python/test/test_BlockOperator.py
@@ -1,3 +1,20 @@
+# -*- coding: utf-8 -*-
+# CCP in Tomographic Imaging (CCPi) Core Imaging Library (CIL).
+
+# Copyright 2017 UKRI-STFC
+# Copyright 2017 University of Manchester
+
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+
+# http://www.apache.org/licenses/LICENSE-2.0
+
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
import unittest
from ccpi.optimisation.operators import BlockOperator
from ccpi.framework import BlockDataContainer
diff --git a/Wrappers/Python/test/test_DataContainer.py b/Wrappers/Python/test/test_DataContainer.py
index 16f7b86..59e2865 100755
--- a/Wrappers/Python/test/test_DataContainer.py
+++ b/Wrappers/Python/test/test_DataContainer.py
@@ -1,9 +1,20 @@
# -*- coding: utf-8 -*-
-"""
-Created on Wed Feb 27 15:08:21 2019
+# CCP in Tomographic Imaging (CCPi) Core Imaging Library (CIL).
-@author: ofn77899
-"""
+# Copyright 2017 UKRI-STFC
+# Copyright 2017 University of Manchester
+
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+
+# http://www.apache.org/licenses/LICENSE-2.0
+
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
import sys
import unittest
import numpy
diff --git a/Wrappers/Python/test/test_DataProcessor.py b/Wrappers/Python/test/test_DataProcessor.py
index 3e6a83e..066b236 100755
--- a/Wrappers/Python/test/test_DataProcessor.py
+++ b/Wrappers/Python/test/test_DataProcessor.py
@@ -1,3 +1,20 @@
+# -*- coding: utf-8 -*-
+# CCP in Tomographic Imaging (CCPi) Core Imaging Library (CIL).
+
+# Copyright 2017 UKRI-STFC
+# Copyright 2017 University of Manchester
+
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+
+# http://www.apache.org/licenses/LICENSE-2.0
+
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
import sys
import unittest
import numpy
diff --git a/Wrappers/Python/test/test_Gradient.py b/Wrappers/Python/test/test_Gradient.py
index 4b7a034..5dc8137 100755
--- a/Wrappers/Python/test/test_Gradient.py
+++ b/Wrappers/Python/test/test_Gradient.py
@@ -1,10 +1,25 @@
+# -*- coding: utf-8 -*-
+# CCP in Tomographic Imaging (CCPi) Core Imaging Library (CIL).
+
+# Copyright 2017 UKRI-STFC
+# Copyright 2017 University of Manchester
+
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+
+# http://www.apache.org/licenses/LICENSE-2.0
+
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
import unittest
import numpy
from ccpi.framework import ImageGeometry, AcquisitionGeometry
from ccpi.framework import ImageData, AcquisitionData
-#from ccpi.optimisation.algorithms import GradientDescent
from ccpi.framework import BlockDataContainer
-#from ccpi.optimisation.Algorithms import CGLS
import functools
from ccpi.optimisation.operators import Gradient, Identity, BlockOperator
diff --git a/Wrappers/Python/test/test_NexusReader.py b/Wrappers/Python/test/test_NexusReader.py
index a498d71..71a05c2 100755
--- a/Wrappers/Python/test/test_NexusReader.py
+++ b/Wrappers/Python/test/test_NexusReader.py
@@ -1,9 +1,20 @@
# -*- coding: utf-8 -*-
-"""
-Created on Wed Feb 27 15:05:00 2019
+# CCP in Tomographic Imaging (CCPi) Core Imaging Library (CIL).
-@author: ofn77899
-"""
+# Copyright 2017 UKRI-STFC
+# Copyright 2017 University of Manchester
+
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+
+# http://www.apache.org/licenses/LICENSE-2.0
+
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
import unittest
import wget
diff --git a/Wrappers/Python/test/test_NexusReaderWriter.py b/Wrappers/Python/test/test_NexusReaderWriter.py
index 9add7b7..620b8ff 100644
--- a/Wrappers/Python/test/test_NexusReaderWriter.py
+++ b/Wrappers/Python/test/test_NexusReaderWriter.py
@@ -1,3 +1,20 @@
+# -*- coding: utf-8 -*-
+# CCP in Tomographic Imaging (CCPi) Core Imaging Library (CIL).
+
+# Copyright 2017 UKRI-STFC
+# Copyright 2017 University of Manchester
+
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+
+# http://www.apache.org/licenses/LICENSE-2.0
+
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
import unittest
import os
from ccpi.io import NEXUSDataReader
diff --git a/Wrappers/Python/test/test_Operator.py b/Wrappers/Python/test/test_Operator.py
index d890e46..1ec7761 100644
--- a/Wrappers/Python/test/test_Operator.py
+++ b/Wrappers/Python/test/test_Operator.py
@@ -1,6 +1,21 @@
+# -*- coding: utf-8 -*-
+# CCP in Tomographic Imaging (CCPi) Core Imaging Library (CIL).
+
+# Copyright 2017 UKRI-STFC
+# Copyright 2017 University of Manchester
+
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+
+# http://www.apache.org/licenses/LICENSE-2.0
+
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
import unittest
-#from ccpi.optimisation.operators import Operator
-#from ccpi.optimisation.ops import TomoIdentity
from ccpi.framework import ImageGeometry, ImageData, BlockDataContainer, DataContainer
from ccpi.optimisation.operators import BlockOperator, BlockScaledOperator,\
FiniteDiff
diff --git a/Wrappers/Python/test/test_TestData.py b/Wrappers/Python/test/test_TestData.py
index fa0b98f..9c006ec 100755
--- a/Wrappers/Python/test/test_TestData.py
+++ b/Wrappers/Python/test/test_TestData.py
@@ -1,3 +1,20 @@
+# -*- coding: utf-8 -*-
+# CCP in Tomographic Imaging (CCPi) Core Imaging Library (CIL).
+
+# Copyright 2017 UKRI-STFC
+# Copyright 2017 University of Manchester
+
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+
+# http://www.apache.org/licenses/LICENSE-2.0
+
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
import numpy
from ccpi.framework import TestData
import os, sys
diff --git a/Wrappers/Python/test/test_algorithms.py b/Wrappers/Python/test/test_algorithms.py
index 4bcc95a..f00467c 100755
--- a/Wrappers/Python/test/test_algorithms.py
+++ b/Wrappers/Python/test/test_algorithms.py
@@ -1,9 +1,20 @@
# -*- coding: utf-8 -*-
-"""
-Created on Wed Feb 27 15:11:36 2019
+# CCP in Tomographic Imaging (CCPi) Core Imaging Library (CIL).
-@author: ofn77899
-"""
+# Copyright 2017 UKRI-STFC
+# Copyright 2017 University of Manchester
+
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+
+# http://www.apache.org/licenses/LICENSE-2.0
+
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
import unittest
import numpy
diff --git a/Wrappers/Python/test/test_functions.py b/Wrappers/Python/test/test_functions.py
index 021ad99..550f1de 100644
--- a/Wrappers/Python/test/test_functions.py
+++ b/Wrappers/Python/test/test_functions.py
@@ -1,14 +1,22 @@
-#!/usr/bin/env python3
# -*- coding: utf-8 -*-
-"""
-Created on Sat Mar 2 19:24:37 2019
+# CCP in Tomographic Imaging (CCPi) Core Imaging Library (CIL).
-@author: evangelos
-"""
+# Copyright 2017 UKRI-STFC
+# Copyright 2017 University of Manchester
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+
+# http://www.apache.org/licenses/LICENSE-2.0
+
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
import numpy as np
-#from ccpi.optimisation.funcs import Function
from ccpi.optimisation.functions import Function, KullbackLeibler
from ccpi.framework import DataContainer, ImageData, ImageGeometry
from ccpi.optimisation.operators import Identity
@@ -27,8 +35,6 @@ from ccpi.optimisation.functions import FunctionOperatorComposition
import unittest
import numpy
-#
-
class TestFunction(unittest.TestCase):
def assertBlockDataContainerEqual(self, container1, container2):
diff --git a/Wrappers/Python/test/test_run_test.py b/Wrappers/Python/test/test_run_test.py
index 81ee738..78f1a7b 100755
--- a/Wrappers/Python/test/test_run_test.py
+++ b/Wrappers/Python/test/test_run_test.py
@@ -1,3 +1,20 @@
+# -*- coding: utf-8 -*-
+# CCP in Tomographic Imaging (CCPi) Core Imaging Library (CIL).
+
+# Copyright 2017 UKRI-STFC
+# Copyright 2017 University of Manchester
+
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+
+# http://www.apache.org/licenses/LICENSE-2.0
+
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
import unittest
import numpy
import numpy as np
@@ -7,18 +24,14 @@ from ccpi.framework import AcquisitionData
from ccpi.framework import ImageGeometry
from ccpi.framework import AcquisitionGeometry
from ccpi.optimisation.algorithms import FISTA
-#from ccpi.optimisation.algs import FBPD
from ccpi.optimisation.functions import Norm2Sq
from ccpi.optimisation.functions import ZeroFunction
-# from ccpi.optimisation.funcs import Norm1
from ccpi.optimisation.functions import L1Norm
from ccpi.optimisation.operators import LinearOperatorMatrix
from ccpi.optimisation.operators import Identity
-#from ccpi.optimisation.ops import PowerMethodNonsquare
from ccpi.optimisation.operators import LinearOperator
-
import numpy.testing
try:
diff --git a/Wrappers/Python/test/testclass.py b/Wrappers/Python/test/testclass.py
index 51b9f3f..b0909d7 100755
--- a/Wrappers/Python/test/testclass.py
+++ b/Wrappers/Python/test/testclass.py
@@ -1,3 +1,20 @@
+# -*- coding: utf-8 -*-
+# CCP in Tomographic Imaging (CCPi) Core Imaging Library (CIL).
+
+# Copyright 2017 UKRI-STFC
+# Copyright 2017 University of Manchester
+
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+
+# http://www.apache.org/licenses/LICENSE-2.0
+
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
import unittest
from ccpi.framework import ImageGeometry, ImageData, BlockDataContainer, DataContainer
import numpy