From 9a4372d61fc3c2c0661d479ffe4a13193c7f8862 Mon Sep 17 00:00:00 2001
From: Willem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl>
Date: Wed, 19 Oct 2016 12:37:35 +0200
Subject: Fix Python create_projector docstring

---
 python/astra/creators.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'python')

diff --git a/python/astra/creators.py b/python/astra/creators.py
index 18504ea..7009884 100644
--- a/python/astra/creators.py
+++ b/python/astra/creators.py
@@ -535,7 +535,7 @@ def create_reconstruction(rec_type, proj_id, sinogram, iterations=1, use_mask='n
 
 
 def create_projector(proj_type, proj_geom, vol_geom):
-    """Create a 2D projector.
+    """Create a 2D or 3D projector.
 
 :param proj_type: Projector type, such as ``'line'``, ``'linear'``, ...
 :type proj_type: :class:`string`
-- 
cgit v1.2.3


From ba0895b5299512e5028429e9e0111ab9944899cc Mon Sep 17 00:00:00 2001
From: Willem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl>
Date: Tue, 26 Apr 2016 16:45:33 +0200
Subject: Add SIRT plugin

---
 python/astra/__init__.py         |  1 +
 python/astra/plugins/__init__.py | 28 +++++++++++++
 python/astra/plugins/sirt.py     | 90 ++++++++++++++++++++++++++++++++++++++++
 python/builder.py                |  2 +-
 4 files changed, 120 insertions(+), 1 deletion(-)
 create mode 100644 python/astra/plugins/__init__.py
 create mode 100644 python/astra/plugins/sirt.py

(limited to 'python')

diff --git a/python/astra/__init__.py b/python/astra/__init__.py
index 515d9a2..f4f5fe8 100644
--- a/python/astra/__init__.py
+++ b/python/astra/__init__.py
@@ -35,6 +35,7 @@ from . import projector
 from . import projector3d
 from . import matrix
 from . import plugin
+from . import plugins
 from . import log
 from .optomo import OpTomo
 
diff --git a/python/astra/plugins/__init__.py b/python/astra/plugins/__init__.py
new file mode 100644
index 0000000..a24b04d
--- /dev/null
+++ b/python/astra/plugins/__init__.py
@@ -0,0 +1,28 @@
+# -----------------------------------------------------------------------
+# Copyright: 2010-2016, iMinds-Vision Lab, University of Antwerp
+#            2013-2016, CWI, Amsterdam
+#
+# Contact: astra@uantwerpen.be
+# Website: http://sf.net/projects/astra-toolbox
+#
+# This file is part of the ASTRA Toolbox.
+#
+#
+# The ASTRA Toolbox is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# The ASTRA Toolbox is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with the ASTRA Toolbox. If not, see <http://www.gnu.org/licenses/>.
+#
+# -----------------------------------------------------------------------
+
+
+from .sirt import SIRTPlugin
+
diff --git a/python/astra/plugins/sirt.py b/python/astra/plugins/sirt.py
new file mode 100644
index 0000000..a0f1230
--- /dev/null
+++ b/python/astra/plugins/sirt.py
@@ -0,0 +1,90 @@
+# -----------------------------------------------------------------------
+# Copyright: 2010-2016, iMinds-Vision Lab, University of Antwerp
+#            2013-2016, CWI, Amsterdam
+#
+# Contact: astra@uantwerpen.be
+# Website: http://sf.net/projects/astra-toolbox
+#
+# This file is part of the ASTRA Toolbox.
+#
+#
+# The ASTRA Toolbox is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# The ASTRA Toolbox is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with the ASTRA Toolbox. If not, see <http://www.gnu.org/licenses/>.
+#
+# -----------------------------------------------------------------------
+
+
+import astra
+import numpy as np
+import six
+
+class SIRTPlugin(astra.plugin.base):
+    """SIRT.
+
+    Options:
+
+    'Relaxation': relaxation factor (optional)
+    'MinConstraint': constrain values to at least this (optional)
+    'MaxConstraint': constrain values to at most this (optional)
+    """
+
+    astra_name = "SIRT-PLUGIN"
+
+    def initialize(self,cfg, Relaxation = 1, MinConstraint = None, MaxConstraint = None):
+        self.W = astra.OpTomo(cfg['ProjectorId'])
+        self.vid = cfg['ReconstructionDataId']
+        self.sid = cfg['ProjectionDataId']
+        self.min_constraint = MinConstraint
+        self.max_constraint = MaxConstraint
+
+        try:
+            v = astra.data2d.get_shared(self.vid)
+            s = astra.data2d.get_shared(self.sid)
+            self.data_mod = astra.data2d
+        except Exception:
+            v = astra.data3d.get_shared(self.vid)
+            s = astra.data3d.get_shared(self.sid)
+            self.data_mod = astra.data3d
+
+        self.R = self.W * np.ones(v.shape,dtype=np.float32).ravel();
+        self.R[self.R < 0.000001] = np.Inf
+        self.R = 1 / self.R
+        self.R = self.R.reshape(s.shape)
+
+        self.mrC = self.W.T * np.ones(s.shape,dtype=np.float32).ravel();
+        self.mrC[self.mrC < 0.000001] = np.Inf
+        self.mrC = -Relaxation / self.mrC
+        self.mrC = self.mrC.reshape(v.shape)
+        
+
+    def run(self, its):
+        v = self.data_mod.get_shared(self.vid)
+        s = self.data_mod.get_shared(self.sid)
+        tv = np.zeros(v.shape, dtype=np.float32)
+        ts = np.zeros(s.shape, dtype=np.float32)
+        W = self.W
+        mrC = self.mrC
+        R = self.R
+        for i in range(its):
+            W.FP(v,out=ts)
+            ts -= s
+            ts *= R # ts = R * (W*v - s)
+
+            W.BP(ts,out=tv)
+            tv *= mrC
+
+            v += tv # v = v - rel * C * W' * ts
+
+            if self.min_constraint is not None or self.max_constraint is not None:
+                v.clip(min=self.min_constraint, max=self.max_constraint, out=v)
+
diff --git a/python/builder.py b/python/builder.py
index dcd62d8..243888b 100644
--- a/python/builder.py
+++ b/python/builder.py
@@ -87,6 +87,6 @@ setup (name = 'PyASTRAToolbox',
        include_dirs=[np.get_include()],
        cmdclass = cmdclass,
        #ext_modules = [Extension("astra","astra/astra.pyx")],
-       packages=['astra'],
+       packages=['astra', 'astra.plugins'],
        requires=["numpy"],
 	)
-- 
cgit v1.2.3


From 4843e28a6666b9557dc7550a9fc056adee4c21c8 Mon Sep 17 00:00:00 2001
From: Willem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl>
Date: Mon, 29 Aug 2016 14:07:20 +0200
Subject: Add CGLS plugin

---
 python/astra/plugins/__init__.py |  1 +
 python/astra/plugins/cgls.py     | 99 ++++++++++++++++++++++++++++++++++++++++
 2 files changed, 100 insertions(+)
 create mode 100644 python/astra/plugins/cgls.py

(limited to 'python')

diff --git a/python/astra/plugins/__init__.py b/python/astra/plugins/__init__.py
index a24b04d..71e9b64 100644
--- a/python/astra/plugins/__init__.py
+++ b/python/astra/plugins/__init__.py
@@ -25,4 +25,5 @@
 
 
 from .sirt import SIRTPlugin
+from .cgls import CGLSPlugin
 
diff --git a/python/astra/plugins/cgls.py b/python/astra/plugins/cgls.py
new file mode 100644
index 0000000..2f4970b
--- /dev/null
+++ b/python/astra/plugins/cgls.py
@@ -0,0 +1,99 @@
+# -----------------------------------------------------------------------
+# Copyright: 2010-2016, iMinds-Vision Lab, University of Antwerp
+#            2013-2016, CWI, Amsterdam
+#
+# Contact: astra@uantwerpen.be
+# Website: http://sf.net/projects/astra-toolbox
+#
+# This file is part of the ASTRA Toolbox.
+#
+#
+# The ASTRA Toolbox is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# The ASTRA Toolbox is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with the ASTRA Toolbox. If not, see <http://www.gnu.org/licenses/>.
+#
+# -----------------------------------------------------------------------
+
+
+import astra
+import numpy as np
+import six
+
+class CGLSPlugin(astra.plugin.base):
+    """CGLS."""
+
+    astra_name = "CGLS-PLUGIN"
+
+    def initialize(self,cfg):
+        self.W = astra.OpTomo(cfg['ProjectorId'])
+        self.vid = cfg['ReconstructionDataId']
+        self.sid = cfg['ProjectionDataId']
+
+        try:
+            v = astra.data2d.get_shared(self.vid)
+            s = astra.data2d.get_shared(self.sid)
+            self.data_mod = astra.data2d
+        except Exception:
+            v = astra.data3d.get_shared(self.vid)
+            s = astra.data3d.get_shared(self.sid)
+            self.data_mod = astra.data3d
+
+    def run(self, its):
+        v = self.data_mod.get_shared(self.vid)
+        s = self.data_mod.get_shared(self.sid)
+        z = np.zeros(v.shape, dtype=np.float32)
+        p = np.zeros(v.shape, dtype=np.float32)
+        r = np.zeros(s.shape, dtype=np.float32)
+        w = np.zeros(s.shape, dtype=np.float32)
+        W = self.W
+
+        # r = s - W*v
+        W.FP(v, out=w)
+        r[:] = s
+        r -= w
+
+        # p = W'*r
+        W.BP(r, out=p)
+
+        # gamma = <p,p>
+        gamma = np.dot(p.ravel(), p.ravel())
+
+        for i in range(its):
+            # w = W * p
+            W.FP(p, out=w)
+
+            # alpha = gamma / <w,w>
+            alpha = gamma / np.dot(w.ravel(), w.ravel())
+
+            # v += alpha * p
+            z[:] = p
+            z *= alpha
+            v += z
+
+            # r -= alpha * w
+            w *= -alpha;
+            r += w
+
+            # z = W' * r
+            W.BP(r, out=z)
+
+            # beta = <z,z> / gamma
+            newgamma = np.dot(z.ravel(), z.ravel())
+            beta = newgamma / gamma
+
+            # gamma = <z,z>
+            gamma = newgamma
+
+            # p = z + beta * p
+            p *= beta
+            p += z
+
-- 
cgit v1.2.3


From a99c472c5dce7f16822294521ab6f33e01864052 Mon Sep 17 00:00:00 2001
From: Willem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl>
Date: Mon, 21 Nov 2016 17:00:20 +0100
Subject: Update python package name from PyASTRAToolbox to astra-toolbox

---
 python/builder.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'python')

diff --git a/python/builder.py b/python/builder.py
index 243888b..7c55054 100644
--- a/python/builder.py
+++ b/python/builder.py
@@ -74,7 +74,7 @@ for m in ext_modules:
   if m.name == 'astra.plugin_c':
     m.sources.append('astra/src/PythonPluginAlgorithm.cpp')
 
-setup (name = 'PyASTRAToolbox',
+setup (name = 'astra-toolbox',
        version = '1.7.1',
        description = 'Python interface to the ASTRA-Toolbox',
        author='D.M. Pelt',
-- 
cgit v1.2.3


From 7e10c16eee71c608a1dba1dd2fec8471567f6b61 Mon Sep 17 00:00:00 2001
From: Willem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl>
Date: Mon, 21 Nov 2016 17:00:50 +0100
Subject: Overhaul package installation

There are now three ways of installing from configure/make:

./configure --with-install-type=prefix (default)

libraries go into @libdir@
matlab tools/mex go into @datadir@/astra/matlab
octave tools/mex go into @datadir@/astra/octave
python module goes into site-packages

./configure --with-install-type=dir

libraries go into @prefix@/lib
matlab tools/mex go into @prefix@/matlab
octave tools/mex go into @prefix@/octave
python module goes into @prefix@/python

./configure --with-install-type=module

matlab tools/mex go into @prefix@/matlab
octave tools/mex go into @prefix@/octave
python module goes into site-packages
library is installed along with the matlab/octave/python module(s), with rpath
---
 python/builder.py | 9 +++++++++
 1 file changed, 9 insertions(+)

(limited to 'python')

diff --git a/python/builder.py b/python/builder.py
index 7c55054..1105169 100644
--- a/python/builder.py
+++ b/python/builder.py
@@ -64,6 +64,14 @@ if cfgHasToBeUpdated:
     cfg.write(cfgToWrite)
     cfg.close()
 
+
+pkgdata = { }
+try:
+    if os.environ['ASTRA_INSTALL_LIBRARY_AS_DATA']:
+        pkgdata['astra'] = [os.environ['ASTRA_INSTALL_LIBRARY_AS_DATA']]
+except KeyError:
+    pass
+
 cmdclass = { }
 ext_modules = [ ]
 
@@ -88,5 +96,6 @@ setup (name = 'astra-toolbox',
        cmdclass = cmdclass,
        #ext_modules = [Extension("astra","astra/astra.pyx")],
        packages=['astra', 'astra.plugins'],
+       package_data=pkgdata,
        requires=["numpy"],
 	)
-- 
cgit v1.2.3


From 0a676373d38d1c5304577372666a94dc1af38081 Mon Sep 17 00:00:00 2001
From: Willem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl>
Date: Wed, 23 Nov 2016 17:08:00 +0100
Subject: Fix conda build.sh

---
 python/conda/build.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'python')

diff --git a/python/conda/build.sh b/python/conda/build.sh
index 13ae3f8..fb3760c 100644
--- a/python/conda/build.sh
+++ b/python/conda/build.sh
@@ -5,4 +5,4 @@ if [ $MAKEOPTS == '<UNDEFINED>' ]
   then
     MAKEOPTS=""
 fi
-make $MAKEOPTS python-root-install
\ No newline at end of file
+make $MAKEOPTS install
-- 
cgit v1.2.3


From eeffd2d9748b8912b384a5764b808f5bfc850ade Mon Sep 17 00:00:00 2001
From: Holger Kohr <h.kohr@cwi.nl>
Date: Wed, 23 Nov 2016 10:21:55 +0100
Subject: Separate C++ and python builds & make conda work nicely

- make builder (= advanced user or us ourselves) choose compilers
  and CUDA
- add a check for the C++11 flag for nvcc to work around the
  infamous boost bug if necessary
- use conda boost to build the C++ library
- simplify python bindings conda recipe to only build the bindings;
  the C++ library is now a build and runtime dependency
- add runtime dependencies to python bindings recipe
- some small adjustments to builder.py
---
 python/builder.py               | 105 ++++++++++++++++++----------------------
 python/conda/build.sh           |  12 ++---
 python/conda/libastra/build.sh  |  28 +++++++----
 python/conda/libastra/meta.yaml |  10 +++-
 python/conda/meta.yaml          |  13 +++--
 5 files changed, 88 insertions(+), 80 deletions(-)

(limited to 'python')

diff --git a/python/builder.py b/python/builder.py
index 1105169..218b427 100644
--- a/python/builder.py
+++ b/python/builder.py
@@ -21,81 +21,72 @@
 # You should have received a copy of the GNU General Public License
 # along with the ASTRA Toolbox. If not, see <http://www.gnu.org/licenses/>.
 #
-#-----------------------------------------------------------------------
+# -----------------------------------------------------------------------
 
-import sys
 import os
 import numpy as np
 
-from distutils.version import LooseVersion
 from distutils.core import setup
-from distutils.extension import Extension
+from pkg_resources import parse_version
 
 from Cython.Distutils import build_ext
 from Cython.Build import cythonize
 import Cython
-if LooseVersion(Cython.__version__)<LooseVersion('0.13'): raise ImportError("Cython version should be at least 0.13")
-usecuda=False
-try:
-    if os.environ['CPPFLAGS'].find('-DASTRA_CUDA')!=-1:
-        usecuda=True
-except KeyError:
-    pass
-try:
-    if os.environ['CL'].find('/DASTRA_CUDA')!=-1:
-        usecuda=True
-except KeyError:
-    pass
+if parse_version(Cython.__version__) < parse_version('0.13'):
+    raise ImportError('Cython version should be at least 0.13')
 
+use_cuda = ('-DASTRA_CUDA' in os.environ.get('CPPFLAGS', '') or
+            '/DASTRA_CUDA' in os.environ.get('CL', ''))
 
-cfgToWrite = 'DEF HAVE_CUDA=' + str(usecuda) + "\n"
-cfgHasToBeUpdated = True
+self_path = os.path.dirname(os.path.abspath(__file__))
+
+cfg_string = 'DEF HAVE_CUDA=' + str(use_cuda) + '\n'
+update_cfg = True
 try:
-    cfg = open('astra/config.pxi','r')
-    cfgIn = cfg.read()
-    cfg.close()
-    if cfgIn==cfgToWrite:
-        cfgHasToBeUpdated = False
+    with open(os.path.join(self_path, 'astra', 'config.pxi'), 'r') as cfg:
+        cfg_fromfile = cfg.read()
+    if cfg_fromfile == cfg_string:
+        update_cfg = False
 except IOError:
     pass
 
-if cfgHasToBeUpdated:
-    cfg = open('astra/config.pxi','w')
-    cfg.write(cfgToWrite)
-    cfg.close()
-
+if update_cfg:
+    with open(os.path.join(self_path, 'astra', 'config.pxi'), 'w') as cfg:
+        cfg.write(cfg_string)
 
-pkgdata = { }
-try:
-    if os.environ['ASTRA_INSTALL_LIBRARY_AS_DATA']:
-        pkgdata['astra'] = [os.environ['ASTRA_INSTALL_LIBRARY_AS_DATA']]
-except KeyError:
-    pass
+pkgdata = {}
+if os.environ.get('ASTRA_INSTALL_LIBRARY_AS_DATA', ''):
+    pkgdata['astra'] = [os.environ['ASTRA_INSTALL_LIBRARY_AS_DATA']]
 
-cmdclass = { }
-ext_modules = [ ]
+cmdclass = {}
+ext_modules = []
 
-ext_modules = cythonize("astra/*.pyx", language_level=2)
-cmdclass = { 'build_ext': build_ext }
+ext_modules = cythonize(os.path.join(self_path, 'astra', '*.pyx'),
+                        language_level=2)
+cmdclass = {'build_ext': build_ext}
 
 for m in ext_modules:
-  if m.name == 'astra.plugin_c':
-    m.sources.append('astra/src/PythonPluginAlgorithm.cpp')
+    if m.name == 'astra.plugin_c':
+        m.sources.append(os.path.join(self_path, 'astra', 'src',
+                                      'PythonPluginAlgorithm.cpp'))
 
-setup (name = 'astra-toolbox',
-       version = '1.7.1',
-       description = 'Python interface to the ASTRA-Toolbox',
-       author='D.M. Pelt',
-       author_email='D.M.Pelt@cwi.nl',
-       url='http://sf.net/projects/astra-toolbox',
-       #ext_package='astra',
-       #ext_modules = cythonize(Extension("astra/*.pyx",extra_compile_args=extra_compile_args,extra_linker_args=extra_compile_args)),
-       license='GPLv3',
-       ext_modules = ext_modules,
-       include_dirs=[np.get_include()],
-       cmdclass = cmdclass,
-       #ext_modules = [Extension("astra","astra/astra.pyx")],
-       packages=['astra', 'astra.plugins'],
-       package_data=pkgdata,
-       requires=["numpy"],
-	)
+setup(name='astra-toolbox',
+      version='1.7.1',
+      description='Python interface to the ASTRA Toolbox',
+      author='D.M. Pelt',
+      author_email='D.M.Pelt@cwi.nl',
+      url='https://github.com/astra-toolbox/astra-toolbox',
+      # ext_package='astra',
+      # ext_modules = cythonize(
+      #     Extension("astra/*.pyx",
+      #               extra_compile_args=extra_compile_args,
+      #               extra_linker_args=extra_compile_args)),
+      license='GPLv3',
+      ext_modules=ext_modules,
+      include_dirs=[np.get_include()],
+      cmdclass=cmdclass,
+      # ext_modules = [Extension("astra","astra/astra.pyx")],
+      packages=['astra', 'astra.plugins'],
+      package_data=pkgdata,
+      requires=['numpy', 'scipy', 'six'],
+      )
diff --git a/python/conda/build.sh b/python/conda/build.sh
index fb3760c..951fd88 100644
--- a/python/conda/build.sh
+++ b/python/conda/build.sh
@@ -1,8 +1,4 @@
-cd build/linux
-./autogen.sh
-./configure --with-python --with-cuda=$CUDA_ROOT --prefix=$PREFIX
-if [ $MAKEOPTS == '<UNDEFINED>' ]
-  then
-    MAKEOPTS=""
-fi
-make $MAKEOPTS install
+#!/bin/sh
+
+cd $SRC_DIR/python/
+CPPFLAGS="-DASTRA_CUDA -DASTRA_PYTHON $CPPFLAGS -I$SRC_DIR/ -I$SRC_DIR/include -I$CUDA_ROOT/include" CC=$CC python ./builder.py build install
diff --git a/python/conda/libastra/build.sh b/python/conda/libastra/build.sh
index e1d9700..5807697 100644
--- a/python/conda/libastra/build.sh
+++ b/python/conda/libastra/build.sh
@@ -1,15 +1,23 @@
-cd build/linux
-./autogen.sh
-./configure --with-cuda=$CUDA_ROOT --prefix=$PREFIX
-if [ $MAKEOPTS == '<UNDEFINED>' ]
-  then
-    MAKEOPTS=""
-fi
-make $MAKEOPTS install-libraries
+#!/bin/sh
+
+cd $SRC_DIR/build/linux
+
+$SRC_DIR/build/linux/autogen.sh
+
+# Add C++11 to compiler flags if nvcc supports it, mostly to work around a boost bug
+NVCC=$CUDA_ROOT/bin/nvcc
+echo "int main(){return 0;}" > $CONDA_PREFIX/test.cu
+$NVCC $CONDA_PREFIX/test.cu -ccbin $CC --std=c++11 -o $CONDA_PREFIX/test.out > /dev/null && EXTRA_NVCCFLAGS="--std=c++11" || /bin/true
+rm -f $CONDA_PREFIX/test.out
+
+$SRC_DIR/build/linux/configure --with-install-type=prefix --with-cuda=$CUDA_ROOT --prefix=$CONDA_PREFIX NVCCFLAGS="-ccbin $CC $EXTRA_NVCCFLAGS" CC=$CC CXX=$CXX CFLAGS="-I$CONDA_PREFIX/include/boost" CXXFLAGS="-I$CONDA_PREFIX/include/boost"
+
+make install-libraries
+
 LIBPATH=lib
 if [ $ARCH == 64 ]
   then
     LIBPATH+=64
 fi
-cp -P $CUDA_ROOT/$LIBPATH/libcudart.so.* $PREFIX/lib
-cp -P $CUDA_ROOT/$LIBPATH/libcufft.so.* $PREFIX/lib
+cp -P $CUDA_ROOT/$LIBPATH/libcudart.so.* $CONDA_PREFIX/lib
+cp -P $CUDA_ROOT/$LIBPATH/libcufft.so.* $CONDA_PREFIX/lib
diff --git a/python/conda/libastra/meta.yaml b/python/conda/libastra/meta.yaml
index 73fa0d7..7c92e04 100644
--- a/python/conda/libastra/meta.yaml
+++ b/python/conda/libastra/meta.yaml
@@ -4,13 +4,19 @@ package:
 
 source:
   git_url: https://github.com/astra-toolbox/astra-toolbox.git
-  #git_tag: v1.7.1 # Change to 1.8 after release
+  git_rev: master  # for testing
+  # git_tag: 1.8  # TODO: change to this for next release
 
 build:
   number: 0
   script_env:
+    - CC
+    - CXX
     - CUDA_ROOT
-    - MAKEOPTS
+
+requirements:
+  build:
+    - boost
 
 about:
   home: http://www.astra-toolbox.com
diff --git a/python/conda/meta.yaml b/python/conda/meta.yaml
index e6a7f52..94ce12f 100644
--- a/python/conda/meta.yaml
+++ b/python/conda/meta.yaml
@@ -4,32 +4,39 @@ package:
 
 source:
   git_url: https://github.com/astra-toolbox/astra-toolbox.git
-  #git_tag: v1.7.1 # Change to 1.8 after release
+  git_rev: master  # for testing
+  # git_tag: 1.8  # TODO: change to this for next release
 
 build:
   number: 0
   script_env:
+    - CC
     - CUDA_ROOT
-    - MAKEOPTS
 
 test:
   imports:
     - astra
 
+  requires:
+    # To avoid large downloads just for testing after build phase
+    - nomkl # [not win]
+
 requirements:
   build:
     - python
     - cython >=0.13
+    - nomkl # [not win]
     - numpy
     - scipy
     - six
+    - libastra ==1.8b  # TODO: change to release version
 
   run:
     - python
     - numpy
     - scipy
     - six
-    - libastra ==1.8b
+    - libastra ==1.8b  # TODO: change to release version
 
 
 about:
-- 
cgit v1.2.3


From 3cfc4df88a9f70ab6fae8ce0ed955295c5ead9ca Mon Sep 17 00:00:00 2001
From: Willem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl>
Date: Mon, 28 Nov 2016 15:40:59 +0100
Subject: Update python headers

---
 python/astra/PyAlgorithmFactory.pxd        | 36 ++++++++++++++---------------
 python/astra/PyAlgorithmManager.pxd        | 36 ++++++++++++++---------------
 python/astra/PyData2DManager.pxd           | 36 ++++++++++++++---------------
 python/astra/PyData3DManager.pxd           | 36 ++++++++++++++---------------
 python/astra/PyIncludes.pxd                | 36 ++++++++++++++---------------
 python/astra/PyIndexManager.pxd            |  2 +-
 python/astra/PyMatrixManager.pxd           | 36 ++++++++++++++---------------
 python/astra/PyProjector2DFactory.pxd      | 36 ++++++++++++++---------------
 python/astra/PyProjector2DManager.pxd      | 36 ++++++++++++++---------------
 python/astra/PyProjector3DFactory.pxd      | 36 ++++++++++++++---------------
 python/astra/PyProjector3DManager.pxd      | 36 ++++++++++++++---------------
 python/astra/PyXMLDocument.pxd             | 35 ++++++++++++++--------------
 python/astra/__init__.py                   | 36 ++++++++++++++---------------
 python/astra/algorithm.py                  | 35 ++++++++++++++--------------
 python/astra/algorithm_c.pyx               |  2 +-
 python/astra/astra.py                      | 35 ++++++++++++++--------------
 python/astra/astra_c.pyx                   |  2 +-
 python/astra/creators.py                   | 35 ++++++++++++++--------------
 python/astra/data2d.py                     | 36 ++++++++++++++---------------
 python/astra/data2d_c.pyx                  |  2 +-
 python/astra/data3d.py                     | 36 ++++++++++++++---------------
 python/astra/data3d_c.pyx                  |  2 +-
 python/astra/experimental.pyx              |  2 +-
 python/astra/extrautils.pyx                |  2 +-
 python/astra/functions.py                  | 24 +++++++++----------
 python/astra/log.py                        | 37 +++++++++++++++---------------
 python/astra/log_c.pyx                     |  2 +-
 python/astra/matlab.py                     | 36 ++++++++++++++---------------
 python/astra/matrix.py                     | 36 ++++++++++++++---------------
 python/astra/matrix_c.pyx                  |  2 +-
 python/astra/optomo.py                     | 35 ++++++++++++++--------------
 python/astra/plugin.py                     | 37 +++++++++++++++---------------
 python/astra/plugin_c.pyx                  |  2 +-
 python/astra/plugins/__init__.py           |  2 +-
 python/astra/plugins/cgls.py               |  2 +-
 python/astra/plugins/sirt.py               |  2 +-
 python/astra/projector.py                  | 36 ++++++++++++++---------------
 python/astra/projector3d.py                | 36 ++++++++++++++---------------
 python/astra/projector3d_c.pyx             |  2 +-
 python/astra/projector_c.pyx               |  2 +-
 python/astra/pythonutils.py                | 24 +++++++++----------
 python/astra/src/PythonPluginAlgorithm.cpp |  2 +-
 python/astra/src/PythonPluginAlgorithm.h   |  2 +-
 python/astra/utils.pxd                     | 36 ++++++++++++++---------------
 python/astra/utils.pyx                     |  2 +-
 python/builder.py                          |  2 +-
 46 files changed, 488 insertions(+), 495 deletions(-)

(limited to 'python')

diff --git a/python/astra/PyAlgorithmFactory.pxd b/python/astra/PyAlgorithmFactory.pxd
index 256d7b2..5e335e4 100644
--- a/python/astra/PyAlgorithmFactory.pxd
+++ b/python/astra/PyAlgorithmFactory.pxd
@@ -1,28 +1,28 @@
-#-----------------------------------------------------------------------
-#Copyright 2013 Centrum Wiskunde & Informatica, Amsterdam
+# -----------------------------------------------------------------------
+# Copyright: 2010-2016, iMinds-Vision Lab, University of Antwerp
+#            2013-2016, CWI, Amsterdam
 #
-#Author: Daniel M. Pelt
-#Contact: D.M.Pelt@cwi.nl
-#Website: http://dmpelt.github.io/pyastratoolbox/
+# Contact: astra@uantwerpen.be
+# Website: http://www.astra-toolbox.com/
 #
+# This file is part of the ASTRA Toolbox.
 #
-#This file is part of the Python interface to the
-#All Scale Tomographic Reconstruction Antwerp Toolbox ("ASTRA Toolbox").
 #
-#The Python interface to the ASTRA Toolbox is free software: you can redistribute it and/or modify
-#it under the terms of the GNU General Public License as published by
-#the Free Software Foundation, either version 3 of the License, or
-#(at your option) any later version.
+# The ASTRA Toolbox is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
 #
-#The Python interface to the ASTRA Toolbox is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-#GNU General Public License for more details.
+# The ASTRA Toolbox is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
 #
-#You should have received a copy of the GNU General Public License
-#along with the Python interface to the ASTRA Toolbox. If not, see <http://www.gnu.org/licenses/>.
+# You should have received a copy of the GNU General Public License
+# along with the ASTRA Toolbox. If not, see <http://www.gnu.org/licenses/>.
 #
-#-----------------------------------------------------------------------
+# -----------------------------------------------------------------------
+
 from libcpp.string cimport string
 from libcpp cimport bool
 from .PyIncludes cimport *
diff --git a/python/astra/PyAlgorithmManager.pxd b/python/astra/PyAlgorithmManager.pxd
index a99a807..dfc7961 100644
--- a/python/astra/PyAlgorithmManager.pxd
+++ b/python/astra/PyAlgorithmManager.pxd
@@ -1,28 +1,28 @@
-#-----------------------------------------------------------------------
-#Copyright 2013 Centrum Wiskunde & Informatica, Amsterdam
+# -----------------------------------------------------------------------
+# Copyright: 2010-2016, iMinds-Vision Lab, University of Antwerp
+#            2013-2016, CWI, Amsterdam
 #
-#Author: Daniel M. Pelt
-#Contact: D.M.Pelt@cwi.nl
-#Website: http://dmpelt.github.io/pyastratoolbox/
+# Contact: astra@uantwerpen.be
+# Website: http://www.astra-toolbox.com/
 #
+# This file is part of the ASTRA Toolbox.
 #
-#This file is part of the Python interface to the
-#All Scale Tomographic Reconstruction Antwerp Toolbox ("ASTRA Toolbox").
 #
-#The Python interface to the ASTRA Toolbox is free software: you can redistribute it and/or modify
-#it under the terms of the GNU General Public License as published by
-#the Free Software Foundation, either version 3 of the License, or
-#(at your option) any later version.
+# The ASTRA Toolbox is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
 #
-#The Python interface to the ASTRA Toolbox is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-#GNU General Public License for more details.
+# The ASTRA Toolbox is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
 #
-#You should have received a copy of the GNU General Public License
-#along with the Python interface to the ASTRA Toolbox. If not, see <http://www.gnu.org/licenses/>.
+# You should have received a copy of the GNU General Public License
+# along with the ASTRA Toolbox. If not, see <http://www.gnu.org/licenses/>.
 #
-#-----------------------------------------------------------------------
+# --------------------------------------------------------------------
+
 from libcpp.string cimport string
 from libcpp cimport bool
 from .PyIncludes cimport *
diff --git a/python/astra/PyData2DManager.pxd b/python/astra/PyData2DManager.pxd
index db8ec84..7cf60c7 100644
--- a/python/astra/PyData2DManager.pxd
+++ b/python/astra/PyData2DManager.pxd
@@ -1,28 +1,28 @@
-#-----------------------------------------------------------------------
-#Copyright 2013 Centrum Wiskunde & Informatica, Amsterdam
+# -----------------------------------------------------------------------
+# Copyright: 2010-2016, iMinds-Vision Lab, University of Antwerp
+#            2013-2016, CWI, Amsterdam
 #
-#Author: Daniel M. Pelt
-#Contact: D.M.Pelt@cwi.nl
-#Website: http://dmpelt.github.io/pyastratoolbox/
+# Contact: astra@uantwerpen.be
+# Website: http://www.astra-toolbox.com/
 #
+# This file is part of the ASTRA Toolbox.
 #
-#This file is part of the Python interface to the
-#All Scale Tomographic Reconstruction Antwerp Toolbox ("ASTRA Toolbox").
 #
-#The Python interface to the ASTRA Toolbox is free software: you can redistribute it and/or modify
-#it under the terms of the GNU General Public License as published by
-#the Free Software Foundation, either version 3 of the License, or
-#(at your option) any later version.
+# The ASTRA Toolbox is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
 #
-#The Python interface to the ASTRA Toolbox is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-#GNU General Public License for more details.
+# The ASTRA Toolbox is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
 #
-#You should have received a copy of the GNU General Public License
-#along with the Python interface to the ASTRA Toolbox. If not, see <http://www.gnu.org/licenses/>.
+# You should have received a copy of the GNU General Public License
+# along with the ASTRA Toolbox. If not, see <http://www.gnu.org/licenses/>.
 #
-#-----------------------------------------------------------------------
+# -----------------------------------------------------------------------
+
 from libcpp.string cimport string
 
 from .PyIncludes cimport *
diff --git a/python/astra/PyData3DManager.pxd b/python/astra/PyData3DManager.pxd
index 9264a82..250147e 100644
--- a/python/astra/PyData3DManager.pxd
+++ b/python/astra/PyData3DManager.pxd
@@ -1,28 +1,28 @@
-#-----------------------------------------------------------------------
-#Copyright 2013 Centrum Wiskunde & Informatica, Amsterdam
+# -----------------------------------------------------------------------
+# Copyright: 2010-2016, iMinds-Vision Lab, University of Antwerp
+#            2013-2016, CWI, Amsterdam
 #
-#Author: Daniel M. Pelt
-#Contact: D.M.Pelt@cwi.nl
-#Website: http://dmpelt.github.io/pyastratoolbox/
+# Contact: astra@uantwerpen.be
+# Website: http://www.astra-toolbox.com/
 #
+# This file is part of the ASTRA Toolbox.
 #
-#This file is part of the Python interface to the
-#All Scale Tomographic Reconstruction Antwerp Toolbox ("ASTRA Toolbox").
 #
-#The Python interface to the ASTRA Toolbox is free software: you can redistribute it and/or modify
-#it under the terms of the GNU General Public License as published by
-#the Free Software Foundation, either version 3 of the License, or
-#(at your option) any later version.
+# The ASTRA Toolbox is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
 #
-#The Python interface to the ASTRA Toolbox is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-#GNU General Public License for more details.
+# The ASTRA Toolbox is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
 #
-#You should have received a copy of the GNU General Public License
-#along with the Python interface to the ASTRA Toolbox. If not, see <http://www.gnu.org/licenses/>.
+# You should have received a copy of the GNU General Public License
+# along with the ASTRA Toolbox. If not, see <http://www.gnu.org/licenses/>.
 #
-#-----------------------------------------------------------------------
+# -----------------------------------------------------------------------
+
 from libcpp.string cimport string
 
 from .PyIncludes cimport *
diff --git a/python/astra/PyIncludes.pxd b/python/astra/PyIncludes.pxd
index 4a4ce43..39f9039 100644
--- a/python/astra/PyIncludes.pxd
+++ b/python/astra/PyIncludes.pxd
@@ -1,28 +1,28 @@
-#-----------------------------------------------------------------------
-#Copyright 2013 Centrum Wiskunde & Informatica, Amsterdam
+# -----------------------------------------------------------------------
+# Copyright: 2010-2016, iMinds-Vision Lab, University of Antwerp
+#            2013-2016, CWI, Amsterdam
 #
-#Author: Daniel M. Pelt
-#Contact: D.M.Pelt@cwi.nl
-#Website: http://dmpelt.github.io/pyastratoolbox/
+# Contact: astra@uantwerpen.be
+# Website: http://www.astra-toolbox.com/
 #
+# This file is part of the ASTRA Toolbox.
 #
-#This file is part of the Python interface to the
-#All Scale Tomographic Reconstruction Antwerp Toolbox ("ASTRA Toolbox").
 #
-#The Python interface to the ASTRA Toolbox is free software: you can redistribute it and/or modify
-#it under the terms of the GNU General Public License as published by
-#the Free Software Foundation, either version 3 of the License, or
-#(at your option) any later version.
+# The ASTRA Toolbox is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
 #
-#The Python interface to the ASTRA Toolbox is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-#GNU General Public License for more details.
+# The ASTRA Toolbox is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
 #
-#You should have received a copy of the GNU General Public License
-#along with the Python interface to the ASTRA Toolbox. If not, see <http://www.gnu.org/licenses/>.
+# You should have received a copy of the GNU General Public License
+# along with the ASTRA Toolbox. If not, see <http://www.gnu.org/licenses/>.
 #
-#-----------------------------------------------------------------------
+# -----------------------------------------------------------------------
+
 from libcpp cimport bool
 from libcpp.string cimport string
 from .PyXMLDocument cimport XMLNode
diff --git a/python/astra/PyIndexManager.pxd b/python/astra/PyIndexManager.pxd
index c1ad502..5eeff02 100644
--- a/python/astra/PyIndexManager.pxd
+++ b/python/astra/PyIndexManager.pxd
@@ -3,7 +3,7 @@
 #            2013-2016, CWI, Amsterdam
 #
 # Contact: astra@uantwerpen.be
-# Website: http://sf.net/projects/astra-toolbox
+# Website: http://www.astra-toolbox.com/
 #
 # This file is part of the ASTRA Toolbox.
 #
diff --git a/python/astra/PyMatrixManager.pxd b/python/astra/PyMatrixManager.pxd
index b2b84c4..38ad7f1 100644
--- a/python/astra/PyMatrixManager.pxd
+++ b/python/astra/PyMatrixManager.pxd
@@ -1,28 +1,28 @@
-#-----------------------------------------------------------------------
-#Copyright 2013 Centrum Wiskunde & Informatica, Amsterdam
+# -----------------------------------------------------------------------
+# Copyright: 2010-2016, iMinds-Vision Lab, University of Antwerp
+#            2013-2016, CWI, Amsterdam
 #
-#Author: Daniel M. Pelt
-#Contact: D.M.Pelt@cwi.nl
-#Website: http://dmpelt.github.io/pyastratoolbox/
+# Contact: astra@uantwerpen.be
+# Website: http://www.astra-toolbox.com/
 #
+# This file is part of the ASTRA Toolbox.
 #
-#This file is part of the Python interface to the
-#All Scale Tomographic Reconstruction Antwerp Toolbox ("ASTRA Toolbox").
 #
-#The Python interface to the ASTRA Toolbox is free software: you can redistribute it and/or modify
-#it under the terms of the GNU General Public License as published by
-#the Free Software Foundation, either version 3 of the License, or
-#(at your option) any later version.
+# The ASTRA Toolbox is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
 #
-#The Python interface to the ASTRA Toolbox is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-#GNU General Public License for more details.
+# The ASTRA Toolbox is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
 #
-#You should have received a copy of the GNU General Public License
-#along with the Python interface to the ASTRA Toolbox. If not, see <http://www.gnu.org/licenses/>.
+# You should have received a copy of the GNU General Public License
+# along with the ASTRA Toolbox. If not, see <http://www.gnu.org/licenses/>.
 #
-#-----------------------------------------------------------------------
+# -----------------------------------------------------------------------
+
 from libcpp.string cimport string
 
 from .PyIncludes cimport *
diff --git a/python/astra/PyProjector2DFactory.pxd b/python/astra/PyProjector2DFactory.pxd
index 3314544..8c751fc 100644
--- a/python/astra/PyProjector2DFactory.pxd
+++ b/python/astra/PyProjector2DFactory.pxd
@@ -1,28 +1,28 @@
-#-----------------------------------------------------------------------
-#Copyright 2013 Centrum Wiskunde & Informatica, Amsterdam
+# -----------------------------------------------------------------------
+# Copyright: 2010-2016, iMinds-Vision Lab, University of Antwerp
+#            2013-2016, CWI, Amsterdam
 #
-#Author: Daniel M. Pelt
-#Contact: D.M.Pelt@cwi.nl
-#Website: http://dmpelt.github.io/pyastratoolbox/
+# Contact: astra@uantwerpen.be
+# Website: http://www.astra-toolbox.com/
 #
+# This file is part of the ASTRA Toolbox.
 #
-#This file is part of the Python interface to the
-#All Scale Tomographic Reconstruction Antwerp Toolbox ("ASTRA Toolbox").
 #
-#The Python interface to the ASTRA Toolbox is free software: you can redistribute it and/or modify
-#it under the terms of the GNU General Public License as published by
-#the Free Software Foundation, either version 3 of the License, or
-#(at your option) any later version.
+# The ASTRA Toolbox is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
 #
-#The Python interface to the ASTRA Toolbox is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-#GNU General Public License for more details.
+# The ASTRA Toolbox is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
 #
-#You should have received a copy of the GNU General Public License
-#along with the Python interface to the ASTRA Toolbox. If not, see <http://www.gnu.org/licenses/>.
+# You should have received a copy of the GNU General Public License
+# along with the ASTRA Toolbox. If not, see <http://www.gnu.org/licenses/>.
 #
-#-----------------------------------------------------------------------
+# -----------------------------------------------------------------------
+
 from libcpp.string cimport string
 from libcpp cimport bool
 from .PyIncludes cimport *
diff --git a/python/astra/PyProjector2DManager.pxd b/python/astra/PyProjector2DManager.pxd
index 92176ba..86bd3cf 100644
--- a/python/astra/PyProjector2DManager.pxd
+++ b/python/astra/PyProjector2DManager.pxd
@@ -1,28 +1,28 @@
-#-----------------------------------------------------------------------
-#Copyright 2013 Centrum Wiskunde & Informatica, Amsterdam
+# -----------------------------------------------------------------------
+# Copyright: 2010-2016, iMinds-Vision Lab, University of Antwerp
+#            2013-2016, CWI, Amsterdam
 #
-#Author: Daniel M. Pelt
-#Contact: D.M.Pelt@cwi.nl
-#Website: http://dmpelt.github.io/pyastratoolbox/
+# Contact: astra@uantwerpen.be
+# Website: http://www.astra-toolbox.com/
 #
+# This file is part of the ASTRA Toolbox.
 #
-#This file is part of the Python interface to the
-#All Scale Tomographic Reconstruction Antwerp Toolbox ("ASTRA Toolbox").
 #
-#The Python interface to the ASTRA Toolbox is free software: you can redistribute it and/or modify
-#it under the terms of the GNU General Public License as published by
-#the Free Software Foundation, either version 3 of the License, or
-#(at your option) any later version.
+# The ASTRA Toolbox is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
 #
-#The Python interface to the ASTRA Toolbox is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-#GNU General Public License for more details.
+# The ASTRA Toolbox is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
 #
-#You should have received a copy of the GNU General Public License
-#along with the Python interface to the ASTRA Toolbox. If not, see <http://www.gnu.org/licenses/>.
+# You should have received a copy of the GNU General Public License
+# along with the ASTRA Toolbox. If not, see <http://www.gnu.org/licenses/>.
 #
-#-----------------------------------------------------------------------
+# -----------------------------------------------------------------------
+
 from libcpp.string cimport string
 
 from .PyIncludes cimport *
diff --git a/python/astra/PyProjector3DFactory.pxd b/python/astra/PyProjector3DFactory.pxd
index bcbce94..345678b 100644
--- a/python/astra/PyProjector3DFactory.pxd
+++ b/python/astra/PyProjector3DFactory.pxd
@@ -1,28 +1,28 @@
-#-----------------------------------------------------------------------
-#Copyright 2013 Centrum Wiskunde & Informatica, Amsterdam
+# -----------------------------------------------------------------------
+# Copyright: 2010-2016, iMinds-Vision Lab, University of Antwerp
+#            2013-2016, CWI, Amsterdam
 #
-#Author: Daniel M. Pelt
-#Contact: D.M.Pelt@cwi.nl
-#Website: http://dmpelt.github.io/pyastratoolbox/
+# Contact: astra@uantwerpen.be
+# Website: http://www.astra-toolbox.com/
 #
+# This file is part of the ASTRA Toolbox.
 #
-#This file is part of the Python interface to the
-#All Scale Tomographic Reconstruction Antwerp Toolbox ("ASTRA Toolbox").
 #
-#The Python interface to the ASTRA Toolbox is free software: you can redistribute it and/or modify
-#it under the terms of the GNU General Public License as published by
-#the Free Software Foundation, either version 3 of the License, or
-#(at your option) any later version.
+# The ASTRA Toolbox is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
 #
-#The Python interface to the ASTRA Toolbox is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-#GNU General Public License for more details.
+# The ASTRA Toolbox is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
 #
-#You should have received a copy of the GNU General Public License
-#along with the Python interface to the ASTRA Toolbox. If not, see <http://www.gnu.org/licenses/>.
+# You should have received a copy of the GNU General Public License
+# along with the ASTRA Toolbox. If not, see <http://www.gnu.org/licenses/>.
 #
-#-----------------------------------------------------------------------
+# -----------------------------------------------------------------------
+
 from libcpp.string cimport string
 from libcpp cimport bool
 from .PyIncludes cimport *
diff --git a/python/astra/PyProjector3DManager.pxd b/python/astra/PyProjector3DManager.pxd
index b1eac6b..cdd739a 100644
--- a/python/astra/PyProjector3DManager.pxd
+++ b/python/astra/PyProjector3DManager.pxd
@@ -1,28 +1,28 @@
-#-----------------------------------------------------------------------
-#Copyright 2013 Centrum Wiskunde & Informatica, Amsterdam
+# -----------------------------------------------------------------------
+# Copyright: 2010-2016, iMinds-Vision Lab, University of Antwerp
+#            2013-2016, CWI, Amsterdam
 #
-#Author: Daniel M. Pelt
-#Contact: D.M.Pelt@cwi.nl
-#Website: http://dmpelt.github.io/pyastratoolbox/
+# Contact: astra@uantwerpen.be
+# Website: http://www.astra-toolbox.com/
 #
+# This file is part of the ASTRA Toolbox.
 #
-#This file is part of the Python interface to the
-#All Scale Tomographic Reconstruction Antwerp Toolbox ("ASTRA Toolbox").
 #
-#The Python interface to the ASTRA Toolbox is free software: you can redistribute it and/or modify
-#it under the terms of the GNU General Public License as published by
-#the Free Software Foundation, either version 3 of the License, or
-#(at your option) any later version.
+# The ASTRA Toolbox is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
 #
-#The Python interface to the ASTRA Toolbox is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-#GNU General Public License for more details.
+# The ASTRA Toolbox is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
 #
-#You should have received a copy of the GNU General Public License
-#along with the Python interface to the ASTRA Toolbox. If not, see <http://www.gnu.org/licenses/>.
+# You should have received a copy of the GNU General Public License
+# along with the ASTRA Toolbox. If not, see <http://www.gnu.org/licenses/>.
 #
-#-----------------------------------------------------------------------
+# -----------------------------------------------------------------------
+
 from libcpp.string cimport string
 
 from .PyIncludes cimport *
diff --git a/python/astra/PyXMLDocument.pxd b/python/astra/PyXMLDocument.pxd
index 033b8ef..dbd84d5 100644
--- a/python/astra/PyXMLDocument.pxd
+++ b/python/astra/PyXMLDocument.pxd
@@ -1,28 +1,27 @@
-#-----------------------------------------------------------------------
-#Copyright 2013 Centrum Wiskunde & Informatica, Amsterdam
+# -----------------------------------------------------------------------
+# Copyright: 2010-2016, iMinds-Vision Lab, University of Antwerp
+#            2013-2016, CWI, Amsterdam
 #
-#Author: Daniel M. Pelt
-#Contact: D.M.Pelt@cwi.nl
-#Website: http://dmpelt.github.io/pyastratoolbox/
+# Contact: astra@uantwerpen.be
+# Website: http://www.astra-toolbox.com/
 #
+# This file is part of the ASTRA Toolbox.
 #
-#This file is part of the Python interface to the
-#All Scale Tomographic Reconstruction Antwerp Toolbox ("ASTRA Toolbox").
 #
-#The Python interface to the ASTRA Toolbox is free software: you can redistribute it and/or modify
-#it under the terms of the GNU General Public License as published by
-#the Free Software Foundation, either version 3 of the License, or
-#(at your option) any later version.
+# The ASTRA Toolbox is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
 #
-#The Python interface to the ASTRA Toolbox is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-#GNU General Public License for more details.
+# The ASTRA Toolbox is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
 #
-#You should have received a copy of the GNU General Public License
-#along with the Python interface to the ASTRA Toolbox. If not, see <http://www.gnu.org/licenses/>.
+# You should have received a copy of the GNU General Public License
+# along with the ASTRA Toolbox. If not, see <http://www.gnu.org/licenses/>.
 #
-#-----------------------------------------------------------------------
+# -----------------------------------------------------------------------
 # distutils: language = c++
 # distutils: libraries = astra
 
diff --git a/python/astra/__init__.py b/python/astra/__init__.py
index f4f5fe8..25518b1 100644
--- a/python/astra/__init__.py
+++ b/python/astra/__init__.py
@@ -1,28 +1,28 @@
-#-----------------------------------------------------------------------
-#Copyright 2013 Centrum Wiskunde & Informatica, Amsterdam
+# -----------------------------------------------------------------------
+# Copyright: 2010-2016, iMinds-Vision Lab, University of Antwerp
+#            2013-2016, CWI, Amsterdam
 #
-#Author: Daniel M. Pelt
-#Contact: D.M.Pelt@cwi.nl
-#Website: http://dmpelt.github.io/pyastratoolbox/
+# Contact: astra@uantwerpen.be
+# Website: http://www.astra-toolbox.com/
 #
+# This file is part of the ASTRA Toolbox.
 #
-#This file is part of the Python interface to the
-#All Scale Tomographic Reconstruction Antwerp Toolbox ("ASTRA Toolbox").
 #
-#The Python interface to the ASTRA Toolbox is free software: you can redistribute it and/or modify
-#it under the terms of the GNU General Public License as published by
-#the Free Software Foundation, either version 3 of the License, or
-#(at your option) any later version.
+# The ASTRA Toolbox is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
 #
-#The Python interface to the ASTRA Toolbox is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-#GNU General Public License for more details.
+# The ASTRA Toolbox is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
 #
-#You should have received a copy of the GNU General Public License
-#along with the Python interface to the ASTRA Toolbox. If not, see <http://www.gnu.org/licenses/>.
+# You should have received a copy of the GNU General Public License
+# along with the ASTRA Toolbox. If not, see <http://www.gnu.org/licenses/>.
 #
-#-----------------------------------------------------------------------
+# -----------------------------------------------------------------------
+
 from . import matlab as m
 from .creators import astra_dict,create_vol_geom, create_proj_geom, create_backprojection, create_sino, create_reconstruction, create_projector,create_sino3d_gpu, create_backprojection3d_gpu
 from .functions import data_op, add_noise_to_sino, clear, move_vol_geom
diff --git a/python/astra/algorithm.py b/python/astra/algorithm.py
index 46cfccc..b6dfb95 100644
--- a/python/astra/algorithm.py
+++ b/python/astra/algorithm.py
@@ -1,28 +1,27 @@
-#-----------------------------------------------------------------------
-#Copyright 2013 Centrum Wiskunde & Informatica, Amsterdam
+# -----------------------------------------------------------------------
+# Copyright: 2010-2016, iMinds-Vision Lab, University of Antwerp
+#            2013-2016, CWI, Amsterdam
 #
-#Author: Daniel M. Pelt
-#Contact: D.M.Pelt@cwi.nl
-#Website: http://dmpelt.github.io/pyastratoolbox/
+# Contact: astra@uantwerpen.be
+# Website: http://www.astra-toolbox.com/
 #
+# This file is part of the ASTRA Toolbox.
 #
-#This file is part of the Python interface to the
-#All Scale Tomographic Reconstruction Antwerp Toolbox ("ASTRA Toolbox").
 #
-#The Python interface to the ASTRA Toolbox is free software: you can redistribute it and/or modify
-#it under the terms of the GNU General Public License as published by
-#the Free Software Foundation, either version 3 of the License, or
-#(at your option) any later version.
+# The ASTRA Toolbox is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
 #
-#The Python interface to the ASTRA Toolbox is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-#GNU General Public License for more details.
+# The ASTRA Toolbox is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
 #
-#You should have received a copy of the GNU General Public License
-#along with the Python interface to the ASTRA Toolbox. If not, see <http://www.gnu.org/licenses/>.
+# You should have received a copy of the GNU General Public License
+# along with the ASTRA Toolbox. If not, see <http://www.gnu.org/licenses/>.
 #
-#-----------------------------------------------------------------------
+# -----------------------------------------------------------------------
 
 from . import algorithm_c as a
 
diff --git a/python/astra/algorithm_c.pyx b/python/astra/algorithm_c.pyx
index 4e96578..84d742d 100644
--- a/python/astra/algorithm_c.pyx
+++ b/python/astra/algorithm_c.pyx
@@ -3,7 +3,7 @@
 #            2013-2016, CWI, Amsterdam
 #
 # Contact: astra@uantwerpen.be
-# Website: http://sf.net/projects/astra-toolbox
+# Website: http://www.astra-toolbox.com/
 #
 # This file is part of the ASTRA Toolbox.
 #
diff --git a/python/astra/astra.py b/python/astra/astra.py
index 61c26ee..625f7b4 100644
--- a/python/astra/astra.py
+++ b/python/astra/astra.py
@@ -1,28 +1,27 @@
-#-----------------------------------------------------------------------
-#Copyright 2013 Centrum Wiskunde & Informatica, Amsterdam
+# -----------------------------------------------------------------------
+# Copyright: 2010-2016, iMinds-Vision Lab, University of Antwerp
+#            2013-2016, CWI, Amsterdam
 #
-#Author: Daniel M. Pelt
-#Contact: D.M.Pelt@cwi.nl
-#Website: http://dmpelt.github.io/pyastratoolbox/
+# Contact: astra@uantwerpen.be
+# Website: http://www.astra-toolbox.com/
 #
+# This file is part of the ASTRA Toolbox.
 #
-#This file is part of the Python interface to the
-#All Scale Tomographic Reconstruction Antwerp Toolbox ("ASTRA Toolbox").
 #
-#The Python interface to the ASTRA Toolbox is free software: you can redistribute it and/or modify
-#it under the terms of the GNU General Public License as published by
-#the Free Software Foundation, either version 3 of the License, or
-#(at your option) any later version.
+# The ASTRA Toolbox is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
 #
-#The Python interface to the ASTRA Toolbox is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-#GNU General Public License for more details.
+# The ASTRA Toolbox is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
 #
-#You should have received a copy of the GNU General Public License
-#along with the Python interface to the ASTRA Toolbox. If not, see <http://www.gnu.org/licenses/>.
+# You should have received a copy of the GNU General Public License
+# along with the ASTRA Toolbox. If not, see <http://www.gnu.org/licenses/>.
 #
-#-----------------------------------------------------------------------
+# -----------------------------------------------------------------------
 
 from . import astra_c as a
 
diff --git a/python/astra/astra_c.pyx b/python/astra/astra_c.pyx
index 8e30e69..caa8d02 100644
--- a/python/astra/astra_c.pyx
+++ b/python/astra/astra_c.pyx
@@ -3,7 +3,7 @@
 #            2013-2016, CWI, Amsterdam
 #
 # Contact: astra@uantwerpen.be
-# Website: http://sf.net/projects/astra-toolbox
+# Website: http://www.astra-toolbox.com/
 #
 # This file is part of the ASTRA Toolbox.
 #
diff --git a/python/astra/creators.py b/python/astra/creators.py
index 7009884..f45fd52 100644
--- a/python/astra/creators.py
+++ b/python/astra/creators.py
@@ -1,28 +1,27 @@
-#-----------------------------------------------------------------------
-#Copyright 2013 Centrum Wiskunde & Informatica, Amsterdam
+# -----------------------------------------------------------------------
+# Copyright: 2010-2016, iMinds-Vision Lab, University of Antwerp
+#            2013-2016, CWI, Amsterdam
 #
-#Author: Daniel M. Pelt
-#Contact: D.M.Pelt@cwi.nl
-#Website: http://dmpelt.github.io/pyastratoolbox/
+# Contact: astra@uantwerpen.be
+# Website: http://www.astra-toolbox.com/
 #
+# This file is part of the ASTRA Toolbox.
 #
-#This file is part of the Python interface to the
-#All Scale Tomographic Reconstruction Antwerp Toolbox ("ASTRA Toolbox").
 #
-#The Python interface to the ASTRA Toolbox is free software: you can redistribute it and/or modify
-#it under the terms of the GNU General Public License as published by
-#the Free Software Foundation, either version 3 of the License, or
-#(at your option) any later version.
+# The ASTRA Toolbox is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
 #
-#The Python interface to the ASTRA Toolbox is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-#GNU General Public License for more details.
+# The ASTRA Toolbox is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
 #
-#You should have received a copy of the GNU General Public License
-#along with the Python interface to the ASTRA Toolbox. If not, see <http://www.gnu.org/licenses/>.
+# You should have received a copy of the GNU General Public License
+# along with the ASTRA Toolbox. If not, see <http://www.gnu.org/licenses/>.
 #
-#-----------------------------------------------------------------------
+# -----------------------------------------------------------------------
 
 import six
 import numpy as np
diff --git a/python/astra/data2d.py b/python/astra/data2d.py
index f119f05..674161d 100644
--- a/python/astra/data2d.py
+++ b/python/astra/data2d.py
@@ -1,28 +1,28 @@
-#-----------------------------------------------------------------------
-#Copyright 2013 Centrum Wiskunde & Informatica, Amsterdam
+# -----------------------------------------------------------------------
+# Copyright: 2010-2016, iMinds-Vision Lab, University of Antwerp
+#            2013-2016, CWI, Amsterdam
 #
-#Author: Daniel M. Pelt
-#Contact: D.M.Pelt@cwi.nl
-#Website: http://dmpelt.github.io/pyastratoolbox/
+# Contact: astra@uantwerpen.be
+# Website: http://www.astra-toolbox.com/
 #
+# This file is part of the ASTRA Toolbox.
 #
-#This file is part of the Python interface to the
-#All Scale Tomographic Reconstruction Antwerp Toolbox ("ASTRA Toolbox").
 #
-#The Python interface to the ASTRA Toolbox is free software: you can redistribute it and/or modify
-#it under the terms of the GNU General Public License as published by
-#the Free Software Foundation, either version 3 of the License, or
-#(at your option) any later version.
+# The ASTRA Toolbox is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
 #
-#The Python interface to the ASTRA Toolbox is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-#GNU General Public License for more details.
+# The ASTRA Toolbox is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
 #
-#You should have received a copy of the GNU General Public License
-#along with the Python interface to the ASTRA Toolbox. If not, see <http://www.gnu.org/licenses/>.
+# You should have received a copy of the GNU General Public License
+# along with the ASTRA Toolbox. If not, see <http://www.gnu.org/licenses/>.
 #
-#-----------------------------------------------------------------------
+# -----------------------------------------------------------------------
+
 from . import data2d_c as d
 import numpy as np
 
diff --git a/python/astra/data2d_c.pyx b/python/astra/data2d_c.pyx
index 65e80ce..203fde2 100644
--- a/python/astra/data2d_c.pyx
+++ b/python/astra/data2d_c.pyx
@@ -3,7 +3,7 @@
 #            2013-2016, CWI, Amsterdam
 #
 # Contact: astra@uantwerpen.be
-# Website: http://sf.net/projects/astra-toolbox
+# Website: http://www.astra-toolbox.com/
 #
 # This file is part of the ASTRA Toolbox.
 #
diff --git a/python/astra/data3d.py b/python/astra/data3d.py
index f143659..9c2bea4 100644
--- a/python/astra/data3d.py
+++ b/python/astra/data3d.py
@@ -1,28 +1,28 @@
-#-----------------------------------------------------------------------
-#Copyright 2013 Centrum Wiskunde & Informatica, Amsterdam
+# -----------------------------------------------------------------------
+# Copyright: 2010-2016, iMinds-Vision Lab, University of Antwerp
+#            2013-2016, CWI, Amsterdam
 #
-#Author: Daniel M. Pelt
-#Contact: D.M.Pelt@cwi.nl
-#Website: http://dmpelt.github.io/pyastratoolbox/
+# Contact: astra@uantwerpen.be
+# Website: http://www.astra-toolbox.com/
 #
+# This file is part of the ASTRA Toolbox.
 #
-#This file is part of the Python interface to the
-#All Scale Tomographic Reconstruction Antwerp Toolbox ("ASTRA Toolbox").
 #
-#The Python interface to the ASTRA Toolbox is free software: you can redistribute it and/or modify
-#it under the terms of the GNU General Public License as published by
-#the Free Software Foundation, either version 3 of the License, or
-#(at your option) any later version.
+# The ASTRA Toolbox is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
 #
-#The Python interface to the ASTRA Toolbox is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-#GNU General Public License for more details.
+# The ASTRA Toolbox is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
 #
-#You should have received a copy of the GNU General Public License
-#along with the Python interface to the ASTRA Toolbox. If not, see <http://www.gnu.org/licenses/>.
+# You should have received a copy of the GNU General Public License
+# along with the ASTRA Toolbox. If not, see <http://www.gnu.org/licenses/>.
 #
-#-----------------------------------------------------------------------
+# -----------------------------------------------------------------------
+
 from . import data3d_c as d
 import numpy as np
 
diff --git a/python/astra/data3d_c.pyx b/python/astra/data3d_c.pyx
index 811d1e4..915c60d 100644
--- a/python/astra/data3d_c.pyx
+++ b/python/astra/data3d_c.pyx
@@ -3,7 +3,7 @@
 #            2013-2016, CWI, Amsterdam
 #
 # Contact: astra@uantwerpen.be
-# Website: http://sf.net/projects/astra-toolbox
+# Website: http://www.astra-toolbox.com/
 #
 # This file is part of the ASTRA Toolbox.
 #
diff --git a/python/astra/experimental.pyx b/python/astra/experimental.pyx
index 9bb73a2..b6c7881 100644
--- a/python/astra/experimental.pyx
+++ b/python/astra/experimental.pyx
@@ -3,7 +3,7 @@
 #            2013-2016, CWI, Amsterdam
 #
 # Contact: astra@uantwerpen.be
-# Website: http://sf.net/projects/astra-toolbox
+# Website: http://www.astra-toolbox.com/
 #
 # This file is part of the ASTRA Toolbox.
 #
diff --git a/python/astra/extrautils.pyx b/python/astra/extrautils.pyx
index 2c7771e..502cc78 100644
--- a/python/astra/extrautils.pyx
+++ b/python/astra/extrautils.pyx
@@ -3,7 +3,7 @@
 #            2013-2016, CWI, Amsterdam
 #
 # Contact: astra@uantwerpen.be
-# Website: http://sf.net/projects/astra-toolbox
+# Website: http://www.astra-toolbox.com/
 #
 # This file is part of the ASTRA Toolbox.
 #
diff --git a/python/astra/functions.py b/python/astra/functions.py
index 3f4aa82..7277de5 100644
--- a/python/astra/functions.py
+++ b/python/astra/functions.py
@@ -1,28 +1,28 @@
-#-----------------------------------------------------------------------
-# Copyright 2013 Centrum Wiskunde & Informatica, Amsterdam
+# -----------------------------------------------------------------------
+# Copyright: 2010-2016, iMinds-Vision Lab, University of Antwerp
+#            2013-2016, CWI, Amsterdam
 #
-# Author: Daniel M. Pelt
-# Contact: D.M.Pelt@cwi.nl
-# Website: http://dmpelt.github.io/pyastratoolbox/
+# Contact: astra@uantwerpen.be
+# Website: http://www.astra-toolbox.com/
 #
+# This file is part of the ASTRA Toolbox.
 #
-# This file is part of the Python interface to the
-# All Scale Tomographic Reconstruction Antwerp Toolbox ("ASTRA Toolbox").
 #
-# The Python interface to the ASTRA Toolbox is free software: you can redistribute it and/or modify
+# The ASTRA Toolbox is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # the Free Software Foundation, either version 3 of the License, or
-#(at your option) any later version.
+# (at your option) any later version.
 #
-# The Python interface to the ASTRA Toolbox is distributed in the hope that it will be useful,
+# The ASTRA Toolbox is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with the Python interface to the ASTRA Toolbox. If not, see <http://www.gnu.org/licenses/>.
+# along with the ASTRA Toolbox. If not, see <http://www.gnu.org/licenses/>.
 #
-#-----------------------------------------------------------------------
+# -----------------------------------------------------------------------
+
 """Additional functions for PyAstraToolbox.
 
 .. moduleauthor:: Daniel M. Pelt <D.M.Pelt@cwi.nl>
diff --git a/python/astra/log.py b/python/astra/log.py
index 3ec0df5..a54ed08 100644
--- a/python/astra/log.py
+++ b/python/astra/log.py
@@ -1,28 +1,27 @@
-#-----------------------------------------------------------------------
-#Copyright 2013 Centrum Wiskunde & Informatica, Amsterdam
+# -----------------------------------------------------------------------
+# Copyright: 2010-2016, iMinds-Vision Lab, University of Antwerp
+#            2013-2016, CWI, Amsterdam
 #
-#Author: Daniel M. Pelt
-#Contact: D.M.Pelt@cwi.nl
-#Website: http://dmpelt.github.io/pyastratoolbox/
+# Contact: astra@uantwerpen.be
+# Website: http://www.astra-toolbox.com/
 #
+# This file is part of the ASTRA Toolbox.
 #
-#This file is part of the Python interface to the
-#All Scale Tomographic Reconstruction Antwerp Toolbox ("ASTRA Toolbox").
 #
-#The Python interface to the ASTRA Toolbox is free software: you can redistribute it and/or modify
-#it under the terms of the GNU General Public License as published by
-#the Free Software Foundation, either version 3 of the License, or
-#(at your option) any later version.
+# The ASTRA Toolbox is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
 #
-#The Python interface to the ASTRA Toolbox is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-#GNU General Public License for more details.
+# The ASTRA Toolbox is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
 #
-#You should have received a copy of the GNU General Public License
-#along with the Python interface to the ASTRA Toolbox. If not, see <http://www.gnu.org/licenses/>.
+# You should have received a copy of the GNU General Public License
+# along with the ASTRA Toolbox. If not, see <http://www.gnu.org/licenses/>.
 #
-#-----------------------------------------------------------------------
+# -----------------------------------------------------------------------
 
 from . import log_c as l
 
@@ -150,4 +149,4 @@ def setOutputFile(filename, level):
     :param level: Logging level to use (DEBUG, INFO, WARN, or ERROR).
     :type level: :class:`int`
     """
-    l.log_setOutputFile(filename, level)
\ No newline at end of file
+    l.log_setOutputFile(filename, level)
diff --git a/python/astra/log_c.pyx b/python/astra/log_c.pyx
index 0d187e9..0757d0c 100644
--- a/python/astra/log_c.pyx
+++ b/python/astra/log_c.pyx
@@ -3,7 +3,7 @@
 #            2013-2016, CWI, Amsterdam
 #
 # Contact: astra@uantwerpen.be
-# Website: http://sf.net/projects/astra-toolbox
+# Website: http://www.astra-toolbox.com/
 #
 # This file is part of the ASTRA Toolbox.
 #
diff --git a/python/astra/matlab.py b/python/astra/matlab.py
index 83b345d..c96931e 100644
--- a/python/astra/matlab.py
+++ b/python/astra/matlab.py
@@ -1,28 +1,28 @@
-#-----------------------------------------------------------------------
-#Copyright 2013 Centrum Wiskunde & Informatica, Amsterdam
+# -----------------------------------------------------------------------
+# Copyright: 2010-2016, iMinds-Vision Lab, University of Antwerp
+#            2013-2016, CWI, Amsterdam
 #
-#Author: Daniel M. Pelt
-#Contact: D.M.Pelt@cwi.nl
-#Website: http://dmpelt.github.io/pyastratoolbox/
+# Contact: astra@uantwerpen.be
+# Website: http://www.astra-toolbox.com/
 #
+# This file is part of the ASTRA Toolbox.
 #
-#This file is part of the Python interface to the
-#All Scale Tomographic Reconstruction Antwerp Toolbox ("ASTRA Toolbox").
 #
-#The Python interface to the ASTRA Toolbox is free software: you can redistribute it and/or modify
-#it under the terms of the GNU General Public License as published by
-#the Free Software Foundation, either version 3 of the License, or
-#(at your option) any later version.
+# The ASTRA Toolbox is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
 #
-#The Python interface to the ASTRA Toolbox is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-#GNU General Public License for more details.
+# The ASTRA Toolbox is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
 #
-#You should have received a copy of the GNU General Public License
-#along with the Python interface to the ASTRA Toolbox. If not, see <http://www.gnu.org/licenses/>.
+# You should have received a copy of the GNU General Public License
+# along with the ASTRA Toolbox. If not, see <http://www.gnu.org/licenses/>.
 #
-#-----------------------------------------------------------------------
+# -----------------------------------------------------------------------
+
 """This module implements a MATLAB-like interface to the ASTRA Toolbox.
 
 Note that all functions are called with a :class:`string` as the first
diff --git a/python/astra/matrix.py b/python/astra/matrix.py
index 27e4823..eeb873c 100644
--- a/python/astra/matrix.py
+++ b/python/astra/matrix.py
@@ -1,28 +1,28 @@
-#-----------------------------------------------------------------------
-#Copyright 2013 Centrum Wiskunde & Informatica, Amsterdam
+# -----------------------------------------------------------------------
+# Copyright: 2010-2016, iMinds-Vision Lab, University of Antwerp
+#            2013-2016, CWI, Amsterdam
 #
-#Author: Daniel M. Pelt
-#Contact: D.M.Pelt@cwi.nl
-#Website: http://dmpelt.github.io/pyastratoolbox/
+# Contact: astra@uantwerpen.be
+# Website: http://www.astra-toolbox.com/
 #
+# This file is part of the ASTRA Toolbox.
 #
-#This file is part of the Python interface to the
-#All Scale Tomographic Reconstruction Antwerp Toolbox ("ASTRA Toolbox").
 #
-#The Python interface to the ASTRA Toolbox is free software: you can redistribute it and/or modify
-#it under the terms of the GNU General Public License as published by
-#the Free Software Foundation, either version 3 of the License, or
-#(at your option) any later version.
+# The ASTRA Toolbox is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
 #
-#The Python interface to the ASTRA Toolbox is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-#GNU General Public License for more details.
+# The ASTRA Toolbox is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
 #
-#You should have received a copy of the GNU General Public License
-#along with the Python interface to the ASTRA Toolbox. If not, see <http://www.gnu.org/licenses/>.
+# You should have received a copy of the GNU General Public License
+# along with the ASTRA Toolbox. If not, see <http://www.gnu.org/licenses/>.
 #
-#-----------------------------------------------------------------------
+# -----------------------------------------------------------------------
+
 from . import matrix_c as m
 
 def delete(ids):
diff --git a/python/astra/matrix_c.pyx b/python/astra/matrix_c.pyx
index f5c0938..ba20b10 100644
--- a/python/astra/matrix_c.pyx
+++ b/python/astra/matrix_c.pyx
@@ -3,7 +3,7 @@
 #            2013-2016, CWI, Amsterdam
 #
 # Contact: astra@uantwerpen.be
-# Website: http://sf.net/projects/astra-toolbox
+# Website: http://www.astra-toolbox.com/
 #
 # This file is part of the ASTRA Toolbox.
 #
diff --git a/python/astra/optomo.py b/python/astra/optomo.py
index dde719e..74f34e5 100644
--- a/python/astra/optomo.py
+++ b/python/astra/optomo.py
@@ -1,28 +1,27 @@
-#-----------------------------------------------------------------------
-#Copyright 2013 Centrum Wiskunde & Informatica, Amsterdam
+# -----------------------------------------------------------------------
+# Copyright: 2010-2016, iMinds-Vision Lab, University of Antwerp
+#            2013-2016, CWI, Amsterdam
 #
-#Author: Daniel M. Pelt
-#Contact: D.M.Pelt@cwi.nl
-#Website: http://dmpelt.github.io/pyastratoolbox/
+# Contact: astra@uantwerpen.be
+# Website: http://www.astra-toolbox.com/
 #
+# This file is part of the ASTRA Toolbox.
 #
-#This file is part of the Python interface to the
-#All Scale Tomographic Reconstruction Antwerp Toolbox ("ASTRA Toolbox").
 #
-#The Python interface to the ASTRA Toolbox is free software: you can redistribute it and/or modify
-#it under the terms of the GNU General Public License as published by
-#the Free Software Foundation, either version 3 of the License, or
-#(at your option) any later version.
+# The ASTRA Toolbox is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
 #
-#The Python interface to the ASTRA Toolbox is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-#GNU General Public License for more details.
+# The ASTRA Toolbox is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
 #
-#You should have received a copy of the GNU General Public License
-#along with the Python interface to the ASTRA Toolbox. If not, see <http://www.gnu.org/licenses/>.
+# You should have received a copy of the GNU General Public License
+# along with the ASTRA Toolbox. If not, see <http://www.gnu.org/licenses/>.
 #
-#-----------------------------------------------------------------------
+# -----------------------------------------------------------------------
 
 from . import data2d
 from . import data3d
diff --git a/python/astra/plugin.py b/python/astra/plugin.py
index 3e3528d..56c2761 100644
--- a/python/astra/plugin.py
+++ b/python/astra/plugin.py
@@ -1,28 +1,27 @@
-#-----------------------------------------------------------------------
-#Copyright 2013 Centrum Wiskunde & Informatica, Amsterdam
+# -----------------------------------------------------------------------
+# Copyright: 2010-2016, iMinds-Vision Lab, University of Antwerp
+#            2013-2016, CWI, Amsterdam
 #
-#Author: Daniel M. Pelt
-#Contact: D.M.Pelt@cwi.nl
-#Website: http://dmpelt.github.io/pyastratoolbox/
+# Contact: astra@uantwerpen.be
+# Website: http://www.astra-toolbox.com/
 #
+# This file is part of the ASTRA Toolbox.
 #
-#This file is part of the Python interface to the
-#All Scale Tomographic Reconstruction Antwerp Toolbox ("ASTRA Toolbox").
 #
-#The Python interface to the ASTRA Toolbox is free software: you can redistribute it and/or modify
-#it under the terms of the GNU General Public License as published by
-#the Free Software Foundation, either version 3 of the License, or
-#(at your option) any later version.
+# The ASTRA Toolbox is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
 #
-#The Python interface to the ASTRA Toolbox is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-#GNU General Public License for more details.
+# The ASTRA Toolbox is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
 #
-#You should have received a copy of the GNU General Public License
-#along with the Python interface to the ASTRA Toolbox. If not, see <http://www.gnu.org/licenses/>.
+# You should have received a copy of the GNU General Public License
+# along with the ASTRA Toolbox. If not, see <http://www.gnu.org/licenses/>.
 #
-#-----------------------------------------------------------------------
+# -----------------------------------------------------------------------
 
 from . import plugin_c as p
 from . import log
@@ -118,4 +117,4 @@ def get_help(name):
     :returns: :class:`str` -- Help string (docstring).
     
     """
-    return p.get_help(name)
\ No newline at end of file
+    return p.get_help(name)
diff --git a/python/astra/plugin_c.pyx b/python/astra/plugin_c.pyx
index ee04853..3853cec 100644
--- a/python/astra/plugin_c.pyx
+++ b/python/astra/plugin_c.pyx
@@ -3,7 +3,7 @@
 #            2013-2016, CWI, Amsterdam
 #
 # Contact: astra@uantwerpen.be
-# Website: http://sf.net/projects/astra-toolbox
+# Website: http://www.astra-toolbox.com/
 #
 # This file is part of the ASTRA Toolbox.
 #
diff --git a/python/astra/plugins/__init__.py b/python/astra/plugins/__init__.py
index 71e9b64..88a68cb 100644
--- a/python/astra/plugins/__init__.py
+++ b/python/astra/plugins/__init__.py
@@ -3,7 +3,7 @@
 #            2013-2016, CWI, Amsterdam
 #
 # Contact: astra@uantwerpen.be
-# Website: http://sf.net/projects/astra-toolbox
+# Website: http://www.astra-toolbox.com/
 #
 # This file is part of the ASTRA Toolbox.
 #
diff --git a/python/astra/plugins/cgls.py b/python/astra/plugins/cgls.py
index 2f4970b..5268f51 100644
--- a/python/astra/plugins/cgls.py
+++ b/python/astra/plugins/cgls.py
@@ -3,7 +3,7 @@
 #            2013-2016, CWI, Amsterdam
 #
 # Contact: astra@uantwerpen.be
-# Website: http://sf.net/projects/astra-toolbox
+# Website: http://www.astra-toolbox.com/
 #
 # This file is part of the ASTRA Toolbox.
 #
diff --git a/python/astra/plugins/sirt.py b/python/astra/plugins/sirt.py
index a0f1230..5238399 100644
--- a/python/astra/plugins/sirt.py
+++ b/python/astra/plugins/sirt.py
@@ -3,7 +3,7 @@
 #            2013-2016, CWI, Amsterdam
 #
 # Contact: astra@uantwerpen.be
-# Website: http://sf.net/projects/astra-toolbox
+# Website: http://www.astra-toolbox.com/
 #
 # This file is part of the ASTRA Toolbox.
 #
diff --git a/python/astra/projector.py b/python/astra/projector.py
index e370e5a..878e011 100644
--- a/python/astra/projector.py
+++ b/python/astra/projector.py
@@ -1,28 +1,28 @@
-#-----------------------------------------------------------------------
-#Copyright 2013 Centrum Wiskunde & Informatica, Amsterdam
+# -----------------------------------------------------------------------
+# Copyright: 2010-2016, iMinds-Vision Lab, University of Antwerp
+#            2013-2016, CWI, Amsterdam
 #
-#Author: Daniel M. Pelt
-#Contact: D.M.Pelt@cwi.nl
-#Website: http://dmpelt.github.io/pyastratoolbox/
+# Contact: astra@uantwerpen.be
+# Website: http://www.astra-toolbox.com/
 #
+# This file is part of the ASTRA Toolbox.
 #
-#This file is part of the Python interface to the
-#All Scale Tomographic Reconstruction Antwerp Toolbox ("ASTRA Toolbox").
 #
-#The Python interface to the ASTRA Toolbox is free software: you can redistribute it and/or modify
-#it under the terms of the GNU General Public License as published by
-#the Free Software Foundation, either version 3 of the License, or
-#(at your option) any later version.
+# The ASTRA Toolbox is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
 #
-#The Python interface to the ASTRA Toolbox is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-#GNU General Public License for more details.
+# The ASTRA Toolbox is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
 #
-#You should have received a copy of the GNU General Public License
-#along with the Python interface to the ASTRA Toolbox. If not, see <http://www.gnu.org/licenses/>.
+# You should have received a copy of the GNU General Public License
+# along with the ASTRA Toolbox. If not, see <http://www.gnu.org/licenses/>.
 #
-#-----------------------------------------------------------------------
+# -----------------------------------------------------------------------
+
 from . import projector_c as p
 
 def create(config):
diff --git a/python/astra/projector3d.py b/python/astra/projector3d.py
index d1086b9..9befa3f 100644
--- a/python/astra/projector3d.py
+++ b/python/astra/projector3d.py
@@ -1,28 +1,28 @@
-#-----------------------------------------------------------------------
-#Copyright 2013 Centrum Wiskunde & Informatica, Amsterdam
+# -----------------------------------------------------------------------
+# Copyright: 2010-2016, iMinds-Vision Lab, University of Antwerp
+#            2013-2016, CWI, Amsterdam
 #
-#Author: Daniel M. Pelt
-#Contact: D.M.Pelt@cwi.nl
-#Website: http://dmpelt.github.io/pyastratoolbox/
+# Contact: astra@uantwerpen.be
+# Website: http://www.astra-toolbox.com/
 #
+# This file is part of the ASTRA Toolbox.
 #
-#This file is part of the Python interface to the
-#All Scale Tomographic Reconstruction Antwerp Toolbox ("ASTRA Toolbox").
 #
-#The Python interface to the ASTRA Toolbox is free software: you can redistribute it and/or modify
-#it under the terms of the GNU General Public License as published by
-#the Free Software Foundation, either version 3 of the License, or
-#(at your option) any later version.
+# The ASTRA Toolbox is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
 #
-#The Python interface to the ASTRA Toolbox is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-#GNU General Public License for more details.
+# The ASTRA Toolbox is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
 #
-#You should have received a copy of the GNU General Public License
-#along with the Python interface to the ASTRA Toolbox. If not, see <http://www.gnu.org/licenses/>.
+# You should have received a copy of the GNU General Public License
+# along with the ASTRA Toolbox. If not, see <http://www.gnu.org/licenses/>.
 #
-#-----------------------------------------------------------------------
+# -----------------------------------------------------------------------
+
 from . import projector3d_c as p
 
 def create(config):
diff --git a/python/astra/projector3d_c.pyx b/python/astra/projector3d_c.pyx
index e355e38..98eccc1 100644
--- a/python/astra/projector3d_c.pyx
+++ b/python/astra/projector3d_c.pyx
@@ -3,7 +3,7 @@
 #            2013-2016, CWI, Amsterdam
 #
 # Contact: astra@uantwerpen.be
-# Website: http://sf.net/projects/astra-toolbox
+# Website: http://www.astra-toolbox.com/
 #
 # This file is part of the ASTRA Toolbox.
 #
diff --git a/python/astra/projector_c.pyx b/python/astra/projector_c.pyx
index 53d38c3..be529da 100644
--- a/python/astra/projector_c.pyx
+++ b/python/astra/projector_c.pyx
@@ -3,7 +3,7 @@
 #            2013-2016, CWI, Amsterdam
 #
 # Contact: astra@uantwerpen.be
-# Website: http://sf.net/projects/astra-toolbox
+# Website: http://www.astra-toolbox.com/
 #
 # This file is part of the ASTRA Toolbox.
 #
diff --git a/python/astra/pythonutils.py b/python/astra/pythonutils.py
index 8ea4af5..3bd3321 100644
--- a/python/astra/pythonutils.py
+++ b/python/astra/pythonutils.py
@@ -1,28 +1,28 @@
-#-----------------------------------------------------------------------
-# Copyright 2013 Centrum Wiskunde & Informatica, Amsterdam
+# -----------------------------------------------------------------------
+# Copyright: 2010-2016, iMinds-Vision Lab, University of Antwerp
+#            2013-2016, CWI, Amsterdam
 #
-# Author: Daniel M. Pelt
-# Contact: D.M.Pelt@cwi.nl
-# Website: http://dmpelt.github.io/pyastratoolbox/
+# Contact: astra@uantwerpen.be
+# Website: http://www.astra-toolbox.com/
 #
+# This file is part of the ASTRA Toolbox.
 #
-# This file is part of the Python interface to the
-# All Scale Tomographic Reconstruction Antwerp Toolbox ("ASTRA Toolbox").
 #
-# The Python interface to the ASTRA Toolbox is free software: you can redistribute it and/or modify
+# The ASTRA Toolbox is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # the Free Software Foundation, either version 3 of the License, or
-#(at your option) any later version.
+# (at your option) any later version.
 #
-# The Python interface to the ASTRA Toolbox is distributed in the hope that it will be useful,
+# The ASTRA Toolbox is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with the Python interface to the ASTRA Toolbox. If not, see <http://www.gnu.org/licenses/>.
+# along with the ASTRA Toolbox. If not, see <http://www.gnu.org/licenses/>.
 #
-#-----------------------------------------------------------------------
+# -----------------------------------------------------------------------
+
 """Additional purely Python functions for PyAstraToolbox.
 
 .. moduleauthor:: Daniel M. Pelt <D.M.Pelt@cwi.nl>
diff --git a/python/astra/src/PythonPluginAlgorithm.cpp b/python/astra/src/PythonPluginAlgorithm.cpp
index 893db94..69b3d06 100644
--- a/python/astra/src/PythonPluginAlgorithm.cpp
+++ b/python/astra/src/PythonPluginAlgorithm.cpp
@@ -4,7 +4,7 @@ Copyright: 2010-2016, iMinds-Vision Lab, University of Antwerp
            2014-2016, CWI, Amsterdam
 
 Contact: astra@uantwerpen.be
-Website: http://sf.net/projects/astra-toolbox
+Website: http://www.astra-toolbox.com/
 
 This file is part of the ASTRA Toolbox.
 
diff --git a/python/astra/src/PythonPluginAlgorithm.h b/python/astra/src/PythonPluginAlgorithm.h
index ea4c6fb..dacd0e4 100644
--- a/python/astra/src/PythonPluginAlgorithm.h
+++ b/python/astra/src/PythonPluginAlgorithm.h
@@ -4,7 +4,7 @@ Copyright: 2010-2016, iMinds-Vision Lab, University of Antwerp
            2014-2016, CWI, Amsterdam
 
 Contact: astra@uantwerpen.be
-Website: http://sf.net/projects/astra-toolbox
+Website: http://www.astra-toolbox.com/
 
 This file is part of the ASTRA Toolbox.
 
diff --git a/python/astra/utils.pxd b/python/astra/utils.pxd
index ca84836..695081f 100644
--- a/python/astra/utils.pxd
+++ b/python/astra/utils.pxd
@@ -1,28 +1,28 @@
-#-----------------------------------------------------------------------
-#Copyright 2013 Centrum Wiskunde & Informatica, Amsterdam
+# -----------------------------------------------------------------------
+# Copyright: 2010-2016, iMinds-Vision Lab, University of Antwerp
+#            2013-2016, CWI, Amsterdam
 #
-#Author: Daniel M. Pelt
-#Contact: D.M.Pelt@cwi.nl
-#Website: http://dmpelt.github.io/pyastratoolbox/
+# Contact: astra@uantwerpen.be
+# Website: http://www.astra-toolbox.com/
 #
+# This file is part of the ASTRA Toolbox.
 #
-#This file is part of the Python interface to the
-#All Scale Tomographic Reconstruction Antwerp Toolbox ("ASTRA Toolbox").
 #
-#The Python interface to the ASTRA Toolbox is free software: you can redistribute it and/or modify
-#it under the terms of the GNU General Public License as published by
-#the Free Software Foundation, either version 3 of the License, or
-#(at your option) any later version.
+# The ASTRA Toolbox is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
 #
-#The Python interface to the ASTRA Toolbox is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-#GNU General Public License for more details.
+# The ASTRA Toolbox is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
 #
-#You should have received a copy of the GNU General Public License
-#along with the Python interface to the ASTRA Toolbox. If not, see <http://www.gnu.org/licenses/>.
+# You should have received a copy of the GNU General Public License
+# along with the ASTRA Toolbox. If not, see <http://www.gnu.org/licenses/>.
 #
-#-----------------------------------------------------------------------
+# -----------------------------------------------------------------------
+
 from libcpp.string cimport string
 
 cimport PyXMLDocument
diff --git a/python/astra/utils.pyx b/python/astra/utils.pyx
index 34d1902..a40916b 100644
--- a/python/astra/utils.pyx
+++ b/python/astra/utils.pyx
@@ -3,7 +3,7 @@
 #            2013-2016, CWI, Amsterdam
 #
 # Contact: astra@uantwerpen.be
-# Website: http://sf.net/projects/astra-toolbox
+# Website: http://www.astra-toolbox.com/
 #
 # This file is part of the ASTRA Toolbox.
 #
diff --git a/python/builder.py b/python/builder.py
index 218b427..f6732ac 100644
--- a/python/builder.py
+++ b/python/builder.py
@@ -3,7 +3,7 @@
 #            2013-2016, CWI, Amsterdam
 #
 # Contact: astra@uantwerpen.be
-# Website: http://sf.net/projects/astra-toolbox
+# Website: http://www.astra-toolbox.com/
 #
 # This file is part of the ASTRA Toolbox.
 #
-- 
cgit v1.2.3


From 5d9b7b00267e99baefcfba2d53dbfc312daa84eb Mon Sep 17 00:00:00 2001
From: Willem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl>
Date: Mon, 28 Nov 2016 16:37:08 +0100
Subject: Add scripts for building conda packages using Docker

---
 python/conda/linux_release/README.txt          |  2 ++
 python/conda/linux_release/buildenv/Dockerfile | 15 +++++++++++++++
 python/conda/linux_release/builder/Dockerfile  |  8 ++++++++
 python/conda/linux_release/release.sh          | 19 +++++++++++++++++++
 4 files changed, 44 insertions(+)
 create mode 100644 python/conda/linux_release/README.txt
 create mode 100644 python/conda/linux_release/buildenv/Dockerfile
 create mode 100644 python/conda/linux_release/builder/Dockerfile
 create mode 100644 python/conda/linux_release/release.sh

(limited to 'python')

diff --git a/python/conda/linux_release/README.txt b/python/conda/linux_release/README.txt
new file mode 100644
index 0000000..12cfcbb
--- /dev/null
+++ b/python/conda/linux_release/README.txt
@@ -0,0 +1,2 @@
+This directory contains a Docker container based environment for building linux release packages for conda.
+
diff --git a/python/conda/linux_release/buildenv/Dockerfile b/python/conda/linux_release/buildenv/Dockerfile
new file mode 100644
index 0000000..c73e4b9
--- /dev/null
+++ b/python/conda/linux_release/buildenv/Dockerfile
@@ -0,0 +1,15 @@
+FROM debian:7
+ENV PATH /root/miniconda3/bin:$PATH
+ENV DEBIAN_FRONTEND noninteractive
+# http://developer.download.nvidia.com/compute/cuda/5_5/rel/installers/cuda_5.5.22_linux_64.run
+ADD cuda_5.5.22_linux_64.run /root/
+# https://repo.continuum.io/miniconda/Miniconda3-4.2.12-Linux-x86_64.sh
+ADD Miniconda3-4.2.12-Linux-x86_64.sh /root/
+RUN apt-get update
+RUN apt-get install -y perl-modules build-essential autoconf libtool automake libboost-dev git
+RUN /bin/bash /root/Miniconda3-4.2.12-Linux-x86_64.sh -b
+RUN /bin/bash /root/cuda_5.5.22_linux_64.run -toolkit -silent
+RUN conda install -y conda-build
+ENV CUDA_ROOT /usr/local/cuda
+ENV CC gcc
+ENV CXX g++
diff --git a/python/conda/linux_release/builder/Dockerfile b/python/conda/linux_release/builder/Dockerfile
new file mode 100644
index 0000000..6acef62
--- /dev/null
+++ b/python/conda/linux_release/builder/Dockerfile
@@ -0,0 +1,8 @@
+FROM astra-build-env
+ARG BUILD_NUMBER=
+WORKDIR /root
+RUN git clone -b conda_release https://github.com/astra-toolbox/astra-toolbox
+RUN [ -z $BUILD_NUMBER ] || perl -pi -e "s/^(\s*number:\s*)[0-9]+$/\${1}$BUILD_NUMBER/" astra-toolbox/python/conda/libastra/meta.yaml astra-toolbox/python/conda//meta.yaml
+RUN conda-build --python=3.5 astra-toolbox/python/conda/libastra
+RUN conda-build --python=3.5 astra-toolbox/python/conda
+RUN conda-build --python=2.7 astra-toolbox/python/conda
diff --git a/python/conda/linux_release/release.sh b/python/conda/linux_release/release.sh
new file mode 100644
index 0000000..35cbdd0
--- /dev/null
+++ b/python/conda/linux_release/release.sh
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+D=`mktemp -d`
+
+[ -f buildenv/cuda_5.5.22_linux_64.run ] || (cd buildenv; wget http://developer.download.nvidia.com/compute/cuda/5_5/rel/installers/cuda_5.5.22_linux_64.run )
+[ -f buildenv/Miniconda3-4.2.12-Linux-x86_64.sh ] || (cd buildenv; wget https://repo.continuum.io/miniconda/Miniconda3-4.2.12-Linux-x86_64.sh )
+
+docker build -t astra-build-env buildenv
+docker build --no-cache -t astra-builder builder
+
+docker run --name astra-build-cnt -v $D:/out:z astra-builder /bin/bash -c "cp /root/miniconda3/conda-bld/linux-64/*astra* /out"
+
+mkdir -p pkgs
+mv $D/* pkgs
+rmdir $D
+
+docker rm astra-build-cnt
+docker rmi astra-builder
+
-- 
cgit v1.2.3


From 93d14a3424d4bdc980eeab3f02e250c07e6c37b6 Mon Sep 17 00:00:00 2001
From: Willem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl>
Date: Mon, 28 Nov 2016 16:37:53 +0100
Subject: Add conda build scripts for win-64/py35

---
 python/conda/bld.bat            | 35 +++++++++++++++++++++++++++++++++++
 python/conda/libastra/bld.bat   | 33 +++++++++++++++++++++++++++++++++
 python/conda/libastra/meta.yaml | 12 ++++++++----
 python/conda/meta.yaml          |  5 +++--
 4 files changed, 79 insertions(+), 6 deletions(-)
 create mode 100644 python/conda/bld.bat
 create mode 100644 python/conda/libastra/bld.bat

(limited to 'python')

diff --git a/python/conda/bld.bat b/python/conda/bld.bat
new file mode 100644
index 0000000..9da8cd4
--- /dev/null
+++ b/python/conda/bld.bat
@@ -0,0 +1,35 @@
+@echo off
+
+set R=%SRC_DIR%%
+
+set B_VC=C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64
+call "%B_VC%\vcvars64.bat"
+
+cd /D %R%
+
+set B_BV=1_61
+
+mkdir "%R%\lib\x64"
+mkdir "%R%\bin\x64\Release_CUDA"
+
+cd /D %CONDA_PREFIX%\Library\lib
+
+
+copy boost_unit_test_framework-vc140-mt-%B_BV%.lib %R%\lib\x64
+copy libboost_chrono-vc140-mt-%B_BV%.lib %R%\lib\x64
+copy libboost_date_time-vc140-mt-%B_BV%.lib %R%\lib\x64
+copy libboost_system-vc140-mt-%B_BV%.lib %R%\lib\x64
+copy libboost_thread-vc140-mt-%B_BV%.lib %R%\lib\x64
+
+cd /D %CONDA_PREFIX%\Library\include
+
+xcopy /i /e /q boost "%R%\lib\include\boost"
+
+cd /D %R%
+
+cd python
+
+set VS90COMNTOOLS=%VS140COMNTOOLS%
+set CL=/DASTRA_CUDA /DASTRA_PYTHON "/I%R%\include" "/I%R%\lib\include" "/I%CUDA_PATH%\include"
+copy %CONDA_PREFIX%\Library\lib\AstraCuda64.lib astra.lib
+python builder.py build_ext --compiler=msvc install
diff --git a/python/conda/libastra/bld.bat b/python/conda/libastra/bld.bat
new file mode 100644
index 0000000..bb7329a
--- /dev/null
+++ b/python/conda/libastra/bld.bat
@@ -0,0 +1,33 @@
+@echo off
+
+set B_VC=C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64
+
+call "%B_VC%\vcvars64.bat"
+
+set R=%SRC_DIR%
+set B_BV=1_61
+
+mkdir "%R%\lib\x64"
+mkdir "%R%\bin\x64\Release_CUDA"
+
+cd /D %CONDA_PREFIX%\Library\lib
+
+
+copy boost_unit_test_framework-vc140-mt-%B_BV%.lib %R%\lib\x64
+copy libboost_chrono-vc140-mt-%B_BV%.lib %R%\lib\x64
+copy libboost_date_time-vc140-mt-%B_BV%.lib %R%\lib\x64
+copy libboost_system-vc140-mt-%B_BV%.lib %R%\lib\x64
+copy libboost_thread-vc140-mt-%B_BV%.lib %R%\lib\x64
+
+cd /D %CONDA_PREFIX%\Library\include
+
+xcopy /i /e /q boost "%R%\lib\include\boost"
+
+cd /D %R%
+
+msbuild astra_vc14.sln /p:Configuration=Release_CUDA /p:Platform=x64 /t:astra_vc14
+
+copy bin\x64\Release_CUDA\AstraCuda64.dll "%CONDA_PREFIX%\Library\bin"
+copy bin\x64\Release_CUDA\AstraCuda64.lib "%CONDA_PREFIX%\Library\lib"
+copy "%CUDA_PATH%\bin\cudart64_80.dll" "%CONDA_PREFIX%\Library\bin"
+copy "%CUDA_PATH%\bin\cufft64_80.dll" "%CONDA_PREFIX%\Library\bin"
diff --git a/python/conda/libastra/meta.yaml b/python/conda/libastra/meta.yaml
index 7c92e04..c9135ab 100644
--- a/python/conda/libastra/meta.yaml
+++ b/python/conda/libastra/meta.yaml
@@ -10,13 +10,17 @@ source:
 build:
   number: 0
   script_env:
-    - CC
-    - CXX
-    - CUDA_ROOT
+    - CC # [not win]
+    - CXX # [not win]
+    - CUDA_ROOT # [not win]
 
 requirements:
   build:
-    - boost
+    - boost ==1.61 # [win]
+    - vs2015_runtime # [win]
+
+  run:
+    - vs2015_runtime # [win]
 
 about:
   home: http://www.astra-toolbox.com
diff --git a/python/conda/meta.yaml b/python/conda/meta.yaml
index 94ce12f..738489a 100644
--- a/python/conda/meta.yaml
+++ b/python/conda/meta.yaml
@@ -10,8 +10,8 @@ source:
 build:
   number: 0
   script_env:
-    - CC
-    - CUDA_ROOT
+    - CC # [not win]
+    - CUDA_ROOT # [not win]
 
 test:
   imports:
@@ -24,6 +24,7 @@ test:
 requirements:
   build:
     - python
+    - boost ==1.61 # [win]
     - cython >=0.13
     - nomkl # [not win]
     - numpy
-- 
cgit v1.2.3


From 7017618690b66e99773355b82afe26ac869d6aa8 Mon Sep 17 00:00:00 2001
From: Willem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl>
Date: Mon, 28 Nov 2016 15:34:50 +0100
Subject: Add astra.__version__ (PEP396)

---
 python/astra/__init__.py        |  2 ++
 python/astra/astra.py           | 11 -----------
 python/astra/astra_c.pyx        |  9 ---------
 python/conda/libastra/meta.yaml |  2 +-
 python/conda/meta.yaml          |  2 +-
 5 files changed, 4 insertions(+), 22 deletions(-)

(limited to 'python')

diff --git a/python/astra/__init__.py b/python/astra/__init__.py
index 25518b1..6707eff 100644
--- a/python/astra/__init__.py
+++ b/python/astra/__init__.py
@@ -39,6 +39,8 @@ from . import plugins
 from . import log
 from .optomo import OpTomo
 
+__version__ = '1.8rc1'
+
 import os
 
 if 'ASTRA_GPU_INDEX' in os.environ:
diff --git a/python/astra/astra.py b/python/astra/astra.py
index 625f7b4..3804d51 100644
--- a/python/astra/astra.py
+++ b/python/astra/astra.py
@@ -37,17 +37,6 @@ def use_cuda():
     """
     return a.use_cuda()
 
-
-def version(printToScreen=False):
-    """Check version of the ASTRA Toolbox.
-    
-    :param printToScreen: If ``True``, print version string. If ``False``, return version integer.
-    :type printToScreen: :class:`bool`
-    :returns: :class:`string` or :class:`int` -- The version string or integer.
-    
-    """
-    return a.version(printToScreen)
-
 def set_gpu_index(idx, memory=0):
     """Set default GPU index to use.
     
diff --git a/python/astra/astra_c.pyx b/python/astra/astra_c.pyx
index caa8d02..6de10da 100644
--- a/python/astra/astra_c.pyx
+++ b/python/astra/astra_c.pyx
@@ -37,8 +37,6 @@ cimport PyIndexManager
 from .PyIndexManager cimport CAstraObjectManagerBase
 
 cdef extern from "astra/Globals.h" namespace "astra":
-    int getVersion()
-    string getVersionString()
     bool cudaEnabled()
 
 IF HAVE_CUDA==True:
@@ -74,13 +72,6 @@ def credits():
 def use_cuda():
     return cudaEnabled()
 
-
-def version(printToScreen=False):
-    if printToScreen:
-        six.print_(wrap_from_bytes(getVersionString()))
-    else:
-        return getVersion()
-
 IF HAVE_CUDA==True:
   def set_gpu_index(idx, memory=0):
     import collections
diff --git a/python/conda/libastra/meta.yaml b/python/conda/libastra/meta.yaml
index c9135ab..25da269 100644
--- a/python/conda/libastra/meta.yaml
+++ b/python/conda/libastra/meta.yaml
@@ -1,6 +1,6 @@
 package:
   name: libastra
-  version: '1.8b'
+  version: '1.8rc1'
 
 source:
   git_url: https://github.com/astra-toolbox/astra-toolbox.git
diff --git a/python/conda/meta.yaml b/python/conda/meta.yaml
index 738489a..84054c1 100644
--- a/python/conda/meta.yaml
+++ b/python/conda/meta.yaml
@@ -1,6 +1,6 @@
 package:
   name: astra-toolbox
-  version: '1.8b'
+  version: '1.8rc1'
 
 source:
   git_url: https://github.com/astra-toolbox/astra-toolbox.git
-- 
cgit v1.2.3


From 70bc6ff9d036239c6d2810437e5b78cf95c04dce Mon Sep 17 00:00:00 2001
From: Willem Jan Palenstijn <wjp@usecode.org>
Date: Fri, 2 Dec 2016 01:04:35 +0100
Subject: Update versions for 1.8rc1 conda package

---
 python/conda/linux_release/builder/Dockerfile | 2 +-
 python/conda/meta.yaml                        | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

(limited to 'python')

diff --git a/python/conda/linux_release/builder/Dockerfile b/python/conda/linux_release/builder/Dockerfile
index 6acef62..d09a9d7 100644
--- a/python/conda/linux_release/builder/Dockerfile
+++ b/python/conda/linux_release/builder/Dockerfile
@@ -1,7 +1,7 @@
 FROM astra-build-env
 ARG BUILD_NUMBER=
 WORKDIR /root
-RUN git clone -b conda_release https://github.com/astra-toolbox/astra-toolbox
+RUN git clone -b master https://github.com/astra-toolbox/astra-toolbox
 RUN [ -z $BUILD_NUMBER ] || perl -pi -e "s/^(\s*number:\s*)[0-9]+$/\${1}$BUILD_NUMBER/" astra-toolbox/python/conda/libastra/meta.yaml astra-toolbox/python/conda//meta.yaml
 RUN conda-build --python=3.5 astra-toolbox/python/conda/libastra
 RUN conda-build --python=3.5 astra-toolbox/python/conda
diff --git a/python/conda/meta.yaml b/python/conda/meta.yaml
index 84054c1..88c01d1 100644
--- a/python/conda/meta.yaml
+++ b/python/conda/meta.yaml
@@ -30,14 +30,14 @@ requirements:
     - numpy
     - scipy
     - six
-    - libastra ==1.8b  # TODO: change to release version
+    - libastra ==1.8rc1  # TODO: change to release version
 
   run:
     - python
     - numpy
     - scipy
     - six
-    - libastra ==1.8b  # TODO: change to release version
+    - libastra ==1.8rc1  # TODO: change to release version
 
 
 about:
-- 
cgit v1.2.3


From 77f2cedaac088da5107dcfb37ae62d8f3a56f335 Mon Sep 17 00:00:00 2001
From: Willem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl>
Date: Mon, 5 Dec 2016 14:44:09 +0100
Subject: Update version to 1.8

---
 python/astra/__init__.py        | 2 +-
 python/builder.py               | 2 +-
 python/conda/libastra/meta.yaml | 5 ++---
 python/conda/meta.yaml          | 9 ++++-----
 4 files changed, 8 insertions(+), 10 deletions(-)

(limited to 'python')

diff --git a/python/astra/__init__.py b/python/astra/__init__.py
index 6707eff..b73fff5 100644
--- a/python/astra/__init__.py
+++ b/python/astra/__init__.py
@@ -39,7 +39,7 @@ from . import plugins
 from . import log
 from .optomo import OpTomo
 
-__version__ = '1.8rc1'
+__version__ = '1.8'
 
 import os
 
diff --git a/python/builder.py b/python/builder.py
index f6732ac..ec0bd23 100644
--- a/python/builder.py
+++ b/python/builder.py
@@ -71,7 +71,7 @@ for m in ext_modules:
                                       'PythonPluginAlgorithm.cpp'))
 
 setup(name='astra-toolbox',
-      version='1.7.1',
+      version='1.8',
       description='Python interface to the ASTRA Toolbox',
       author='D.M. Pelt',
       author_email='D.M.Pelt@cwi.nl',
diff --git a/python/conda/libastra/meta.yaml b/python/conda/libastra/meta.yaml
index 25da269..007cba9 100644
--- a/python/conda/libastra/meta.yaml
+++ b/python/conda/libastra/meta.yaml
@@ -1,11 +1,10 @@
 package:
   name: libastra
-  version: '1.8rc1'
+  version: '1.8'
 
 source:
   git_url: https://github.com/astra-toolbox/astra-toolbox.git
-  git_rev: master  # for testing
-  # git_tag: 1.8  # TODO: change to this for next release
+  git_tag: v1.8
 
 build:
   number: 0
diff --git a/python/conda/meta.yaml b/python/conda/meta.yaml
index 88c01d1..162103f 100644
--- a/python/conda/meta.yaml
+++ b/python/conda/meta.yaml
@@ -1,11 +1,10 @@
 package:
   name: astra-toolbox
-  version: '1.8rc1'
+  version: '1.8'
 
 source:
   git_url: https://github.com/astra-toolbox/astra-toolbox.git
-  git_rev: master  # for testing
-  # git_tag: 1.8  # TODO: change to this for next release
+  git_tag: v1.8
 
 build:
   number: 0
@@ -30,14 +29,14 @@ requirements:
     - numpy
     - scipy
     - six
-    - libastra ==1.8rc1  # TODO: change to release version
+    - libastra ==1.8
 
   run:
     - python
     - numpy
     - scipy
     - six
-    - libastra ==1.8rc1  # TODO: change to release version
+    - libastra ==1.8
 
 
 about:
-- 
cgit v1.2.3


From 461fd85b60165aa20c76f68e2adf4f4cd717641b Mon Sep 17 00:00:00 2001
From: "Daniel M. Pelt" <dmpelt@lbl.gov>
Date: Thu, 8 Dec 2016 17:50:14 -0800
Subject: Use specific numpy version in conda package

---
 python/conda/meta.yaml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'python')

diff --git a/python/conda/meta.yaml b/python/conda/meta.yaml
index 162103f..8194d04 100644
--- a/python/conda/meta.yaml
+++ b/python/conda/meta.yaml
@@ -33,7 +33,7 @@ requirements:
 
   run:
     - python
-    - numpy
+    - numpy x.x
     - scipy
     - six
     - libastra ==1.8
-- 
cgit v1.2.3


From 25f38c8ac5275ff88cc1245ab475510864543ceb Mon Sep 17 00:00:00 2001
From: Willem Jan Palenstijn <wjp@usecode.org>
Date: Fri, 9 Dec 2016 11:37:26 +0100
Subject: Build conda packages for multiple conda versions

---
 python/conda/linux_release/builder/Dockerfile | 13 +++++++++----
 python/conda/linux_release/release.sh         |  1 +
 2 files changed, 10 insertions(+), 4 deletions(-)

(limited to 'python')

diff --git a/python/conda/linux_release/builder/Dockerfile b/python/conda/linux_release/builder/Dockerfile
index d09a9d7..12bde50 100644
--- a/python/conda/linux_release/builder/Dockerfile
+++ b/python/conda/linux_release/builder/Dockerfile
@@ -1,8 +1,13 @@
 FROM astra-build-env
 ARG BUILD_NUMBER=
 WORKDIR /root
-RUN git clone -b master https://github.com/astra-toolbox/astra-toolbox
-RUN [ -z $BUILD_NUMBER ] || perl -pi -e "s/^(\s*number:\s*)[0-9]+$/\${1}$BUILD_NUMBER/" astra-toolbox/python/conda/libastra/meta.yaml astra-toolbox/python/conda//meta.yaml
+RUN git clone --depth 1 https://github.com/astra-toolbox/astra-toolbox
+RUN [ -z $BUILD_NUMBER ] || perl -pi -e "s/^(\s*number:\s*)[0-9]+$/\${1}$BUILD_NUMBER/" astra-toolbox/python/conda/libastra/meta.yaml astra-toolbox/python/conda/meta.yaml
 RUN conda-build --python=3.5 astra-toolbox/python/conda/libastra
-RUN conda-build --python=3.5 astra-toolbox/python/conda
-RUN conda-build --python=2.7 astra-toolbox/python/conda
+RUN conda-build --python 2.7 --numpy 1.8 astra-toolbox/python/conda
+RUN conda-build --python 2.7 --numpy 1.9 astra-toolbox/python/conda
+RUN conda-build --python 2.7 --numpy 1.10 astra-toolbox/python/conda
+RUN conda-build --python 2.7 --numpy 1.11 astra-toolbox/python/conda
+RUN conda-build --python 3.5 --numpy 1.9 astra-toolbox/python/conda
+RUN conda-build --python 3.5 --numpy 1.10 astra-toolbox/python/conda
+RUN conda-build --python 3.5 --numpy 1.11 astra-toolbox/python/conda
diff --git a/python/conda/linux_release/release.sh b/python/conda/linux_release/release.sh
index 35cbdd0..cf62bd5 100644
--- a/python/conda/linux_release/release.sh
+++ b/python/conda/linux_release/release.sh
@@ -6,6 +6,7 @@ D=`mktemp -d`
 [ -f buildenv/Miniconda3-4.2.12-Linux-x86_64.sh ] || (cd buildenv; wget https://repo.continuum.io/miniconda/Miniconda3-4.2.12-Linux-x86_64.sh )
 
 docker build -t astra-build-env buildenv
+#docker build --no-cache --build-arg=BUILD_NUMBER=0 -t astra-builder builder
 docker build --no-cache -t astra-builder builder
 
 docker run --name astra-build-cnt -v $D:/out:z astra-builder /bin/bash -c "cp /root/miniconda3/conda-bld/linux-64/*astra* /out"
-- 
cgit v1.2.3


From 3d080e9bd80714c65818feb31cdba131b36b6a3b Mon Sep 17 00:00:00 2001
From: Willem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl>
Date: Fri, 9 Dec 2016 15:39:57 +0100
Subject: Use external boost for conda/win-64

This enables py27 conda packages for win-64.
---
 python/conda/bld.bat            | 14 ++++++--------
 python/conda/libastra/bld.bat   | 14 +++++++-------
 python/conda/libastra/meta.yaml |  1 -
 python/conda/meta.yaml          |  1 -
 4 files changed, 13 insertions(+), 17 deletions(-)

(limited to 'python')

diff --git a/python/conda/bld.bat b/python/conda/bld.bat
index 9da8cd4..15777ce 100644
--- a/python/conda/bld.bat
+++ b/python/conda/bld.bat
@@ -1,27 +1,25 @@
 @echo off
 
-set R=%SRC_DIR%%
+set R=%SRC_DIR%
 
 set B_VC=C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64
 call "%B_VC%\vcvars64.bat"
 
-cd /D %R%
+set B_BV=1_62
+set B_BOOST=D:\wjp\boost_%B_BV%_0
 
-set B_BV=1_61
+cd /D "%B_BOOST%\lib64-msvc-14.0"
 
 mkdir "%R%\lib\x64"
 mkdir "%R%\bin\x64\Release_CUDA"
 
-cd /D %CONDA_PREFIX%\Library\lib
-
-
 copy boost_unit_test_framework-vc140-mt-%B_BV%.lib %R%\lib\x64
 copy libboost_chrono-vc140-mt-%B_BV%.lib %R%\lib\x64
 copy libboost_date_time-vc140-mt-%B_BV%.lib %R%\lib\x64
 copy libboost_system-vc140-mt-%B_BV%.lib %R%\lib\x64
 copy libboost_thread-vc140-mt-%B_BV%.lib %R%\lib\x64
 
-cd /D %CONDA_PREFIX%\Library\include
+cd %B_BOOST%
 
 xcopy /i /e /q boost "%R%\lib\include\boost"
 
@@ -31,5 +29,5 @@ cd python
 
 set VS90COMNTOOLS=%VS140COMNTOOLS%
 set CL=/DASTRA_CUDA /DASTRA_PYTHON "/I%R%\include" "/I%R%\lib\include" "/I%CUDA_PATH%\include"
-copy %CONDA_PREFIX%\Library\lib\AstraCuda64.lib astra.lib
+copy "%CONDA_PREFIX%\Library\lib\AstraCuda64.lib" astra.lib
 python builder.py build_ext --compiler=msvc install
diff --git a/python/conda/libastra/bld.bat b/python/conda/libastra/bld.bat
index bb7329a..29b894a 100644
--- a/python/conda/libastra/bld.bat
+++ b/python/conda/libastra/bld.bat
@@ -1,25 +1,25 @@
 @echo off
 
-set B_VC=C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64
+set R=%SRC_DIR%
 
+set B_VC=C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64
 call "%B_VC%\vcvars64.bat"
 
-set R=%SRC_DIR%
-set B_BV=1_61
+set B_BV=1_62
+set B_BOOST=D:\wjp\boost_%B_BV%_0
+
+cd /D "%B_BOOST%\lib64-msvc-14.0"
 
 mkdir "%R%\lib\x64"
 mkdir "%R%\bin\x64\Release_CUDA"
 
-cd /D %CONDA_PREFIX%\Library\lib
-
-
 copy boost_unit_test_framework-vc140-mt-%B_BV%.lib %R%\lib\x64
 copy libboost_chrono-vc140-mt-%B_BV%.lib %R%\lib\x64
 copy libboost_date_time-vc140-mt-%B_BV%.lib %R%\lib\x64
 copy libboost_system-vc140-mt-%B_BV%.lib %R%\lib\x64
 copy libboost_thread-vc140-mt-%B_BV%.lib %R%\lib\x64
 
-cd /D %CONDA_PREFIX%\Library\include
+cd %B_BOOST%
 
 xcopy /i /e /q boost "%R%\lib\include\boost"
 
diff --git a/python/conda/libastra/meta.yaml b/python/conda/libastra/meta.yaml
index 007cba9..c05a466 100644
--- a/python/conda/libastra/meta.yaml
+++ b/python/conda/libastra/meta.yaml
@@ -15,7 +15,6 @@ build:
 
 requirements:
   build:
-    - boost ==1.61 # [win]
     - vs2015_runtime # [win]
 
   run:
diff --git a/python/conda/meta.yaml b/python/conda/meta.yaml
index 8194d04..942397e 100644
--- a/python/conda/meta.yaml
+++ b/python/conda/meta.yaml
@@ -23,7 +23,6 @@ test:
 requirements:
   build:
     - python
-    - boost ==1.61 # [win]
     - cython >=0.13
     - nomkl # [not win]
     - numpy
-- 
cgit v1.2.3


From 67ad5142d08fa7708f2f7fc7db5e011e4e54e1d4 Mon Sep 17 00:00:00 2001
From: Willem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl>
Date: Mon, 2 Jan 2017 18:07:32 +0100
Subject: Build conda packages for linux-64/np111/py36

---
 python/conda/linux_release/builder/Dockerfile | 1 +
 1 file changed, 1 insertion(+)

(limited to 'python')

diff --git a/python/conda/linux_release/builder/Dockerfile b/python/conda/linux_release/builder/Dockerfile
index 12bde50..208e3ad 100644
--- a/python/conda/linux_release/builder/Dockerfile
+++ b/python/conda/linux_release/builder/Dockerfile
@@ -11,3 +11,4 @@ RUN conda-build --python 2.7 --numpy 1.11 astra-toolbox/python/conda
 RUN conda-build --python 3.5 --numpy 1.9 astra-toolbox/python/conda
 RUN conda-build --python 3.5 --numpy 1.10 astra-toolbox/python/conda
 RUN conda-build --python 3.5 --numpy 1.11 astra-toolbox/python/conda
+RUN conda-build --python 3.6 --numpy 1.11 astra-toolbox/python/conda
-- 
cgit v1.2.3


From 1d851f0a8fa093e044c7264569cc6f88df39a16e Mon Sep 17 00:00:00 2001
From: Willem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl>
Date: Thu, 26 Jan 2017 14:57:42 +0100
Subject: Remove unused 3d global min/max

---
 python/astra/data3d_c.pyx | 1 -
 1 file changed, 1 deletion(-)

(limited to 'python')

diff --git a/python/astra/data3d_c.pyx b/python/astra/data3d_c.pyx
index 915c60d..1b9293a 100644
--- a/python/astra/data3d_c.pyx
+++ b/python/astra/data3d_c.pyx
@@ -132,7 +132,6 @@ def create(datatype,geometry,data=None, link=False):
 
     if not link: fillDataObject(pDataObject3D, data)
 
-    pDataObject3D.updateStatistics()
 
     return man3d.store(<CFloat32Data3D*>pDataObject3D)
 
-- 
cgit v1.2.3


From ebd5fe932fd2d6c4a516bc1cdc69e37aa4f5cf55 Mon Sep 17 00:00:00 2001
From: Willem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl>
Date: Wed, 8 Feb 2017 10:43:35 +0100
Subject: Make python -sinocone a synonym of -sino.

The matlab interface already behaves like this.
---
 python/astra/data3d_c.pyx | 14 +-------------
 1 file changed, 1 insertion(+), 13 deletions(-)

(limited to 'python')

diff --git a/python/astra/data3d_c.pyx b/python/astra/data3d_c.pyx
index 1b9293a..3934f22 100644
--- a/python/astra/data3d_c.pyx
+++ b/python/astra/data3d_c.pyx
@@ -86,7 +86,7 @@ def create(datatype,geometry,data=None, link=False):
             pDataObject3D = <CFloat32Data3DMemory * > new CFloat32VolumeData3DMemory(pGeometry)
         del cfg
         del pGeometry
-    elif datatype == '-sino' or datatype == '-proj3d':
+    elif datatype == '-sino' or datatype == '-proj3d' or datatype == '-sinocone':
         cfg = utils.dictToConfig(six.b('ProjectionGeometry'), geometry)
         tpe = wrap_from_bytes(cfg.self.getAttribute(six.b('type')))
         if (tpe == "parallel3d"):
@@ -111,18 +111,6 @@ def create(datatype,geometry,data=None, link=False):
             pDataObject3D = <CFloat32Data3DMemory * > new CFloat32ProjectionData3DMemory(ppGeometry)
         del ppGeometry
         del cfg
-    elif datatype == "-sinocone":
-        cfg = utils.dictToConfig(six.b('ProjectionGeometry'), geometry)
-        pppGeometry = new CConeProjectionGeometry3D()
-        if not pppGeometry.initialize(cfg[0]):
-            del cfg
-            del pppGeometry
-            raise Exception('Geometry class not initialized.')
-        if link:
-            pCustom = <CFloat32CustomMemory*> new CFloat32CustomPython(data)
-            pDataObject3D = <CFloat32Data3DMemory * > new CFloat32ProjectionData3DMemory(pppGeometry, pCustom)
-        else:
-            pDataObject3D = <CFloat32Data3DMemory * > new CFloat32ProjectionData3DMemory(pppGeometry)
     else:
         raise Exception("Invalid datatype.  Please specify '-vol' or '-proj3d'.")
 
-- 
cgit v1.2.3


From d85a660f064e8130b27e11c7fd762221c754c315 Mon Sep 17 00:00:00 2001
From: Willem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl>
Date: Thu, 26 Jan 2017 14:57:57 +0100
Subject: Start work on CFloat32Data3DGPU to allow persistent/external GPU
 memory

---
 python/astra/PyIncludes.pxd   | 48 +++++++++++++++++++++++++++------------
 python/astra/data3d.py        |  8 ++++---
 python/astra/data3d_c.pyx     | 53 ++++++++++++++++++++++++++++++++-----------
 python/astra/experimental.pyx | 24 +++++++++++++-------
 python/astra/pythonutils.py   | 18 +++++++++++++++
 5 files changed, 113 insertions(+), 38 deletions(-)

(limited to 'python')

diff --git a/python/astra/PyIncludes.pxd b/python/astra/PyIncludes.pxd
index 39f9039..d5da17c 100644
--- a/python/astra/PyIncludes.pxd
+++ b/python/astra/PyIncludes.pxd
@@ -172,6 +172,13 @@ IF HAVE_CUDA==True:
 	cdef extern from "astra/CudaProjector2D.h" namespace "astra":
 		cdef cppclass CCudaProjector2D
 
+	cdef extern from "astra/Float32Data3DGPU.h" namespace "astraCUDA3d":
+		cdef cppclass MemHandle3D:
+			pass
+
+	cdef extern from "astra/Float32Data3DGPU.h" namespace "astraCUDA3d":
+		cdef MemHandle3D wrapHandle(float *D_ptr, unsigned int x, unsigned int y, unsigned int z, unsigned int pitch)
+
 
 cdef extern from "astra/SparseMatrix.h" namespace "astra":
 	cdef cppclass CSparseMatrix:
@@ -184,14 +191,18 @@ cdef extern from "astra/SparseMatrix.h" namespace "astra":
 		unsigned int* m_piColIndices
 		unsigned long* m_plRowStarts
 
-cdef extern from "astra/Float32Data3DMemory.h" namespace "astra":
-	cdef cppclass CFloat32Data3DMemory:
-		CFloat32Data3DMemory()
+cdef extern from "astra/Float32Data3D.h" namespace "astra":
+	cdef cppclass CFloat32Data3D:
 		bool isInitialized()
 		int getSize()
 		int getWidth()
 		int getHeight()
 		int getDepth()
+
+
+cdef extern from "astra/Float32Data3DMemory.h" namespace "astra":
+	cdef cppclass CFloat32Data3DMemory(CFloat32Data3D):
+		CFloat32Data3DMemory()
 		void updateStatistics()
 		float32 *getData()
 		float32 ***getData3D()
@@ -228,8 +239,6 @@ cdef extern from "astra/Float32VolumeData3DMemory.h" namespace "astra":
 		int getSliceCount()
 		bool isInitialized()
 
-
-
 cdef extern from "astra/ParallelProjectionGeometry3D.h" namespace "astra":
 	cdef cppclass CParallelProjectionGeometry3D:
 		CParallelProjectionGeometry3D()
@@ -260,12 +269,23 @@ cdef extern from "astra/Float32ProjectionData3DMemory.h" namespace "astra":
 		int getAngleCount()
 		bool isInitialized()
 
-cdef extern from "astra/Float32Data3D.h" namespace "astra":
-	cdef cppclass CFloat32Data3D:
-		CFloat32Data3D()
-		bool isInitialized()
-		int getSize()
-		int getWidth()
-		int getHeight()
-		int getDepth()
-		void updateStatistics()
+IF HAVE_CUDA==True:
+	cdef extern from "astra/Float32VolumeData3DGPU.h" namespace "astra":
+		cdef cppclass CFloat32VolumeData3DGPU:
+			CFloat32VolumeData3DGPU(CVolumeGeometry3D*, MemHandle3D)
+			CVolumeGeometry3D* getGeometry()
+			void changeGeometry(CVolumeGeometry3D*)
+			int getRowCount()
+			int getColCount()
+			int getSliceCount()
+			bool isInitialized()
+
+	cdef extern from "astra/Float32ProjectionData3DGPU.h" namespace "astra":
+		cdef cppclass CFloat32ProjectionData3DGPU:
+			CFloat32ProjectionData3DGPU(CProjectionGeometry3D*, MemHandle3D)
+			CProjectionGeometry3D* getGeometry()
+			void changeGeometry(CProjectionGeometry3D*)
+			int getRowCount()
+			int getColCount()
+			int getSliceCount()
+			bool isInitialized()
diff --git a/python/astra/data3d.py b/python/astra/data3d.py
index 9c2bea4..a825700 100644
--- a/python/astra/data3d.py
+++ b/python/astra/data3d.py
@@ -26,6 +26,8 @@
 from . import data3d_c as d
 import numpy as np
 
+from .pythonutils import GPULink
+
 def create(datatype,geometry,data=None):
     """Create a 3D object.
 
@@ -52,11 +54,11 @@ def link(datatype, geometry, data):
     :returns: :class:`int` -- the ID of the constructed object.
     
     """
-    if not isinstance(data,np.ndarray):
+    if not isinstance(data,np.ndarray) and not isinstance(data,GPULink):
         raise ValueError("Input should be a numpy array")
-    if not data.dtype==np.float32:
+    if not isinstance(data,GPULink) and not data.dtype==np.float32:
         raise ValueError("Numpy array should be float32")
-    if not (data.flags['C_CONTIGUOUS'] and data.flags['ALIGNED']):
+    if not isinstance(data,GPULink) and not (data.flags['C_CONTIGUOUS'] and data.flags['ALIGNED']):
         raise ValueError("Numpy array should be C_CONTIGUOUS and ALIGNED")
     return d.create(datatype,geometry,data,True)
 
diff --git a/python/astra/data3d_c.pyx b/python/astra/data3d_c.pyx
index 3934f22..56247de 100644
--- a/python/astra/data3d_c.pyx
+++ b/python/astra/data3d_c.pyx
@@ -45,12 +45,17 @@ from .PyXMLDocument cimport XMLDocument
 cimport utils
 from .utils import wrap_from_bytes
 
-from .pythonutils import geom_size
+from .pythonutils import geom_size, GPULink
 
 import operator
 
 from six.moves import reduce
 
+include "config.pxi"
+
+cdef extern from "Python.h":
+    void* PyLong_AsVoidPtr(object)
+
 
 cdef CData3DManager * man3d = <CData3DManager * >PyData3DManager.getSingletonPtr()
 
@@ -65,12 +70,19 @@ def create(datatype,geometry,data=None, link=False):
     cdef Config *cfg
     cdef CVolumeGeometry3D * pGeometry
     cdef CProjectionGeometry3D * ppGeometry
-    cdef CFloat32Data3DMemory * pDataObject3D
+    cdef CFloat32Data3D * pDataObject3D
     cdef CConeProjectionGeometry3D* pppGeometry
-    cdef CFloat32CustomMemory * pCustom
-
-    if link and data.shape!=geom_size(geometry):
-        raise Exception("The dimensions of the data do not match those specified in the geometry.")
+    cdef CFloat32CustomMemory * pCustom = NULL
+    IF HAVE_CUDA==True:
+        cdef MemHandle3D hnd
+
+    if link:
+        if isinstance(data, GPULink):
+            s = geom_size(geometry)
+            if geom_size(geometry) != ( data.z, data.y, data.x ):
+                raise Exception("The dimensions of the data do not match those specified in the geometry.")
+        elif data.shape!=geom_size(geometry):
+            raise Exception("The dimensions of the data do not match those specified in the geometry.")
 
     if datatype == '-vol':
         cfg = utils.dictToConfig(six.b('VolumeGeometry'), geometry)
@@ -80,10 +92,18 @@ def create(datatype,geometry,data=None, link=False):
             del pGeometry
             raise Exception('Geometry class not initialized.')
         if link:
-            pCustom = <CFloat32CustomMemory*> new CFloat32CustomPython(data)
-            pDataObject3D = <CFloat32Data3DMemory * > new CFloat32VolumeData3DMemory(pGeometry, pCustom)
+            if isinstance(data, GPULink):
+                IF HAVE_CUDA==True:
+                    s = geom_size(geometry)
+                    hnd = wrapHandle(<float*>PyLong_AsVoidPtr(data.ptr), data.x, data.y, data.z, data.pitch/4)
+                    pDataObject3D = <CFloat32Data3D * > new CFloat32VolumeData3DGPU(pGeometry, hnd)
+                ELSE:
+                    raise NotImplementedError("CUDA support is not enabled in ASTRA")
+            else:
+                pCustom = <CFloat32CustomMemory*> new CFloat32CustomPython(data)
+                pDataObject3D = <CFloat32Data3D * > new CFloat32VolumeData3DMemory(pGeometry, pCustom)
         else:
-            pDataObject3D = <CFloat32Data3DMemory * > new CFloat32VolumeData3DMemory(pGeometry)
+            pDataObject3D = <CFloat32Data3D * > new CFloat32VolumeData3DMemory(pGeometry)
         del cfg
         del pGeometry
     elif datatype == '-sino' or datatype == '-proj3d' or datatype == '-sinocone':
@@ -105,8 +125,16 @@ def create(datatype,geometry,data=None, link=False):
             del ppGeometry
             raise Exception('Geometry class not initialized.')
         if link:
-            pCustom = <CFloat32CustomMemory*> new CFloat32CustomPython(data)
-            pDataObject3D = <CFloat32Data3DMemory * > new CFloat32ProjectionData3DMemory(ppGeometry, pCustom)
+            if isinstance(data, GPULink):
+                IF HAVE_CUDA==True:
+                    s = geom_size(geometry)
+                    hnd = wrapHandle(<float*>PyLong_AsVoidPtr(data.ptr), data.x, data.y, data.z, data.pitch/4)
+                    pDataObject3D = <CFloat32Data3D * > new CFloat32ProjectionData3DGPU(ppGeometry, hnd)
+                ELSE:
+                    raise NotImplementedError("CUDA support is not enabled in ASTRA")
+            else:
+                pCustom = <CFloat32CustomMemory*> new CFloat32CustomPython(data)
+                pDataObject3D = <CFloat32Data3D * > new CFloat32ProjectionData3DMemory(ppGeometry, pCustom)
         else:
             pDataObject3D = <CFloat32Data3DMemory * > new CFloat32ProjectionData3DMemory(ppGeometry)
         del ppGeometry
@@ -118,8 +146,7 @@ def create(datatype,geometry,data=None, link=False):
         del pDataObject3D
         raise Exception("Couldn't initialize data object.")
 
-    if not link: fillDataObject(pDataObject3D, data)
-
+    if not link: fillDataObject(dynamic_cast_mem(pDataObject3D), data)
 
     return man3d.store(<CFloat32Data3D*>pDataObject3D)
 
diff --git a/python/astra/experimental.pyx b/python/astra/experimental.pyx
index b6c7881..0af3118 100644
--- a/python/astra/experimental.pyx
+++ b/python/astra/experimental.pyx
@@ -36,12 +36,20 @@ IF HAVE_CUDA==True:
 
     cdef extern from "astra/CompositeGeometryManager.h" namespace "astra":
         cdef cppclass CCompositeGeometryManager:
-            bool doFP(CProjector3D *, vector[CFloat32VolumeData3DMemory *], vector[CFloat32ProjectionData3DMemory *])
-            bool doBP(CProjector3D *, vector[CFloat32VolumeData3DMemory *], vector[CFloat32ProjectionData3DMemory *])
+            bool doFP(CProjector3D *, vector[CFloat32VolumeData3D *], vector[CFloat32ProjectionData3D *])
+            bool doBP(CProjector3D *, vector[CFloat32VolumeData3D *], vector[CFloat32ProjectionData3D *])
 
     cdef extern from *:
-        CFloat32VolumeData3DMemory * dynamic_cast_vol_mem "dynamic_cast<astra::CFloat32VolumeData3DMemory*>" (CFloat32Data3D * ) except NULL
-        CFloat32ProjectionData3DMemory * dynamic_cast_proj_mem "dynamic_cast<astra::CFloat32ProjectionData3DMemory*>" (CFloat32Data3D * ) except NULL
+        CFloat32VolumeData3D * dynamic_cast_vol_mem "dynamic_cast<astra::CFloat32VolumeData3D*>" (CFloat32Data3D * ) except NULL
+        CFloat32ProjectionData3D * dynamic_cast_proj_mem "dynamic_cast<astra::CFloat32ProjectionData3D*>" (CFloat32Data3D * ) except NULL
+
+    cdef extern from "astra/Float32ProjectionData3D.h" namespace "astra":
+        cdef cppclass CFloat32ProjectionData3D:
+            bool isInitialized()
+    cdef extern from "astra/Float32VolumeData3D.h" namespace "astra":
+        cdef cppclass CFloat32VolumeData3D:
+            bool isInitialized()
+
 
     cimport PyProjector3DManager
     from .PyProjector3DManager cimport CProjector3DManager
@@ -52,9 +60,9 @@ IF HAVE_CUDA==True:
     cdef CData3DManager * man3d = <CData3DManager * >PyData3DManager.getSingletonPtr()
 
     def do_composite(projector_id, vol_ids, proj_ids, t):
-        cdef vector[CFloat32VolumeData3DMemory *] vol
-        cdef CFloat32VolumeData3DMemory * pVolObject
-        cdef CFloat32ProjectionData3DMemory * pProjObject
+        cdef vector[CFloat32VolumeData3D *] vol
+        cdef CFloat32VolumeData3D * pVolObject
+        cdef CFloat32ProjectionData3D * pProjObject
         for v in vol_ids:
             pVolObject = dynamic_cast_vol_mem(man3d.get(v))
             if pVolObject == NULL:
@@ -62,7 +70,7 @@ IF HAVE_CUDA==True:
             if not pVolObject.isInitialized():
                 raise Exception("Data object not initialized properly")
             vol.push_back(pVolObject)
-        cdef vector[CFloat32ProjectionData3DMemory *] proj
+        cdef vector[CFloat32ProjectionData3D *] proj
         for v in proj_ids:
             pProjObject = dynamic_cast_proj_mem(man3d.get(v))
             if pProjObject == NULL:
diff --git a/python/astra/pythonutils.py b/python/astra/pythonutils.py
index 3bd3321..27fa8fd 100644
--- a/python/astra/pythonutils.py
+++ b/python/astra/pythonutils.py
@@ -61,3 +61,21 @@ def geom_size(geom, dim=None):
         s = s[dim]
 
     return s
+
+class GPULink(object):
+    """Utility class for astra.data3d.link with a CUDA pointer
+
+    The CUDA pointer ptr must point to an array of floats.
+
+    x is the fastest-changing coordinate, z the slowest-changing.
+
+    pitch is the width in bytes of the memory block. For a contiguous
+    memory block, pitch is equal to sizeof(float) * x. For a memory block
+    allocated by cudaMalloc3D, pitch is the pitch as returned by cudaMalloc3D.
+    """
+    def __init__(self, ptr, x, y, z, pitch):
+        self.ptr = ptr
+        self.x = x
+        self.y = y
+        self.z = z
+        self.pitch = pitch
-- 
cgit v1.2.3


From ae33f713a2dea236e28145dcd6007589feb618ed Mon Sep 17 00:00:00 2001
From: Willem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl>
Date: Wed, 8 Feb 2017 10:47:22 +0100
Subject: Make typechecks in data3d.create more robust

---
 python/astra/data3d_c.pyx | 28 ++++++++++++++++++----------
 1 file changed, 18 insertions(+), 10 deletions(-)

(limited to 'python')

diff --git a/python/astra/data3d_c.pyx b/python/astra/data3d_c.pyx
index 56247de..73e75b9 100644
--- a/python/astra/data3d_c.pyx
+++ b/python/astra/data3d_c.pyx
@@ -77,12 +77,15 @@ def create(datatype,geometry,data=None, link=False):
         cdef MemHandle3D hnd
 
     if link:
-        if isinstance(data, GPULink):
+        if isinstance(data, np.ndarray):
+            if data.shape != geom_size(geometry):
+                raise Exception("The dimensions of the data do not match those specified in the geometry.")
+        elif isinstance(data, GPULink):
             s = geom_size(geometry)
             if geom_size(geometry) != ( data.z, data.y, data.x ):
                 raise Exception("The dimensions of the data do not match those specified in the geometry.")
-        elif data.shape!=geom_size(geometry):
-            raise Exception("The dimensions of the data do not match those specified in the geometry.")
+        else:
+            raise TypeError("data should be a numpy.ndarray or a GPULink object")
 
     if datatype == '-vol':
         cfg = utils.dictToConfig(six.b('VolumeGeometry'), geometry)
@@ -92,7 +95,10 @@ def create(datatype,geometry,data=None, link=False):
             del pGeometry
             raise Exception('Geometry class not initialized.')
         if link:
-            if isinstance(data, GPULink):
+            if isinstance(data, np.ndarray):
+                pCustom = <CFloat32CustomMemory*> new CFloat32CustomPython(data)
+                pDataObject3D = <CFloat32Data3D * > new CFloat32VolumeData3DMemory(pGeometry, pCustom)
+            elif isinstance(data, GPULink):
                 IF HAVE_CUDA==True:
                     s = geom_size(geometry)
                     hnd = wrapHandle(<float*>PyLong_AsVoidPtr(data.ptr), data.x, data.y, data.z, data.pitch/4)
@@ -100,8 +106,7 @@ def create(datatype,geometry,data=None, link=False):
                 ELSE:
                     raise NotImplementedError("CUDA support is not enabled in ASTRA")
             else:
-                pCustom = <CFloat32CustomMemory*> new CFloat32CustomPython(data)
-                pDataObject3D = <CFloat32Data3D * > new CFloat32VolumeData3DMemory(pGeometry, pCustom)
+                raise TypeError("data should be a numpy.ndarray or a GPULink object")
         else:
             pDataObject3D = <CFloat32Data3D * > new CFloat32VolumeData3DMemory(pGeometry)
         del cfg
@@ -125,7 +130,10 @@ def create(datatype,geometry,data=None, link=False):
             del ppGeometry
             raise Exception('Geometry class not initialized.')
         if link:
-            if isinstance(data, GPULink):
+            if isinstance(data, np.ndarray):
+                pCustom = <CFloat32CustomMemory*> new CFloat32CustomPython(data)
+                pDataObject3D = <CFloat32Data3D * > new CFloat32ProjectionData3DMemory(ppGeometry, pCustom)
+            elif isinstance(data, GPULink):
                 IF HAVE_CUDA==True:
                     s = geom_size(geometry)
                     hnd = wrapHandle(<float*>PyLong_AsVoidPtr(data.ptr), data.x, data.y, data.z, data.pitch/4)
@@ -133,8 +141,7 @@ def create(datatype,geometry,data=None, link=False):
                 ELSE:
                     raise NotImplementedError("CUDA support is not enabled in ASTRA")
             else:
-                pCustom = <CFloat32CustomMemory*> new CFloat32CustomPython(data)
-                pDataObject3D = <CFloat32Data3D * > new CFloat32ProjectionData3DMemory(ppGeometry, pCustom)
+                raise TypeError("data should be a numpy.ndarray or a GPULink object")
         else:
             pDataObject3D = <CFloat32Data3DMemory * > new CFloat32ProjectionData3DMemory(ppGeometry)
         del ppGeometry
@@ -146,7 +153,8 @@ def create(datatype,geometry,data=None, link=False):
         del pDataObject3D
         raise Exception("Couldn't initialize data object.")
 
-    if not link: fillDataObject(dynamic_cast_mem(pDataObject3D), data)
+    if not link:
+        fillDataObject(dynamic_cast_mem(pDataObject3D), data)
 
     return man3d.store(<CFloat32Data3D*>pDataObject3D)
 
-- 
cgit v1.2.3


From 2af27e7ba08a65cce15c7e0658712fbba8f447fd Mon Sep 17 00:00:00 2001
From: Willem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl>
Date: Wed, 8 Feb 2017 11:31:31 +0100
Subject: Improve data2d/data3d error messages

---
 python/astra/data2d_c.pyx | 57 +++++++++++++++++++++++-------------------
 python/astra/data3d.py    | 11 +++++----
 python/astra/data3d_c.pyx | 63 ++++++++++++++++++++++++-----------------------
 3 files changed, 70 insertions(+), 61 deletions(-)

(limited to 'python')

diff --git a/python/astra/data2d_c.pyx b/python/astra/data2d_c.pyx
index 203fde2..9c88073 100644
--- a/python/astra/data2d_c.pyx
+++ b/python/astra/data2d_c.pyx
@@ -83,8 +83,10 @@ def create(datatype, geometry, data=None, link=False):
     cdef CFloat32Data2D * pDataObject2D
     cdef CFloat32CustomMemory * pCustom
 
-    if link and data.shape!=geom_size(geometry):
-        raise Exception("The dimensions of the data do not match those specified in the geometry.")
+    if link:
+        geom_shape = geom_size(geometry)
+        if data.shape != geom_shape:
+            raise ValueError("The dimensions of the data do not match those specified in the geometry: {} != {}".format(data.shape, geom_shape))
 
     if datatype == '-vol':
         cfg = utils.dictToConfig(six.b('VolumeGeometry'), geometry)
@@ -92,7 +94,7 @@ def create(datatype, geometry, data=None, link=False):
         if not pGeometry.initialize(cfg[0]):
             del cfg
             del pGeometry
-            raise Exception('Geometry class not initialized.')
+            raise RuntimeError('Geometry class not initialized.')
         if link:
             pCustom = <CFloat32CustomMemory*> new CFloat32CustomPython(data)
             pDataObject2D = <CFloat32Data2D * > new CFloat32VolumeData2D(pGeometry, pCustom)
@@ -114,7 +116,7 @@ def create(datatype, geometry, data=None, link=False):
         if not ppGeometry.initialize(cfg[0]):
             del cfg
             del ppGeometry
-            raise Exception('Geometry class not initialized.')
+            raise RuntimeError('Geometry class not initialized.')
         if link:
             pCustom = <CFloat32CustomMemory*> new CFloat32CustomPython(data)
             pDataObject2D = <CFloat32Data2D * > new CFloat32ProjectionData2D(ppGeometry, pCustom)
@@ -123,11 +125,11 @@ def create(datatype, geometry, data=None, link=False):
         del ppGeometry
         del cfg
     else:
-        raise Exception("Invalid datatype.  Please specify '-vol' or '-sino'.")
+        raise ValueError("Invalid datatype.  Please specify '-vol' or '-sino'.")
 
     if not pDataObject2D.isInitialized():
         del pDataObject2D
-        raise Exception("Couldn't initialize data object.")
+        raise RuntimeError("Couldn't initialize data object.")
 
     if not link: fillDataObject(pDataObject2D, data)
 
@@ -138,6 +140,10 @@ cdef fillDataObject(CFloat32Data2D * obj, data):
         fillDataObjectScalar(obj, 0)
     else:
         if isinstance(data, np.ndarray):
+            obj_shape = (obj.getHeight(), obj.getWidth())
+            if data.shape != obj_shape:
+                raise ValueError(
+                  "The dimensions of the data do not match those specified in the geometry: {} != {}".format(data.shape, obj_shape))
             fillDataObjectArray(obj, np.ascontiguousarray(data,dtype=np.float32))
         else:
             fillDataObjectScalar(obj, np.float32(data))
@@ -150,18 +156,15 @@ cdef fillDataObjectScalar(CFloat32Data2D * obj, float s):
 @cython.boundscheck(False)
 @cython.wraparound(False)
 cdef fillDataObjectArray(CFloat32Data2D * obj, float [:,::1] data):
-    if (not data.shape[0] == obj.getHeight()) or (not data.shape[1] == obj.getWidth()):
-        raise Exception(
-            "The dimensions of the data do not match those specified in the geometry.")
     cdef float [:,::1] cView =  <float[:data.shape[0],:data.shape[1]]> obj.getData2D()[0]
     cView[:] = data
 
 cdef CFloat32Data2D * getObject(i) except NULL:
     cdef CFloat32Data2D * pDataObject = man2d.get(i)
     if pDataObject == NULL:
-        raise Exception("Data object not found")
+        raise ValueError("Data object not found")
     if not pDataObject.isInitialized():
-        raise Exception("Data object not initialized properly.")
+        raise RuntimeError("Data object not initialized properly.")
     return pDataObject
 
 
@@ -180,15 +183,15 @@ def get_geometry(i):
         pDataObject3 = <CFloat32VolumeData2D * >pDataObject
         geom = utils.configToDict(pDataObject3.getGeometry().getConfiguration())
     else:
-        raise Exception("Not a known data object")
+        raise RuntimeError("Not a known data object")
     return geom
 
 cdef CProjector2D * getProjector(i) except NULL:
     cdef CProjector2D * proj = manProj.get(i)
     if proj == NULL:
-        raise Exception("Projector not initialized.")
+        raise RuntimeError("Projector not initialized.")
     if not proj.isInitialized():
-        raise Exception("Projector not initialized.")
+        raise RuntimeError("Projector not initialized.")
     return proj
 
 def check_compatible(i, proj_id):
@@ -203,7 +206,7 @@ def check_compatible(i, proj_id):
         pDataObject3 = <CFloat32VolumeData2D * >pDataObject
         return pDataObject3.getGeometry().isEqual(proj.getVolumeGeometry())
     else:
-        raise Exception("Not a known data object")
+        raise RuntimeError("Not a known data object")
 
 def change_geometry(i, geom):
     cdef Config *cfg
@@ -227,12 +230,14 @@ def change_geometry(i, geom):
         if not ppGeometry.initialize(cfg[0]):
             del cfg
             del ppGeometry
-            raise Exception('Geometry class not initialized.')
-        if (ppGeometry.getDetectorCount() != pDataObject2.getDetectorCount() or ppGeometry.getProjectionAngleCount() != pDataObject2.getAngleCount()):
+            raise RuntimeError('Geometry class not initialized.')
+        geom_shape = (ppGeometry.getProjectionAngleCount(), ppGeometry.getDetectorCount())
+        obj_shape = (pDataObject2.getAngleCount(), pDataObject2.getDetectorCount())
+        if geom_shape != obj_shape:
             del ppGeometry
             del cfg
-            raise Exception(
-                "The dimensions of the data do not match those specified in the geometry.")
+            raise ValueError(
+                "The dimensions of the data do not match those specified in the geometry: {} != {}", obj_shape, geom_shape)
         pDataObject2.changeGeometry(ppGeometry)
         del ppGeometry
         del cfg
@@ -243,17 +248,19 @@ def change_geometry(i, geom):
         if not pGeometry.initialize(cfg[0]):
             del cfg
             del pGeometry
-            raise Exception('Geometry class not initialized.')
-        if (pGeometry.getGridColCount() != pDataObject3.getWidth() or pGeometry.getGridRowCount() != pDataObject3.getHeight()):
+            raise RuntimeError('Geometry class not initialized.')
+        geom_shape = (pGeometry.getGridRowCount(), pGeometry.getGridColCount())
+        obj_shape = (pDataObject3.getHeight(), pDataObject3.getWidth())
+        if geom_shape != obj_shape:
             del cfg
             del pGeometry
-            raise Exception(
-                'The dimensions of the data do not match those specified in the geometry.')
+            raise ValueError(
+                "The dimensions of the data do not match those specified in the geometry: {} != {}", obj_shape, geom_shape)
         pDataObject3.changeGeometry(pGeometry)
         del cfg
         del pGeometry
     else:
-        raise Exception("Not a known data object")
+        raise RuntimeError("Not a known data object")
 
 @cython.boundscheck(False)
 @cython.wraparound(False)
@@ -274,7 +281,7 @@ def get_shared(i):
 
 
 def get_single(i):
-    raise Exception("Not yet implemented")
+    raise NotImplementedError("Not yet implemented")
 
 
 def info():
diff --git a/python/astra/data3d.py b/python/astra/data3d.py
index a825700..ecb99d0 100644
--- a/python/astra/data3d.py
+++ b/python/astra/data3d.py
@@ -55,11 +55,12 @@ def link(datatype, geometry, data):
     
     """
     if not isinstance(data,np.ndarray) and not isinstance(data,GPULink):
-        raise ValueError("Input should be a numpy array")
-    if not isinstance(data,GPULink) and not data.dtype==np.float32:
-        raise ValueError("Numpy array should be float32")
-    if not isinstance(data,GPULink) and not (data.flags['C_CONTIGUOUS'] and data.flags['ALIGNED']):
-        raise ValueError("Numpy array should be C_CONTIGUOUS and ALIGNED")
+        raise TypeError("Input should be a numpy ndarray or GPULink object")
+    if isinstance(data, np.ndarray):
+        if data.dtype != np.float32:
+            raise ValueError("Numpy array should be float32")
+        if not (data.flags['C_CONTIGUOUS'] and data.flags['ALIGNED']):
+            raise ValueError("Numpy array should be C_CONTIGUOUS and ALIGNED")
     return d.create(datatype,geometry,data,True)
 
 
diff --git a/python/astra/data3d_c.pyx b/python/astra/data3d_c.pyx
index 73e75b9..78ed620 100644
--- a/python/astra/data3d_c.pyx
+++ b/python/astra/data3d_c.pyx
@@ -77,15 +77,15 @@ def create(datatype,geometry,data=None, link=False):
         cdef MemHandle3D hnd
 
     if link:
+        geom_shape = geom_size(geometry)
         if isinstance(data, np.ndarray):
-            if data.shape != geom_size(geometry):
-                raise Exception("The dimensions of the data do not match those specified in the geometry.")
+            data_shape = data.shape
         elif isinstance(data, GPULink):
-            s = geom_size(geometry)
-            if geom_size(geometry) != ( data.z, data.y, data.x ):
-                raise Exception("The dimensions of the data do not match those specified in the geometry.")
+            data_shape = ( data.z, data.y, data.x )
         else:
             raise TypeError("data should be a numpy.ndarray or a GPULink object")
+        if geom_shape != data_shape:
+            raise ValueError("The dimensions of the data do not match those specified in the geometry: {} != {}".format(data_shape, geom_shape))
 
     if datatype == '-vol':
         cfg = utils.dictToConfig(six.b('VolumeGeometry'), geometry)
@@ -93,7 +93,7 @@ def create(datatype,geometry,data=None, link=False):
         if not pGeometry.initialize(cfg[0]):
             del cfg
             del pGeometry
-            raise Exception('Geometry class not initialized.')
+            raise RuntimeError('Geometry class not initialized.')
         if link:
             if isinstance(data, np.ndarray):
                 pCustom = <CFloat32CustomMemory*> new CFloat32CustomPython(data)
@@ -123,12 +123,12 @@ def create(datatype,geometry,data=None, link=False):
         elif (tpe == "cone_vec"):
             ppGeometry = <CProjectionGeometry3D*> new CConeVecProjectionGeometry3D();
         else:
-            raise Exception("Invalid geometry type.")
+            raise ValueError("Invalid geometry type.")
 
         if not ppGeometry.initialize(cfg[0]):
             del cfg
             del ppGeometry
-            raise Exception('Geometry class not initialized.')
+            raise RuntimeError('Geometry class not initialized.')
         if link:
             if isinstance(data, np.ndarray):
                 pCustom = <CFloat32CustomMemory*> new CFloat32CustomPython(data)
@@ -147,11 +147,11 @@ def create(datatype,geometry,data=None, link=False):
         del ppGeometry
         del cfg
     else:
-        raise Exception("Invalid datatype.  Please specify '-vol' or '-proj3d'.")
+        raise ValueError("Invalid datatype.  Please specify '-vol' or '-proj3d'.")
 
     if not pDataObject3D.isInitialized():
         del pDataObject3D
-        raise Exception("Couldn't initialize data object.")
+        raise RuntimeError("Couldn't initialize data object.")
 
     if not link:
         fillDataObject(dynamic_cast_mem(pDataObject3D), data)
@@ -169,7 +169,7 @@ def get_geometry(i):
         pDataObject3 = <CFloat32VolumeData3DMemory * >pDataObject
         geom = utils.configToDict(pDataObject3.getGeometry().getConfiguration())
     else:
-        raise Exception("Not a known data object")
+        raise RuntimeError("Not a known data object")
     return geom
 
 def change_geometry(i, geom):
@@ -190,18 +190,18 @@ def change_geometry(i, geom):
         elif (tpe == "cone_vec"):
             ppGeometry = <CProjectionGeometry3D*> new CConeVecProjectionGeometry3D();
         else:
-            raise Exception("Invalid geometry type.")
+            raise ValueError("Invalid geometry type.")
         if not ppGeometry.initialize(cfg[0]):
             del cfg
             del ppGeometry
-            raise Exception('Geometry class not initialized.')
+            raise RuntimeError('Geometry class not initialized.')
         del cfg
-        if (ppGeometry.getDetectorColCount() != pDataObject2.getDetectorColCount() or \
-            ppGeometry.getProjectionCount() != pDataObject2.getAngleCount() or \
-            ppGeometry.getDetectorRowCount() != pDataObject2.getDetectorRowCount()):
+        geom_shape = (ppGeometry.getDetectorRowCount(), ppGeometry.getProjectionCount(), ppGeometry.getDetectorColCount())
+        obj_shape = (pDataObject2.getDetectorRowCount(), pDataObject2.getAngleCount(), pDataObject2.getDetectorColCount())
+        if geom_shape != obj_shape:
             del ppGeometry
-            raise Exception(
-                "The dimensions of the data do not match those specified in the geometry.")
+            raise ValueError(
+                "The dimensions of the data do not match those specified in the geometry: {} != {}".format(obj_shape, geom_shape))
         pDataObject2.changeGeometry(ppGeometry)
         del ppGeometry
 
@@ -212,19 +212,19 @@ def change_geometry(i, geom):
         if not pGeometry.initialize(cfg[0]):
             del cfg
             del pGeometry
-            raise Exception('Geometry class not initialized.')
+            raise RuntimeError('Geometry class not initialized.')
         del cfg
-        if (pGeometry.getGridColCount() != pDataObject3.getColCount() or \
-            pGeometry.getGridRowCount() != pDataObject3.getRowCount() or \
-            pGeometry.getGridSliceCount() != pDataObject3.getSliceCount()):
+        geom_shape = (pGeometry.getGridSliceCount(), pGeometry.getGridRowCount(), pGeometry.getGridColCount())
+        obj_shape = (pDataObject3.getSliceCount(), pDataObject3.getRowCount(), pDataObject3.getColCount())
+        if geom_shape != obj_shape:
             del pGeometry
-            raise Exception(
-                "The dimensions of the data do not match those specified in the geometry.")
+            raise ValueError(
+                "The dimensions of the data do not match those specified in the geometry.".format(obj_shape, geom_shape))
         pDataObject3.changeGeometry(pGeometry)
         del pGeometry
 
     else:
-        raise Exception("Not a known data object")
+        raise RuntimeError("Not a known data object")
 
 
 cdef fillDataObject(CFloat32Data3DMemory * obj, data):
@@ -232,6 +232,10 @@ cdef fillDataObject(CFloat32Data3DMemory * obj, data):
         fillDataObjectScalar(obj, 0)
     else:
         if isinstance(data, np.ndarray):
+            obj_shape = (obj.getDepth(), obj.getHeight(), obj.getWidth())
+            if data.shape != obj_shape:
+                raise ValueError(
+                  "The dimensions of the data do not match those specified in the geometry: {} != {}".format(data.shape, obj_shape))
             fillDataObjectArray(obj, np.ascontiguousarray(data,dtype=np.float32))
         else:
             fillDataObjectScalar(obj, np.float32(data))
@@ -244,18 +248,15 @@ cdef fillDataObjectScalar(CFloat32Data3DMemory * obj, float s):
 @cython.boundscheck(False)
 @cython.wraparound(False)
 cdef fillDataObjectArray(CFloat32Data3DMemory * obj, float [:,:,::1] data):
-    if (not data.shape[0] == obj.getDepth()) or (not data.shape[1] == obj.getHeight()) or (not data.shape[2] == obj.getWidth()):
-        raise Exception(
-            "The dimensions of the data do not match those specified in the geometry.")
     cdef float [:,:,::1] cView = <float[:data.shape[0],:data.shape[1],:data.shape[2]]> obj.getData3D()[0][0]
     cView[:] = data
 
 cdef CFloat32Data3D * getObject(i) except NULL:
     cdef CFloat32Data3D * pDataObject = man3d.get(i)
     if pDataObject == NULL:
-        raise Exception("Data object not found")
+        raise ValueError("Data object not found")
     if not pDataObject.isInitialized():
-        raise Exception("Data object not initialized properly.")
+        raise RuntimeError("Data object not initialized properly.")
     return pDataObject
 
 @cython.boundscheck(False)
@@ -278,7 +279,7 @@ def get_shared(i):
     return np.PyArray_SimpleNewFromData(3,shape,np.NPY_FLOAT32,<void *>pDataObject.getData3D()[0][0])
 
 def get_single(i):
-    raise Exception("Not yet implemented")
+    raise NotImplementedError("Not yet implemented")
 
 def store(i,data):
     cdef CFloat32Data3D * pDataObject = getObject(i)
-- 
cgit v1.2.3


From 4c665b0d5af3841f20501a5dc01a23e671367856 Mon Sep 17 00:00:00 2001
From: Willem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl>
Date: Wed, 8 Feb 2017 14:21:18 +0100
Subject: Remove tabs from python code

---
 python/astra/PyIncludes.pxd | 370 ++++++++++++++++++++++----------------------
 python/astra/creators.py    |   2 +-
 python/astra/extrautils.pyx |  32 ++--
 3 files changed, 202 insertions(+), 202 deletions(-)

(limited to 'python')

diff --git a/python/astra/PyIncludes.pxd b/python/astra/PyIncludes.pxd
index d5da17c..b40d787 100644
--- a/python/astra/PyIncludes.pxd
+++ b/python/astra/PyIncludes.pxd
@@ -30,262 +30,262 @@ from .PyXMLDocument cimport XMLNode
 include "config.pxi"
 
 cdef extern from "astra/Globals.h" namespace "astra":
-	ctypedef float float32
-	ctypedef double float64
-	ctypedef unsigned short int uint16
-	ctypedef signed short int sint16
-	ctypedef unsigned char uchar8
-	ctypedef signed char schar8
-	ctypedef int int32
-	ctypedef short int int16
+    ctypedef float float32
+    ctypedef double float64
+    ctypedef unsigned short int uint16
+    ctypedef signed short int sint16
+    ctypedef unsigned char uchar8
+    ctypedef signed char schar8
+    ctypedef int int32
+    ctypedef short int int16
 
 cdef extern from "astra/Config.h" namespace "astra":
-	cdef cppclass Config:
-		Config()
-		void initialize(string rootname)
-		XMLNode self
+    cdef cppclass Config:
+        Config()
+        void initialize(string rootname)
+        XMLNode self
 
 cdef extern from "astra/VolumeGeometry2D.h" namespace "astra":
-	cdef cppclass CVolumeGeometry2D:
-		bool initialize(Config)
-		int getGridColCount()
-		int getGridRowCount()
-		int getGridTotCount()
-		float32 getWindowLengthX()
-		float32 getWindowLengthY()
-		float32 getWindowArea()
-		float32 getPixelLengthX()
-		float32 getPixelLengthY()
-		float32 getPixelArea()
-		float32 getWindowMinX()
-		float32 getWindowMinY()
-		float32 getWindowMaxX()
-		float32 getWindowMaxY()
-		Config* getConfiguration()
-		bool isEqual(CVolumeGeometry2D*)
+    cdef cppclass CVolumeGeometry2D:
+        bool initialize(Config)
+        int getGridColCount()
+        int getGridRowCount()
+        int getGridTotCount()
+        float32 getWindowLengthX()
+        float32 getWindowLengthY()
+        float32 getWindowArea()
+        float32 getPixelLengthX()
+        float32 getPixelLengthY()
+        float32 getPixelArea()
+        float32 getWindowMinX()
+        float32 getWindowMinY()
+        float32 getWindowMaxX()
+        float32 getWindowMaxY()
+        Config* getConfiguration()
+        bool isEqual(CVolumeGeometry2D*)
 
 cdef extern from "astra/Float32Data2D.h" namespace "astra":
-	cdef cppclass CFloat32CustomMemory:
-		pass
+    cdef cppclass CFloat32CustomMemory:
+        pass
 
 cdef extern from "astra/Float32VolumeData2D.h" namespace "astra":
-	cdef cppclass CFloat32VolumeData2D:
-		CFloat32VolumeData2D(CVolumeGeometry2D*)
-		CFloat32VolumeData2D(CVolumeGeometry2D*, CFloat32CustomMemory*)
-		CVolumeGeometry2D * getGeometry()
-		int getWidth()
-		int getHeight()
-		void changeGeometry(CVolumeGeometry2D*)
-		Config* getConfiguration()
+    cdef cppclass CFloat32VolumeData2D:
+        CFloat32VolumeData2D(CVolumeGeometry2D*)
+        CFloat32VolumeData2D(CVolumeGeometry2D*, CFloat32CustomMemory*)
+        CVolumeGeometry2D * getGeometry()
+        int getWidth()
+        int getHeight()
+        void changeGeometry(CVolumeGeometry2D*)
+        Config* getConfiguration()
 
 
 
 cdef extern from "astra/ProjectionGeometry2D.h" namespace "astra":
-	cdef cppclass CProjectionGeometry2D:
-		CProjectionGeometry2D()
-		bool initialize(Config)
-		int getDetectorCount()
-		int getProjectionAngleCount()
-		bool isOfType(string)
-		float32 getProjectionAngle(int)
-		float32 getDetectorWidth()
-		Config* getConfiguration()
-		bool isEqual(CProjectionGeometry2D*)
+    cdef cppclass CProjectionGeometry2D:
+        CProjectionGeometry2D()
+        bool initialize(Config)
+        int getDetectorCount()
+        int getProjectionAngleCount()
+        bool isOfType(string)
+        float32 getProjectionAngle(int)
+        float32 getDetectorWidth()
+        Config* getConfiguration()
+        bool isEqual(CProjectionGeometry2D*)
 
 cdef extern from "astra/Float32Data2D.h" namespace "astra::CFloat32Data2D":
-	cdef enum TWOEDataType "astra::CFloat32Data2D::EDataType":
-		TWOPROJECTION "astra::CFloat32Data2D::PROJECTION"
-		TWOVOLUME "astra::CFloat32Data2D::VOLUME"
+    cdef enum TWOEDataType "astra::CFloat32Data2D::EDataType":
+        TWOPROJECTION "astra::CFloat32Data2D::PROJECTION"
+        TWOVOLUME "astra::CFloat32Data2D::VOLUME"
 
 cdef extern from "astra/Float32Data3D.h" namespace "astra::CFloat32Data3D":
-	cdef enum THREEEDataType "astra::CFloat32Data3D::EDataType":
-		THREEPROJECTION "astra::CFloat32Data3D::PROJECTION"
-		THREEVOLUME "astra::CFloat32Data3D::VOLUME"
+    cdef enum THREEEDataType "astra::CFloat32Data3D::EDataType":
+        THREEPROJECTION "astra::CFloat32Data3D::PROJECTION"
+        THREEVOLUME "astra::CFloat32Data3D::VOLUME"
 
 
 cdef extern from "astra/Float32Data2D.h" namespace "astra":
-	cdef cppclass CFloat32Data2D:
-		bool isInitialized()
-		int getSize()
-		float32 *getData()
-		float32 **getData2D()
-		int getWidth()
-		int getHeight()
-		TWOEDataType getType()
+    cdef cppclass CFloat32Data2D:
+        bool isInitialized()
+        int getSize()
+        float32 *getData()
+        float32 **getData2D()
+        int getWidth()
+        int getHeight()
+        TWOEDataType getType()
 
 
 
 
 cdef extern from "astra/SparseMatrixProjectionGeometry2D.h" namespace "astra":
-	cdef cppclass CSparseMatrixProjectionGeometry2D:
-		CSparseMatrixProjectionGeometry2D()
+    cdef cppclass CSparseMatrixProjectionGeometry2D:
+        CSparseMatrixProjectionGeometry2D()
 
 cdef extern from "astra/FanFlatProjectionGeometry2D.h" namespace "astra":
-	cdef cppclass CFanFlatProjectionGeometry2D:
-		CFanFlatProjectionGeometry2D()
+    cdef cppclass CFanFlatProjectionGeometry2D:
+        CFanFlatProjectionGeometry2D()
 
 cdef extern from "astra/FanFlatVecProjectionGeometry2D.h" namespace "astra":
-	cdef cppclass CFanFlatVecProjectionGeometry2D:
-		CFanFlatVecProjectionGeometry2D()
+    cdef cppclass CFanFlatVecProjectionGeometry2D:
+        CFanFlatVecProjectionGeometry2D()
 
 cdef extern from "astra/ParallelProjectionGeometry2D.h" namespace "astra":
-	cdef cppclass CParallelProjectionGeometry2D:
-		CParallelProjectionGeometry2D()
+    cdef cppclass CParallelProjectionGeometry2D:
+        CParallelProjectionGeometry2D()
 
 
 cdef extern from "astra/Float32ProjectionData2D.h" namespace "astra":
-	cdef cppclass CFloat32ProjectionData2D:
-		CFloat32ProjectionData2D(CProjectionGeometry2D*)
-		CFloat32ProjectionData2D(CProjectionGeometry2D*, CFloat32CustomMemory*)
-		CProjectionGeometry2D * getGeometry()
-		void changeGeometry(CProjectionGeometry2D*)
-		int getDetectorCount()
-		int getAngleCount()
+    cdef cppclass CFloat32ProjectionData2D:
+        CFloat32ProjectionData2D(CProjectionGeometry2D*)
+        CFloat32ProjectionData2D(CProjectionGeometry2D*, CFloat32CustomMemory*)
+        CProjectionGeometry2D * getGeometry()
+        void changeGeometry(CProjectionGeometry2D*)
+        int getDetectorCount()
+        int getAngleCount()
 
 cdef extern from "astra/Algorithm.h" namespace "astra":
-	cdef cppclass CAlgorithm:
-		bool initialize(Config)
-		void run(int) nogil
-		bool isInitialized()
+    cdef cppclass CAlgorithm:
+        bool initialize(Config)
+        void run(int) nogil
+        bool isInitialized()
 
 cdef extern from "astra/ReconstructionAlgorithm2D.h" namespace "astra":
-	cdef cppclass CReconstructionAlgorithm2D:
-		bool getResidualNorm(float32&)
+    cdef cppclass CReconstructionAlgorithm2D:
+        bool getResidualNorm(float32&)
 
 cdef extern from "astra/Projector2D.h" namespace "astra":
-	cdef cppclass CProjector2D:
-		bool isInitialized()
-		CProjectionGeometry2D* getProjectionGeometry()
-		CVolumeGeometry2D* getVolumeGeometry()
-		CSparseMatrix* getMatrix()
+    cdef cppclass CProjector2D:
+        bool isInitialized()
+        CProjectionGeometry2D* getProjectionGeometry()
+        CVolumeGeometry2D* getVolumeGeometry()
+        CSparseMatrix* getMatrix()
 
 cdef extern from "astra/Projector3D.h" namespace "astra":
-	cdef cppclass CProjector3D:
-		bool isInitialized()
-		CProjectionGeometry3D* getProjectionGeometry()
-		CVolumeGeometry3D* getVolumeGeometry()
+    cdef cppclass CProjector3D:
+        bool isInitialized()
+        CProjectionGeometry3D* getProjectionGeometry()
+        CVolumeGeometry3D* getVolumeGeometry()
 
 IF HAVE_CUDA==True:
-	cdef extern from "astra/CudaProjector3D.h" namespace "astra":
-		cdef cppclass CCudaProjector3D
+    cdef extern from "astra/CudaProjector3D.h" namespace "astra":
+        cdef cppclass CCudaProjector3D
 
-	cdef extern from "astra/CudaProjector2D.h" namespace "astra":
-		cdef cppclass CCudaProjector2D
+    cdef extern from "astra/CudaProjector2D.h" namespace "astra":
+        cdef cppclass CCudaProjector2D
 
-	cdef extern from "astra/Float32Data3DGPU.h" namespace "astraCUDA3d":
-		cdef cppclass MemHandle3D:
-			pass
+    cdef extern from "astra/Float32Data3DGPU.h" namespace "astraCUDA3d":
+        cdef cppclass MemHandle3D:
+            pass
 
-	cdef extern from "astra/Float32Data3DGPU.h" namespace "astraCUDA3d":
-		cdef MemHandle3D wrapHandle(float *D_ptr, unsigned int x, unsigned int y, unsigned int z, unsigned int pitch)
+    cdef extern from "astra/Float32Data3DGPU.h" namespace "astraCUDA3d":
+        cdef MemHandle3D wrapHandle(float *D_ptr, unsigned int x, unsigned int y, unsigned int z, unsigned int pitch)
 
 
 cdef extern from "astra/SparseMatrix.h" namespace "astra":
-	cdef cppclass CSparseMatrix:
-		CSparseMatrix(unsigned int,unsigned int,unsigned long)
-		unsigned int m_iWidth
-		unsigned int m_iHeight
-		unsigned long m_lSize
-		bool isInitialized()
-		float32* m_pfValues
-		unsigned int* m_piColIndices
-		unsigned long* m_plRowStarts
+    cdef cppclass CSparseMatrix:
+        CSparseMatrix(unsigned int,unsigned int,unsigned long)
+        unsigned int m_iWidth
+        unsigned int m_iHeight
+        unsigned long m_lSize
+        bool isInitialized()
+        float32* m_pfValues
+        unsigned int* m_piColIndices
+        unsigned long* m_plRowStarts
 
 cdef extern from "astra/Float32Data3D.h" namespace "astra":
-	cdef cppclass CFloat32Data3D:
-		bool isInitialized()
-		int getSize()
-		int getWidth()
-		int getHeight()
-		int getDepth()
+    cdef cppclass CFloat32Data3D:
+        bool isInitialized()
+        int getSize()
+        int getWidth()
+        int getHeight()
+        int getDepth()
 
 
 cdef extern from "astra/Float32Data3DMemory.h" namespace "astra":
-	cdef cppclass CFloat32Data3DMemory(CFloat32Data3D):
-		CFloat32Data3DMemory()
-		void updateStatistics()
-		float32 *getData()
-		float32 ***getData3D()
-		THREEEDataType getType()
+    cdef cppclass CFloat32Data3DMemory(CFloat32Data3D):
+        CFloat32Data3DMemory()
+        void updateStatistics()
+        float32 *getData()
+        float32 ***getData3D()
+        THREEEDataType getType()
 
 
 cdef extern from "astra/VolumeGeometry3D.h" namespace "astra":
-	cdef cppclass CVolumeGeometry3D:
-		CVolumeGeometry3D()
-		bool initialize(Config)
-		Config * getConfiguration()
-		int getGridColCount()
-		int getGridRowCount()
-		int getGridSliceCount()
+    cdef cppclass CVolumeGeometry3D:
+        CVolumeGeometry3D()
+        bool initialize(Config)
+        Config * getConfiguration()
+        int getGridColCount()
+        int getGridRowCount()
+        int getGridSliceCount()
 
 cdef extern from "astra/ProjectionGeometry3D.h" namespace "astra":
-	cdef cppclass CProjectionGeometry3D:
-		CProjectionGeometry3D()
-		bool initialize(Config)
-		Config * getConfiguration()
-		int getProjectionCount()
-		int getDetectorColCount()
-		int getDetectorRowCount()
+    cdef cppclass CProjectionGeometry3D:
+        CProjectionGeometry3D()
+        bool initialize(Config)
+        Config * getConfiguration()
+        int getProjectionCount()
+        int getDetectorColCount()
+        int getDetectorRowCount()
 
 
 cdef extern from "astra/Float32VolumeData3DMemory.h" namespace "astra":
-	cdef cppclass CFloat32VolumeData3DMemory:
-		CFloat32VolumeData3DMemory(CVolumeGeometry3D*)
-		CFloat32VolumeData3DMemory(CVolumeGeometry3D*, CFloat32CustomMemory*)
-		CVolumeGeometry3D* getGeometry()
-		void changeGeometry(CVolumeGeometry3D*)
-		int getRowCount()
-		int getColCount()
-		int getSliceCount()
-		bool isInitialized()
+    cdef cppclass CFloat32VolumeData3DMemory:
+        CFloat32VolumeData3DMemory(CVolumeGeometry3D*)
+        CFloat32VolumeData3DMemory(CVolumeGeometry3D*, CFloat32CustomMemory*)
+        CVolumeGeometry3D* getGeometry()
+        void changeGeometry(CVolumeGeometry3D*)
+        int getRowCount()
+        int getColCount()
+        int getSliceCount()
+        bool isInitialized()
 
 cdef extern from "astra/ParallelProjectionGeometry3D.h" namespace "astra":
-	cdef cppclass CParallelProjectionGeometry3D:
-		CParallelProjectionGeometry3D()
+    cdef cppclass CParallelProjectionGeometry3D:
+        CParallelProjectionGeometry3D()
 
 cdef extern from "astra/ParallelVecProjectionGeometry3D.h" namespace "astra":
-	cdef cppclass CParallelVecProjectionGeometry3D:
-		CParallelVecProjectionGeometry3D()
+    cdef cppclass CParallelVecProjectionGeometry3D:
+        CParallelVecProjectionGeometry3D()
 
 cdef extern from "astra/ConeProjectionGeometry3D.h" namespace "astra":
-	cdef cppclass CConeProjectionGeometry3D:
-		CConeProjectionGeometry3D()
-		bool initialize(Config)
+    cdef cppclass CConeProjectionGeometry3D:
+        CConeProjectionGeometry3D()
+        bool initialize(Config)
 
 cdef extern from "astra/ConeVecProjectionGeometry3D.h" namespace "astra":
-	cdef cppclass CConeVecProjectionGeometry3D:
-		CConeVecProjectionGeometry3D()
+    cdef cppclass CConeVecProjectionGeometry3D:
+        CConeVecProjectionGeometry3D()
 
 cdef extern from "astra/Float32ProjectionData3DMemory.h" namespace "astra":
-	cdef cppclass CFloat32ProjectionData3DMemory:
-		CFloat32ProjectionData3DMemory(CProjectionGeometry3D*)
-		CFloat32ProjectionData3DMemory(CConeProjectionGeometry3D*)
-		CFloat32ProjectionData3DMemory(CProjectionGeometry3D*, CFloat32CustomMemory*)
-		CFloat32ProjectionData3DMemory(CConeProjectionGeometry3D*, CFloat32CustomMemory*)
-		CProjectionGeometry3D* getGeometry()
-		void changeGeometry(CProjectionGeometry3D*)
-		int getDetectorColCount()
-		int getDetectorRowCount()
-		int getAngleCount()
-		bool isInitialized()
+    cdef cppclass CFloat32ProjectionData3DMemory:
+        CFloat32ProjectionData3DMemory(CProjectionGeometry3D*)
+        CFloat32ProjectionData3DMemory(CConeProjectionGeometry3D*)
+        CFloat32ProjectionData3DMemory(CProjectionGeometry3D*, CFloat32CustomMemory*)
+        CFloat32ProjectionData3DMemory(CConeProjectionGeometry3D*, CFloat32CustomMemory*)
+        CProjectionGeometry3D* getGeometry()
+        void changeGeometry(CProjectionGeometry3D*)
+        int getDetectorColCount()
+        int getDetectorRowCount()
+        int getAngleCount()
+        bool isInitialized()
 
 IF HAVE_CUDA==True:
-	cdef extern from "astra/Float32VolumeData3DGPU.h" namespace "astra":
-		cdef cppclass CFloat32VolumeData3DGPU:
-			CFloat32VolumeData3DGPU(CVolumeGeometry3D*, MemHandle3D)
-			CVolumeGeometry3D* getGeometry()
-			void changeGeometry(CVolumeGeometry3D*)
-			int getRowCount()
-			int getColCount()
-			int getSliceCount()
-			bool isInitialized()
-
-	cdef extern from "astra/Float32ProjectionData3DGPU.h" namespace "astra":
-		cdef cppclass CFloat32ProjectionData3DGPU:
-			CFloat32ProjectionData3DGPU(CProjectionGeometry3D*, MemHandle3D)
-			CProjectionGeometry3D* getGeometry()
-			void changeGeometry(CProjectionGeometry3D*)
-			int getRowCount()
-			int getColCount()
-			int getSliceCount()
-			bool isInitialized()
+    cdef extern from "astra/Float32VolumeData3DGPU.h" namespace "astra":
+        cdef cppclass CFloat32VolumeData3DGPU:
+            CFloat32VolumeData3DGPU(CVolumeGeometry3D*, MemHandle3D)
+            CVolumeGeometry3D* getGeometry()
+            void changeGeometry(CVolumeGeometry3D*)
+            int getRowCount()
+            int getColCount()
+            int getSliceCount()
+            bool isInitialized()
+
+    cdef extern from "astra/Float32ProjectionData3DGPU.h" namespace "astra":
+        cdef cppclass CFloat32ProjectionData3DGPU:
+            CFloat32ProjectionData3DGPU(CProjectionGeometry3D*, MemHandle3D)
+            CProjectionGeometry3D* getGeometry()
+            void changeGeometry(CProjectionGeometry3D*)
+            int getRowCount()
+            int getColCount()
+            int getSliceCount()
+            bool isInitialized()
diff --git a/python/astra/creators.py b/python/astra/creators.py
index f45fd52..aa16221 100644
--- a/python/astra/creators.py
+++ b/python/astra/creators.py
@@ -258,7 +258,7 @@ This method can be called in a number of ways:
     elif intype == 'cone':
         if len(args) < 7:
             raise Exception('not enough variables: astra_create_proj_geom(cone, detector_spacing_x, detector_spacing_y, det_row_count, det_col_count, angles, source_origin, origin_det)')
-        return {'type':	'cone','DetectorSpacingX':args[0], 'DetectorSpacingY':args[1], 'DetectorRowCount':args[2],'DetectorColCount':args[3],'ProjectionAngles':args[4],'DistanceOriginSource':	args[5],'DistanceOriginDetector':args[6]}
+        return {'type': 'cone','DetectorSpacingX':args[0], 'DetectorSpacingY':args[1], 'DetectorRowCount':args[2],'DetectorColCount':args[3],'ProjectionAngles':args[4],'DistanceOriginSource': args[5],'DistanceOriginDetector':args[6]}
     elif intype == 'cone_vec':
         if len(args) < 3:
             raise Exception('not enough variables: astra_create_proj_geom(cone_vec, det_row_count, det_col_count, V)')
diff --git a/python/astra/extrautils.pyx b/python/astra/extrautils.pyx
index 502cc78..248c6ee 100644
--- a/python/astra/extrautils.pyx
+++ b/python/astra/extrautils.pyx
@@ -26,19 +26,19 @@
 
 
 def clipCircle(img):
-	cdef int i,j
-	cdef double x2,y2,mid,bnd
-	cdef long sz,sz2
-	sz = img.shape[0]
-	sz2 = sz*sz
-	bnd = sz2/4.
-	mid = (sz-1.)/2.
-	nDel=0
-	for i in range(sz):
-		for j in range(sz):
-			x2 = (i-mid)*(i-mid)
-			y2 = (j-mid)*(j-mid)
-			if x2+y2>bnd:
-				img[i,j]=0
-				nDel=nDel+1
-	return nDel
+    cdef int i,j
+    cdef double x2,y2,mid,bnd
+    cdef long sz,sz2
+    sz = img.shape[0]
+    sz2 = sz*sz
+    bnd = sz2/4.
+    mid = (sz-1.)/2.
+    nDel=0
+    for i in range(sz):
+        for j in range(sz):
+            x2 = (i-mid)*(i-mid)
+            y2 = (j-mid)*(j-mid)
+            if x2+y2>bnd:
+                img[i,j]=0
+                nDel=nDel+1
+    return nDel
-- 
cgit v1.2.3


From ef26db6ab96e050acf808029a23184bfcb860237 Mon Sep 17 00:00:00 2001
From: Willem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl>
Date: Fri, 24 Feb 2017 12:15:05 +0100
Subject: Add np112 to conda build script

---
 python/conda/linux_release/builder/Dockerfile | 3 +++
 1 file changed, 3 insertions(+)

(limited to 'python')

diff --git a/python/conda/linux_release/builder/Dockerfile b/python/conda/linux_release/builder/Dockerfile
index 208e3ad..8be05b8 100644
--- a/python/conda/linux_release/builder/Dockerfile
+++ b/python/conda/linux_release/builder/Dockerfile
@@ -8,7 +8,10 @@ RUN conda-build --python 2.7 --numpy 1.8 astra-toolbox/python/conda
 RUN conda-build --python 2.7 --numpy 1.9 astra-toolbox/python/conda
 RUN conda-build --python 2.7 --numpy 1.10 astra-toolbox/python/conda
 RUN conda-build --python 2.7 --numpy 1.11 astra-toolbox/python/conda
+RUN conda-build --python 2.7 --numpy 1.12 astra-toolbox/python/conda
 RUN conda-build --python 3.5 --numpy 1.9 astra-toolbox/python/conda
 RUN conda-build --python 3.5 --numpy 1.10 astra-toolbox/python/conda
 RUN conda-build --python 3.5 --numpy 1.11 astra-toolbox/python/conda
+RUN conda-build --python 3.5 --numpy 1.12 astra-toolbox/python/conda
 RUN conda-build --python 3.6 --numpy 1.11 astra-toolbox/python/conda
+RUN conda-build --python 3.6 --numpy 1.12 astra-toolbox/python/conda
-- 
cgit v1.2.3


From 4d0d9ca396378813f8559f479ff9a64b0881a627 Mon Sep 17 00:00:00 2001
From: Willem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl>
Date: Wed, 1 Mar 2017 21:26:08 +0100
Subject: Fix python build

---
 python/astra/algorithm_c.pyx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'python')

diff --git a/python/astra/algorithm_c.pyx b/python/astra/algorithm_c.pyx
index 84d742d..0a48de8 100644
--- a/python/astra/algorithm_c.pyx
+++ b/python/astra/algorithm_c.pyx
@@ -44,7 +44,7 @@ from .utils import wrap_from_bytes
 cdef CAlgorithmManager * manAlg = <CAlgorithmManager * >PyAlgorithmManager.getSingletonPtr()
 
 cdef extern from *:
-    CReconstructionAlgorithm2D * dynamic_cast_recAlg "dynamic_cast<CReconstructionAlgorithm2D*>" (CAlgorithm * ) except NULL
+    CReconstructionAlgorithm2D * dynamic_cast_recAlg "dynamic_cast<astra::CReconstructionAlgorithm2D*>" (CAlgorithm * ) except NULL
 
 
 def create(config):
-- 
cgit v1.2.3


From f0888d0cb90e3eef2cb31a4e1b183876a0bc3f42 Mon Sep 17 00:00:00 2001
From: Willem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl>
Date: Mon, 23 Jan 2017 12:01:24 +0100
Subject: Use true instead of /bin/true

It's in /usr/bin/ on macOS.
---
 python/conda/libastra/build.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'python')

diff --git a/python/conda/libastra/build.sh b/python/conda/libastra/build.sh
index 5807697..46736c4 100644
--- a/python/conda/libastra/build.sh
+++ b/python/conda/libastra/build.sh
@@ -7,7 +7,7 @@ $SRC_DIR/build/linux/autogen.sh
 # Add C++11 to compiler flags if nvcc supports it, mostly to work around a boost bug
 NVCC=$CUDA_ROOT/bin/nvcc
 echo "int main(){return 0;}" > $CONDA_PREFIX/test.cu
-$NVCC $CONDA_PREFIX/test.cu -ccbin $CC --std=c++11 -o $CONDA_PREFIX/test.out > /dev/null && EXTRA_NVCCFLAGS="--std=c++11" || /bin/true
+$NVCC $CONDA_PREFIX/test.cu -ccbin $CC --std=c++11 -o $CONDA_PREFIX/test.out > /dev/null && EXTRA_NVCCFLAGS="--std=c++11" || true
 rm -f $CONDA_PREFIX/test.out
 
 $SRC_DIR/build/linux/configure --with-install-type=prefix --with-cuda=$CUDA_ROOT --prefix=$CONDA_PREFIX NVCCFLAGS="-ccbin $CC $EXTRA_NVCCFLAGS" CC=$CC CXX=$CXX CFLAGS="-I$CONDA_PREFIX/include/boost" CXXFLAGS="-I$CONDA_PREFIX/include/boost"
-- 
cgit v1.2.3


From 4203c3132484cc669bd6f92d180c0623f85f569e Mon Sep 17 00:00:00 2001
From: Willem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl>
Date: Mon, 23 Jan 2017 12:10:38 +0100
Subject: Fix conda boost include flags

---
 python/conda/libastra/build.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'python')

diff --git a/python/conda/libastra/build.sh b/python/conda/libastra/build.sh
index 46736c4..36c3eba 100644
--- a/python/conda/libastra/build.sh
+++ b/python/conda/libastra/build.sh
@@ -10,7 +10,7 @@ echo "int main(){return 0;}" > $CONDA_PREFIX/test.cu
 $NVCC $CONDA_PREFIX/test.cu -ccbin $CC --std=c++11 -o $CONDA_PREFIX/test.out > /dev/null && EXTRA_NVCCFLAGS="--std=c++11" || true
 rm -f $CONDA_PREFIX/test.out
 
-$SRC_DIR/build/linux/configure --with-install-type=prefix --with-cuda=$CUDA_ROOT --prefix=$CONDA_PREFIX NVCCFLAGS="-ccbin $CC $EXTRA_NVCCFLAGS" CC=$CC CXX=$CXX CFLAGS="-I$CONDA_PREFIX/include/boost" CXXFLAGS="-I$CONDA_PREFIX/include/boost"
+$SRC_DIR/build/linux/configure --with-install-type=prefix --with-cuda=$CUDA_ROOT --prefix=$CONDA_PREFIX NVCCFLAGS="-ccbin $CC -I$CONDA_PREFIX/include $EXTRA_NVCCFLAGS" CC=$CC CXX=$CXX CPPFLAGS="-I$CONDA_PREFIX/include"
 
 make install-libraries
 
-- 
cgit v1.2.3


From 0f6c2fdc899b19000c3fcfa3f4e2129dd16a44ce Mon Sep 17 00:00:00 2001
From: Willem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl>
Date: Mon, 23 Jan 2017 12:32:10 +0100
Subject: Change lib/lib64 logic

macOS CUDA uses lib even on 64 bit
---
 python/conda/libastra/build.sh | 19 ++++++++++++-------
 1 file changed, 12 insertions(+), 7 deletions(-)

(limited to 'python')

diff --git a/python/conda/libastra/build.sh b/python/conda/libastra/build.sh
index 36c3eba..50d2ae5 100644
--- a/python/conda/libastra/build.sh
+++ b/python/conda/libastra/build.sh
@@ -14,10 +14,15 @@ $SRC_DIR/build/linux/configure --with-install-type=prefix --with-cuda=$CUDA_ROOT
 
 make install-libraries
 
-LIBPATH=lib
-if [ $ARCH == 64 ]
-  then
-    LIBPATH+=64
-fi
-cp -P $CUDA_ROOT/$LIBPATH/libcudart.so.* $CONDA_PREFIX/lib
-cp -P $CUDA_ROOT/$LIBPATH/libcufft.so.* $CONDA_PREFIX/lib
+
+test -d $CUDA_ROOT/lib64 && LIBPATH="$CUDA_ROOT/lib64" || LIBPATH="$CUDA_ROOT/lib"
+
+case `uname` in
+  Darwin*)
+    cp -P $LIBPATH/libcudart.*.dylib $CONDA_PREFIX/lib
+    cp -P $LIBPATH/libcufft.*.dylib $CONDA_PREFIX/lib
+  *)
+    cp -P $LIBPATH/libcudart.so.* $CONDA_PREFIX/lib
+    cp -P $LIBPATH/libcufft.so.* $CONDA_PREFIX/lib
+    ;;
+esac
-- 
cgit v1.2.3


From 76bd01e47e4fc76b16d65d9cfc0216347951c518 Mon Sep 17 00:00:00 2001
From: Willem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl>
Date: Mon, 23 Jan 2017 14:13:22 +0100
Subject: Silence errors from nvcc test run

---
 python/conda/libastra/build.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'python')

diff --git a/python/conda/libastra/build.sh b/python/conda/libastra/build.sh
index 50d2ae5..98220f5 100644
--- a/python/conda/libastra/build.sh
+++ b/python/conda/libastra/build.sh
@@ -7,7 +7,7 @@ $SRC_DIR/build/linux/autogen.sh
 # Add C++11 to compiler flags if nvcc supports it, mostly to work around a boost bug
 NVCC=$CUDA_ROOT/bin/nvcc
 echo "int main(){return 0;}" > $CONDA_PREFIX/test.cu
-$NVCC $CONDA_PREFIX/test.cu -ccbin $CC --std=c++11 -o $CONDA_PREFIX/test.out > /dev/null && EXTRA_NVCCFLAGS="--std=c++11" || true
+$NVCC $CONDA_PREFIX/test.cu -ccbin $CC --std=c++11 -o $CONDA_PREFIX/test.out > /dev/null 2>&1 && EXTRA_NVCCFLAGS="--std=c++11" || true
 rm -f $CONDA_PREFIX/test.out
 
 $SRC_DIR/build/linux/configure --with-install-type=prefix --with-cuda=$CUDA_ROOT --prefix=$CONDA_PREFIX NVCCFLAGS="-ccbin $CC -I$CONDA_PREFIX/include $EXTRA_NVCCFLAGS" CC=$CC CXX=$CXX CPPFLAGS="-I$CONDA_PREFIX/include"
-- 
cgit v1.2.3


From d70274581443afd30d8347dae737c419142c88da Mon Sep 17 00:00:00 2001
From: Willem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl>
Date: Mon, 23 Jan 2017 14:13:53 +0100
Subject: Add autotools and boost to macOS conda libastra dependencies

---
 python/conda/libastra/meta.yaml | 4 ++++
 1 file changed, 4 insertions(+)

(limited to 'python')

diff --git a/python/conda/libastra/meta.yaml b/python/conda/libastra/meta.yaml
index c05a466..68cf47a 100644
--- a/python/conda/libastra/meta.yaml
+++ b/python/conda/libastra/meta.yaml
@@ -16,6 +16,10 @@ build:
 requirements:
   build:
     - vs2015_runtime # [win]
+    - boost # [osx]
+    - automake # [osx]
+    - autoconf # [osx]
+    - libtool # [osx]
 
   run:
     - vs2015_runtime # [win]
-- 
cgit v1.2.3


From 9f3f78472f7be84694baef8e67fec382febce639 Mon Sep 17 00:00:00 2001
From: Willem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl>
Date: Tue, 24 Jan 2017 16:44:18 +0100
Subject: Move conda astra-toolbox package files to own subdirectory

Recent versions of conda-build (2.1.1 at least) seem to automatically build
packages in subdirectories (after the main directory).
---
 python/conda/astra-toolbox/bld.bat            | 33 ++++++++++++++++++
 python/conda/astra-toolbox/build.sh           |  4 +++
 python/conda/astra-toolbox/meta.yaml          | 48 +++++++++++++++++++++++++++
 python/conda/bld.bat                          | 33 ------------------
 python/conda/build.sh                         |  4 ---
 python/conda/linux_release/builder/Dockerfile | 24 +++++++-------
 python/conda/meta.yaml                        | 48 ---------------------------
 7 files changed, 97 insertions(+), 97 deletions(-)
 create mode 100644 python/conda/astra-toolbox/bld.bat
 create mode 100644 python/conda/astra-toolbox/build.sh
 create mode 100644 python/conda/astra-toolbox/meta.yaml
 delete mode 100644 python/conda/bld.bat
 delete mode 100644 python/conda/build.sh
 delete mode 100644 python/conda/meta.yaml

(limited to 'python')

diff --git a/python/conda/astra-toolbox/bld.bat b/python/conda/astra-toolbox/bld.bat
new file mode 100644
index 0000000..15777ce
--- /dev/null
+++ b/python/conda/astra-toolbox/bld.bat
@@ -0,0 +1,33 @@
+@echo off
+
+set R=%SRC_DIR%
+
+set B_VC=C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64
+call "%B_VC%\vcvars64.bat"
+
+set B_BV=1_62
+set B_BOOST=D:\wjp\boost_%B_BV%_0
+
+cd /D "%B_BOOST%\lib64-msvc-14.0"
+
+mkdir "%R%\lib\x64"
+mkdir "%R%\bin\x64\Release_CUDA"
+
+copy boost_unit_test_framework-vc140-mt-%B_BV%.lib %R%\lib\x64
+copy libboost_chrono-vc140-mt-%B_BV%.lib %R%\lib\x64
+copy libboost_date_time-vc140-mt-%B_BV%.lib %R%\lib\x64
+copy libboost_system-vc140-mt-%B_BV%.lib %R%\lib\x64
+copy libboost_thread-vc140-mt-%B_BV%.lib %R%\lib\x64
+
+cd %B_BOOST%
+
+xcopy /i /e /q boost "%R%\lib\include\boost"
+
+cd /D %R%
+
+cd python
+
+set VS90COMNTOOLS=%VS140COMNTOOLS%
+set CL=/DASTRA_CUDA /DASTRA_PYTHON "/I%R%\include" "/I%R%\lib\include" "/I%CUDA_PATH%\include"
+copy "%CONDA_PREFIX%\Library\lib\AstraCuda64.lib" astra.lib
+python builder.py build_ext --compiler=msvc install
diff --git a/python/conda/astra-toolbox/build.sh b/python/conda/astra-toolbox/build.sh
new file mode 100644
index 0000000..951fd88
--- /dev/null
+++ b/python/conda/astra-toolbox/build.sh
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+cd $SRC_DIR/python/
+CPPFLAGS="-DASTRA_CUDA -DASTRA_PYTHON $CPPFLAGS -I$SRC_DIR/ -I$SRC_DIR/include -I$CUDA_ROOT/include" CC=$CC python ./builder.py build install
diff --git a/python/conda/astra-toolbox/meta.yaml b/python/conda/astra-toolbox/meta.yaml
new file mode 100644
index 0000000..942397e
--- /dev/null
+++ b/python/conda/astra-toolbox/meta.yaml
@@ -0,0 +1,48 @@
+package:
+  name: astra-toolbox
+  version: '1.8'
+
+source:
+  git_url: https://github.com/astra-toolbox/astra-toolbox.git
+  git_tag: v1.8
+
+build:
+  number: 0
+  script_env:
+    - CC # [not win]
+    - CUDA_ROOT # [not win]
+
+test:
+  imports:
+    - astra
+
+  requires:
+    # To avoid large downloads just for testing after build phase
+    - nomkl # [not win]
+
+requirements:
+  build:
+    - python
+    - cython >=0.13
+    - nomkl # [not win]
+    - numpy
+    - scipy
+    - six
+    - libastra ==1.8
+
+  run:
+    - python
+    - numpy x.x
+    - scipy
+    - six
+    - libastra ==1.8
+
+
+about:
+  home: http://www.astra-toolbox.com
+  license: GPLv3
+  summary: 'The ASTRA Toolbox is a Python toolbox of high-performance GPU primitives for 2D and 3D tomography.'
+
+# See
+# http://docs.continuum.io/conda/build.html for
+# more information about meta.yaml
diff --git a/python/conda/bld.bat b/python/conda/bld.bat
deleted file mode 100644
index 15777ce..0000000
--- a/python/conda/bld.bat
+++ /dev/null
@@ -1,33 +0,0 @@
-@echo off
-
-set R=%SRC_DIR%
-
-set B_VC=C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64
-call "%B_VC%\vcvars64.bat"
-
-set B_BV=1_62
-set B_BOOST=D:\wjp\boost_%B_BV%_0
-
-cd /D "%B_BOOST%\lib64-msvc-14.0"
-
-mkdir "%R%\lib\x64"
-mkdir "%R%\bin\x64\Release_CUDA"
-
-copy boost_unit_test_framework-vc140-mt-%B_BV%.lib %R%\lib\x64
-copy libboost_chrono-vc140-mt-%B_BV%.lib %R%\lib\x64
-copy libboost_date_time-vc140-mt-%B_BV%.lib %R%\lib\x64
-copy libboost_system-vc140-mt-%B_BV%.lib %R%\lib\x64
-copy libboost_thread-vc140-mt-%B_BV%.lib %R%\lib\x64
-
-cd %B_BOOST%
-
-xcopy /i /e /q boost "%R%\lib\include\boost"
-
-cd /D %R%
-
-cd python
-
-set VS90COMNTOOLS=%VS140COMNTOOLS%
-set CL=/DASTRA_CUDA /DASTRA_PYTHON "/I%R%\include" "/I%R%\lib\include" "/I%CUDA_PATH%\include"
-copy "%CONDA_PREFIX%\Library\lib\AstraCuda64.lib" astra.lib
-python builder.py build_ext --compiler=msvc install
diff --git a/python/conda/build.sh b/python/conda/build.sh
deleted file mode 100644
index 951fd88..0000000
--- a/python/conda/build.sh
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/sh
-
-cd $SRC_DIR/python/
-CPPFLAGS="-DASTRA_CUDA -DASTRA_PYTHON $CPPFLAGS -I$SRC_DIR/ -I$SRC_DIR/include -I$CUDA_ROOT/include" CC=$CC python ./builder.py build install
diff --git a/python/conda/linux_release/builder/Dockerfile b/python/conda/linux_release/builder/Dockerfile
index 8be05b8..2404609 100644
--- a/python/conda/linux_release/builder/Dockerfile
+++ b/python/conda/linux_release/builder/Dockerfile
@@ -2,16 +2,16 @@ FROM astra-build-env
 ARG BUILD_NUMBER=
 WORKDIR /root
 RUN git clone --depth 1 https://github.com/astra-toolbox/astra-toolbox
-RUN [ -z $BUILD_NUMBER ] || perl -pi -e "s/^(\s*number:\s*)[0-9]+$/\${1}$BUILD_NUMBER/" astra-toolbox/python/conda/libastra/meta.yaml astra-toolbox/python/conda/meta.yaml
+RUN [ -z $BUILD_NUMBER ] || perl -pi -e "s/^(\s*number:\s*)[0-9]+$/\${1}$BUILD_NUMBER/" astra-toolbox/python/conda/libastra/meta.yaml astra-toolbox/python/conda/astra-toolbox/meta.yaml
 RUN conda-build --python=3.5 astra-toolbox/python/conda/libastra
-RUN conda-build --python 2.7 --numpy 1.8 astra-toolbox/python/conda
-RUN conda-build --python 2.7 --numpy 1.9 astra-toolbox/python/conda
-RUN conda-build --python 2.7 --numpy 1.10 astra-toolbox/python/conda
-RUN conda-build --python 2.7 --numpy 1.11 astra-toolbox/python/conda
-RUN conda-build --python 2.7 --numpy 1.12 astra-toolbox/python/conda
-RUN conda-build --python 3.5 --numpy 1.9 astra-toolbox/python/conda
-RUN conda-build --python 3.5 --numpy 1.10 astra-toolbox/python/conda
-RUN conda-build --python 3.5 --numpy 1.11 astra-toolbox/python/conda
-RUN conda-build --python 3.5 --numpy 1.12 astra-toolbox/python/conda
-RUN conda-build --python 3.6 --numpy 1.11 astra-toolbox/python/conda
-RUN conda-build --python 3.6 --numpy 1.12 astra-toolbox/python/conda
+RUN conda-build --python 2.7 --numpy 1.8 astra-toolbox/python/conda/astra-toolbox
+RUN conda-build --python 2.7 --numpy 1.9 astra-toolbox/python/conda/astra-toolbox
+RUN conda-build --python 2.7 --numpy 1.10 astra-toolbox/python/conda/astra-toolbox
+RUN conda-build --python 2.7 --numpy 1.11 astra-toolbox/python/conda/astra-toolbox
+RUN conda-build --python 2.7 --numpy 1.12 astra-toolbox/python/conda/astra-toolbox
+RUN conda-build --python 3.5 --numpy 1.9 astra-toolbox/python/conda/astra-toolbox
+RUN conda-build --python 3.5 --numpy 1.10 astra-toolbox/python/conda/astra-toolbox
+RUN conda-build --python 3.5 --numpy 1.11 astra-toolbox/python/conda/astra-toolbox
+RUN conda-build --python 3.5 --numpy 1.12 astra-toolbox/python/conda/astra-toolbox
+RUN conda-build --python 3.6 --numpy 1.11 astra-toolbox/python/conda/astra-toolbox
+RUN conda-build --python 3.6 --numpy 1.12 astra-toolbox/python/conda/astra-toolbox
diff --git a/python/conda/meta.yaml b/python/conda/meta.yaml
deleted file mode 100644
index 942397e..0000000
--- a/python/conda/meta.yaml
+++ /dev/null
@@ -1,48 +0,0 @@
-package:
-  name: astra-toolbox
-  version: '1.8'
-
-source:
-  git_url: https://github.com/astra-toolbox/astra-toolbox.git
-  git_tag: v1.8
-
-build:
-  number: 0
-  script_env:
-    - CC # [not win]
-    - CUDA_ROOT # [not win]
-
-test:
-  imports:
-    - astra
-
-  requires:
-    # To avoid large downloads just for testing after build phase
-    - nomkl # [not win]
-
-requirements:
-  build:
-    - python
-    - cython >=0.13
-    - nomkl # [not win]
-    - numpy
-    - scipy
-    - six
-    - libastra ==1.8
-
-  run:
-    - python
-    - numpy x.x
-    - scipy
-    - six
-    - libastra ==1.8
-
-
-about:
-  home: http://www.astra-toolbox.com
-  license: GPLv3
-  summary: 'The ASTRA Toolbox is a Python toolbox of high-performance GPU primitives for 2D and 3D tomography.'
-
-# See
-# http://docs.continuum.io/conda/build.html for
-# more information about meta.yaml
-- 
cgit v1.2.3


From ee0118aceff644f7e5cdb0c7298c41064357d86a Mon Sep 17 00:00:00 2001
From: Nicola VIGANO <N.R.Vigano@cwi.nl>
Date: Wed, 8 Mar 2017 15:14:53 +0100
Subject: Python: added options for projector creation, like for the matlab
 interface

Signed-off-by: Nicola VIGANO <N.R.Vigano@cwi.nl>
---
 python/astra/creators.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

(limited to 'python')

diff --git a/python/astra/creators.py b/python/astra/creators.py
index aa16221..a0d347b 100644
--- a/python/astra/creators.py
+++ b/python/astra/creators.py
@@ -533,7 +533,7 @@ def create_reconstruction(rec_type, proj_id, sinogram, iterations=1, use_mask='n
         return recon_id
 
 
-def create_projector(proj_type, proj_geom, vol_geom):
+def create_projector(proj_type, proj_geom, vol_geom, options=None):
     """Create a 2D or 3D projector.
 
 :param proj_type: Projector type, such as ``'line'``, ``'linear'``, ...
@@ -542,6 +542,7 @@ def create_projector(proj_type, proj_geom, vol_geom):
 :type proj_geom: :class:`dict`
 :param vol_geom: Volume geometry.
 :type vol_geom: :class:`dict`
+:param options: Projector options structure defining ``'VoxelSuperSampling'``, ``'DetectorSuperSampling'``, and ``'GPUindex'``.
 :returns: :class:`int` -- The ID of the projector.
 
 """
@@ -550,6 +551,8 @@ def create_projector(proj_type, proj_geom, vol_geom):
     cfg = astra_dict(proj_type)
     cfg['ProjectionGeometry'] = proj_geom
     cfg['VolumeGeometry'] = vol_geom
+    if options is not None:
+        cfg['options'] = options
     types3d = ['linear3d', 'linearcone', 'cuda3d']
     if proj_type in types3d:
         return projector3d.create(cfg)
-- 
cgit v1.2.3


From 52392c4997225e255490d30cc097fc1ddd57614d Mon Sep 17 00:00:00 2001
From: Willem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl>
Date: Wed, 29 Mar 2017 10:38:53 +0200
Subject: Update create_projector docstring

---
 python/astra/creators.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

(limited to 'python')

diff --git a/python/astra/creators.py b/python/astra/creators.py
index a0d347b..53d98e0 100644
--- a/python/astra/creators.py
+++ b/python/astra/creators.py
@@ -542,7 +542,8 @@ def create_projector(proj_type, proj_geom, vol_geom, options=None):
 :type proj_geom: :class:`dict`
 :param vol_geom: Volume geometry.
 :type vol_geom: :class:`dict`
-:param options: Projector options structure defining ``'VoxelSuperSampling'``, ``'DetectorSuperSampling'``, and ``'GPUindex'``.
+:param options: Projector options structure defining ``'VoxelSuperSampling'``, ``'DetectorSuperSampling'``.
+:type options: :class:`dict`
 :returns: :class:`int` -- The ID of the projector.
 
 """
-- 
cgit v1.2.3


From c9f11161191729046eb91cc038d815ee8bd1e225 Mon Sep 17 00:00:00 2001
From: Willem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl>
Date: Wed, 29 Mar 2017 21:37:02 +0200
Subject: Fix conda build

---
 python/conda/libastra/build.sh | 1 +
 1 file changed, 1 insertion(+)

(limited to 'python')

diff --git a/python/conda/libastra/build.sh b/python/conda/libastra/build.sh
index 98220f5..304c053 100644
--- a/python/conda/libastra/build.sh
+++ b/python/conda/libastra/build.sh
@@ -21,6 +21,7 @@ case `uname` in
   Darwin*)
     cp -P $LIBPATH/libcudart.*.dylib $CONDA_PREFIX/lib
     cp -P $LIBPATH/libcufft.*.dylib $CONDA_PREFIX/lib
+    ;;
   *)
     cp -P $LIBPATH/libcudart.so.* $CONDA_PREFIX/lib
     cp -P $LIBPATH/libcufft.so.* $CONDA_PREFIX/lib
-- 
cgit v1.2.3