[pyfai] 08/22: relmove all pacth already merged by upstream

Frédéric-Emmanuel Picca picca at moszumanska.debian.org
Wed Jun 8 14:33:56 UTC 2016


This is an automated email from the git hooks/post-receive script.

picca pushed a commit to annotated tag debian/0.12.0+dfsg-1
in repository pyfai.

commit 2ec34061af3ad1b49822fae8db0796c0c4acbd70
Author: Picca Frédéric-Emmanuel <picca at synchrotron-soleil.fr>
Date:   Tue Jun 7 14:57:08 2016 +0200

    relmove all pacth already merged by upstream
---
 ...001-fix-pyFAI-when-third_party-is-missing.patch | 230 ----------
 ...02-fix-from-upstream-python3-installation.patch | 468 ---------------------
 .../0003-fix-from-upstream-for-fabio-3.x.patch     |  71 ----
 debian/patches/series                              |   3 -
 4 files changed, 772 deletions(-)

diff --git a/debian/patches/0001-fix-pyFAI-when-third_party-is-missing.patch b/debian/patches/0001-fix-pyFAI-when-third_party-is-missing.patch
deleted file mode 100644
index 6cca40e..0000000
--- a/debian/patches/0001-fix-pyFAI-when-third_party-is-missing.patch
+++ /dev/null
@@ -1,230 +0,0 @@
-From: =?utf-8?q?Picca_Fr=C3=A9d=C3=A9ric-Emmanuel?=
- <picca at synchrotron-soleil.fr>
-Date: Fri, 24 Jul 2015 11:15:42 +0200
-Subject: fix pyFAI when third_party is missing
-
----
- pyFAI-src/detectors.py        |  5 ++++-
- pyFAI-src/distortion.py       |  5 ++++-
- pyFAI-src/geometry.py         |  5 ++++-
- pyFAI-src/grid.py             |  5 ++++-
- pyFAI-src/integrate_widget.py |  6 +++++-
- pyFAI-src/massif.py           |  5 ++++-
- pyFAI-src/peak_picker.py      |  5 ++++-
- pyFAI-src/units.py            |  5 ++++-
- pyFAI-src/utils.py            |  5 ++++-
- setup.py                      | 14 +++++++++-----
- src/_distortion.pyx           |  6 +++++-
- test/test_bispev.py           |  5 ++++-
- 12 files changed, 55 insertions(+), 16 deletions(-)
-
-diff --git a/pyFAI-src/detectors.py b/pyFAI-src/detectors.py
-index 3649ae5..5c07882 100644
---- a/pyFAI-src/detectors.py
-+++ b/pyFAI-src/detectors.py
-@@ -58,7 +58,10 @@ try:
-     import fabio
- except ImportError:
-     fabio = None
--from .third_party.six import with_metaclass
-+try:
-+    from six import with_metaclass
-+except ImportError:
-+    from .third_party.six import with_metaclass
- 
- 
- epsilon = 1e-6
-diff --git a/pyFAI-src/distortion.py b/pyFAI-src/distortion.py
-index a07ba18..78f94f0 100644
---- a/pyFAI-src/distortion.py
-+++ b/pyFAI-src/distortion.py
-@@ -43,7 +43,10 @@ if ocl:
- else:
-     ocl_azim_lut = ocl_azim_csr = None
- from .utils import timeit
--from .third_party import six
-+try:
-+    import six
-+except ImportError:
-+    from .third_party import six
- import fabio
- 
- try:
-diff --git a/pyFAI-src/geometry.py b/pyFAI-src/geometry.py
-index 531ab3c..19aa0bb 100644
---- a/pyFAI-src/geometry.py
-+++ b/pyFAI-src/geometry.py
-@@ -40,7 +40,10 @@ import types
- 
- from . import detectors
- from . import units
--from .third_party import six
-+try:
-+    import six
-+except ImportError:
-+    from .third_party import six
- StringTypes = (six.binary_type, six.text_type)
- 
- logger = logging.getLogger("pyFAI.geometry")
-diff --git a/pyFAI-src/grid.py b/pyFAI-src/grid.py
-index c981c1a..9804d27 100644
---- a/pyFAI-src/grid.py
-+++ b/pyFAI-src/grid.py
-@@ -37,7 +37,10 @@ import time
- 
- from . import detectors
- from . import units
--from .third_party import six
-+try:
-+    import six
-+except ImportError:
-+    from .third_party import six
- StringTypes = (six.binary_type, six.text_type)
- 
- logger = logging.getLogger("pyFAI.grid")
-diff --git a/pyFAI-src/integrate_widget.py b/pyFAI-src/integrate_widget.py
-index 87f418c..66c6509 100644
---- a/pyFAI-src/integrate_widget.py
-+++ b/pyFAI-src/integrate_widget.py
-@@ -61,7 +61,11 @@ from .utils import float_, int_, str_, get_ui_file
- from .io import HDF5Writer
- from .azimuthalIntegrator import AzimuthalIntegrator
- from .units import RADIAL_UNITS, TTH_DEG, TTH_RAD, Q_NM, Q_A, R_MM
--from .third_party import six
-+
-+try:
-+    import six
-+except ImportError:
-+    from .third_party import six
- 
- UIC = get_ui_file("integration.ui")
- 
-diff --git a/pyFAI-src/massif.py b/pyFAI-src/massif.py
-index 67ffb28..1f2f52d 100644
---- a/pyFAI-src/massif.py
-+++ b/pyFAI-src/massif.py
-@@ -40,7 +40,10 @@ from scipy.ndimage.filters  import median_filter
- 
- from .bilinear import Bilinear
- from .utils import gaussian_filter, binning, unBinning, relabel, is_far_from_group
--from .third_party import six
-+try:
-+    import six
-+except ImportError:
-+    from .third_party import six
- 
- if os.name != "nt":
-     WindowsError = RuntimeError
-diff --git a/pyFAI-src/peak_picker.py b/pyFAI-src/peak_picker.py
-index 5311b60..dc7cd9f 100644
---- a/pyFAI-src/peak_picker.py
-+++ b/pyFAI-src/peak_picker.py
-@@ -52,7 +52,10 @@ from .calibrant import Calibrant, ALL_CALIBRANTS
- from .blob_detection import BlobDetection
- from .massif import Massif
- from .watershed import InverseWatershed
--from .third_party import six
-+try:
-+    import six
-+except ImportError:
-+    from .third_party import six
- logger = logging.getLogger("pyFAI.peak_picker")
- if os.name != "nt":
-     WindowsError = RuntimeError
-diff --git a/pyFAI-src/units.py b/pyFAI-src/units.py
-index beedf1e..81eed18 100644
---- a/pyFAI-src/units.py
-+++ b/pyFAI-src/units.py
-@@ -32,7 +32,10 @@ __docformat__ = 'restructuredtext'
- import logging
- logger = logging.getLogger("pyFAI.unit")
- from numpy import pi
--from .third_party import six
-+try:
-+    import six
-+except ImportError:
-+    from .third_party import six
- hc = 12.398419292004204
- 
- class Enum(dict):
-diff --git a/pyFAI-src/utils.py b/pyFAI-src/utils.py
-index a7abcad..13c9295 100644
---- a/pyFAI-src/utils.py
-+++ b/pyFAI-src/utils.py
-@@ -52,7 +52,10 @@ else:
- from scipy import ndimage
- from scipy.interpolate import interp1d
- from math import ceil, sin, cos, atan2, pi
--from .third_party import six
-+try:
-+    import six
-+except ImportError:
-+    from .third_party import six
- try:
-     from . import relabel as _relabel
- except:
-diff --git a/setup.py b/setup.py
-index 7c9531f..7a457ae 100644
---- a/setup.py
-+++ b/setup.py
-@@ -476,6 +476,13 @@ License :: OSI Approved :: GPL
- Topic :: Crystallography
- """
- 
-+packages = ["pyFAI", "pyFAI.test"]
-+package_dir = {"pyFAI": "pyFAI-src",
-+               "pyFAI.test": "test"}
-+if os.path.isdir("third_party"):
-+    package_dir["pyFAI.third_party"] = "third_party"
-+    packages.append("pyFAI.third_party")
-+
- if __name__ == "__main__":
-     setup(name='pyFAI',
-           version=get_version(),
-@@ -491,11 +498,8 @@ if __name__ == "__main__":
-           ext_package="pyFAI",
-           scripts=script_files,
-           ext_modules=ext_modules,
--          packages=["pyFAI", "pyFAI.third_party", "pyFAI.test"],
--          package_dir={"pyFAI": "pyFAI-src",
--                       "pyFAI.third_party": "third_party",
--                       "pyFAI.test": "test",
--                       },
-+          packages=packages,
-+          package_dir=package_dir,
-           test_suite="test",
-           cmdclass=cmdclass,
-           data_files=data_files,
-diff --git a/src/_distortion.pyx b/src/_distortion.pyx
-index bb58b84..1e74838 100644
---- a/src/_distortion.pyx
-+++ b/src/_distortion.pyx
-@@ -45,7 +45,11 @@ import time
- logger = logging.getLogger("pyFAI._distortion")
- from .detectors import detector_factory
- from .utils import timeit, expand2d
--from .third_party import six
-+
-+try:
-+    import six
-+except ImportError:
-+    from .third_party import six
- import fabio
- 
- cdef struct lut_point:
-diff --git a/test/test_bispev.py b/test/test_bispev.py
-index 32b0ef9..c673a53 100755
---- a/test/test_bispev.py
-+++ b/test/test_bispev.py
-@@ -47,7 +47,10 @@ pyFAI = sys.modules["pyFAI"]
- if logger.getEffectiveLevel() <= logging.INFO:
-     import pylab
- from pyFAI import spline, _bispev
--from pyFAI.third_party import six
-+try:
-+    import six
-+except ImportError:
-+    from pyFAI.third_party import six
- 
- try:
-     from scipy.interpolate import fitpack
diff --git a/debian/patches/0002-fix-from-upstream-python3-installation.patch b/debian/patches/0002-fix-from-upstream-python3-installation.patch
deleted file mode 100644
index ea6b02a..0000000
--- a/debian/patches/0002-fix-from-upstream-python3-installation.patch
+++ /dev/null
@@ -1,468 +0,0 @@
-From: =?utf-8?q?Picca_Fr=C3=A9d=C3=A9ric-Emmanuel?=
- <picca at synchrotron-soleil.fr>
-Date: Fri, 11 Sep 2015 14:24:40 +0200
-Subject: fix from upstream python3 installation
-
----
- test/blob.py                        | 15 ++++++++-------
- test/debug_ocl_sort.py              |  3 ++-
- test/profile_lut_pixelsplitFull.py  |  6 ++----
- test/profile_ocl_lut.py             |  8 +-------
- test/profile_ocl_lut_pixelsplit.py  | 20 --------------------
- test/profile_ocl_lut_pixelsplit2.py |  4 +---
- test/profile_pixelsplitFull.py      |  8 ++------
- test/profile_pixelsplitFullLUT.py   |  6 +-----
- test/profile_pixelsplitFullLUT2.py  |  6 +-----
- test/test_export.py                 |  9 ++-------
- test/test_geometry_refinement.py    |  7 +++----
- test/test_mask.py                   |  9 +++++----
- test/test_peak_picking.py           |  8 +++-----
- test/test_polarization.py           |  8 +++-----
- 14 files changed, 34 insertions(+), 83 deletions(-)
-
-diff --git a/test/blob.py b/test/blob.py
-index ee3e355..0a1106c 100644
---- a/test/blob.py
-+++ b/test/blob.py
-@@ -1,5 +1,6 @@
- #!/usr/bin/python
- # coding: utf-8
-+from __future__ import print_function
- import sys, scipy
- import matplotlib
- matplotlib.use('Qt4Agg')
-@@ -47,7 +48,7 @@ def image_test_rings():
-     modulation = (1 + numpy.sin(5 * r + chi * mod))
-     for radius in numpy.linspace(0, r_max, rings):
-         img += numpy.exp(-(r - radius) ** 2 / (2 * (sigma * sigma)))
--    
-+
-     img *= modulation
-     img = add_noise(img, 0.0)
-     return img
-@@ -55,7 +56,7 @@ def image_test_rings():
- def add_noise(img,rate):
-     noise = numpy.random.random(img.shape) * rate
-     return img+noise
--    
-+
- def make_gaussian(im,sigma,xc,yc):
-     "Creating 2D gaussian to be put in a test image"
-     e = 1
-@@ -95,13 +96,13 @@ ax = f.add_subplot(111)
- ax.imshow(numpy.log1p(data), interpolation = 'nearest')
- 
- for i in range(5):
--    print ('Octave #%i' %i)
-+    print('Octave #%i' %i)
-     bd._one_octave(shrink=True, refine = True, n_5 = False)
-     print("Octave #%i Total kp: %i" % (i, bd.keypoints.size))
--    
-+
- # bd._one_octave(False, True ,False)
--    
--print ('Final size of keypoints : %i'% bd.keypoints.size)
-+
-+print('Final size of keypoints : %i'% bd.keypoints.size)
- 
- i = 0
- # for kp  in bd.keypoints:
-@@ -119,7 +120,7 @@ if sigma.size > 0:
-     h = pylab.figure(2)
-     x, y, o = pylab.hist(sigma, bins=100)
-     h.show()
--      
-+
-     index = numpy.where(x == x.max())
-     kp = bd.keypoints[bd.keypoints.sigma > y[index]]
- else : kp = bd.keypoints
-diff --git a/test/debug_ocl_sort.py b/test/debug_ocl_sort.py
-index a9998ac..d1516ce 100644
---- a/test/debug_ocl_sort.py
-+++ b/test/debug_ocl_sort.py
-@@ -1,3 +1,4 @@
-+from __future__ import print_function
- import numpy, time
- import pyFAI, pyFAI.opencl
- from pyFAI.opencl import pyopencl, ocl
-@@ -21,7 +22,7 @@ hs_data = numpy.sort(h_data)
- t1 = time.time()
- time_sort = 1e3 * (t1 - t0)
- 
--print time_sort
-+print(time_sort)
- 
- evt = prg.bsort_init(queue, (ws,), (ws,), d_data.data, local_mem)
- evt.wait()
-diff --git a/test/profile_lut_pixelsplitFull.py b/test/profile_lut_pixelsplitFull.py
-index 397c87b..02aa2e2 100644
---- a/test/profile_lut_pixelsplitFull.py
-+++ b/test/profile_lut_pixelsplitFull.py
-@@ -49,7 +49,7 @@ with open("../openCL/ocl_lut_pixelsplit.cl", "r") as kernelFile:
- 
- compile_options = "-D BINS=%i  -D NIMAGE=%i -D WORKGROUP_SIZE=%i -D EPS=%e" % \
-                 (bins, size, workgroup_size, numpy.finfo(numpy.float32).eps)
--            
-+
- print(compile_options)
- 
- program = cl.Program(ctx, kernel_src).build(options=compile_options)
-@@ -181,7 +181,7 @@ legend()
- show()
- input()
- 
--  
-+
- #aaa = 0
- #bbb = 0
- #for i in range(bins):
-@@ -197,7 +197,5 @@ input()
-         #aaa += 1
-         #if not numpy.allclose(data_1[j],data_2[j]):
-             #bbb += 1
--            #print data_1[j],data_2[j],numpy.allclose(data_1[j],data_2[j]), idx_ptr[i]+j
- 
- 
--#print aaa,bbb
-\ No newline at end of file
-diff --git a/test/profile_ocl_lut.py b/test/profile_ocl_lut.py
-index b72755e..ab25c98 100755
---- a/test/profile_ocl_lut.py
-+++ b/test/profile_ocl_lut.py
-@@ -53,7 +53,7 @@ plot(nodummy + 1, label="no_corr")
- out_cyt = ai._lut_integrator.integrate(data, dummy= -2, delta_dummy=1.5)
- out_ocl = gpu.integrate(data, dummy= -2, delta_dummy=1.5)[0]
- print("Dummy  R=", utilstest.Rwp((out_cyt[0], out_ocl), out_cyt[:2], "Dummy"))
--#print "nodummy/Dummy", utilstest.Rwp((out_cyt[0], out_cyt[1]), (out_cyt[0], nodummy), "nodummy/Dummy")
-+#print("nodummy/Dummy", utilstest.Rwp((out_cyt[0], out_cyt[1]), (out_cyt[0], nodummy), "nodummy/Dummy")
- 
- dark = numpy.random.random(data.shape)
- out_cyt = ai._lut_integrator.integrate(data, dark=dark)
-@@ -76,18 +76,12 @@ out_ocl = gpu.integrate(data, polarization=polarization)[0]
- print("PolarizationR=", utilstest.Rwp((out_cyt[0], out_ocl), out_cyt[:2], "Polarization"))
- 
- #pyopencl.enqueue_copy(gpu._queue, img, gpu._cl_mem["image"]).wait()
--#print "SolidAngle", solidAngle
--#print img
- #xx = splitBBox.histoBBox1d(weights=data,
- #                                                 pos0=ai._ttha,
- #                                                 delta_pos0=ai._dttha,
- #                                                 bins=1000,
- #                                                 polarization=polarization)[1]
- #plot(xx + 2, label="xrpd")
--#print "Pol: lut/refR=", utilstest.Rwp((out_cyt[0], xx), out_cyt[:2], "Polarization")
--#print "Pol: ocl/refR=", utilstest.Rwp((out_cyt[0], out_ocl), (out_cyt[0], xx), "Polarization")
--#print "Pol: noc/refR=", utilstest.Rwp((out_cyt[0], nodummy), (out_cyt[0], xx), "Polarization")
--#print out_ocl
- plot(out_cyt[1], label="ref")
- plot(out_ocl, label="obt")
- 
-diff --git a/test/profile_ocl_lut_pixelsplit.py b/test/profile_ocl_lut_pixelsplit.py
-index 9cd76cc..0c2ec03 100644
---- a/test/profile_ocl_lut_pixelsplit.py
-+++ b/test/profile_ocl_lut_pixelsplit.py
-@@ -187,23 +187,3 @@ legend()
- show()
- input()
- 
--
--# aaa = 0
--# bbb = 0
--# for i in range(bins):
--    # ind_tmp1 = numpy.copy(indices[idx_ptr[i]:idx_ptr[i+1]])
--    # ind_tmp2 = numpy.copy(foo.indices[idx_ptr[i]:idx_ptr[i+1]])
--    # data_tmp1 = numpy.copy(data_lut[idx_ptr[i]:idx_ptr[i+1]])
--    # data_tmp2 = numpy.copy(foo.data[idx_ptr[i]:idx_ptr[i+1]])
--    # sort1 = numpy.argsort(ind_tmp1)
--    # sort2 = numpy.argsort(ind_tmp2)
--    # data_1 = data_tmp1[sort1]
--    # data_2 = data_tmp2[sort2]
--    # for j in range(data_1.size):
--        # aaa += 1
--        # if not numpy.allclose(data_1[j],data_2[j]):
--            # bbb += 1
--            # print data_1[j],data_2[j],numpy.allclose(data_1[j],data_2[j]), idx_ptr[i]+j
--
--
--# print aaa,bbb
-diff --git a/test/profile_ocl_lut_pixelsplit2.py b/test/profile_ocl_lut_pixelsplit2.py
-index b3199da..c26dac3 100644
---- a/test/profile_ocl_lut_pixelsplit2.py
-+++ b/test/profile_ocl_lut_pixelsplit2.py
-@@ -57,7 +57,7 @@ with open("../openCL/ocl_lut_pixelsplit.cl", "r") as kernelFile:
- 
- compile_options = "-D BINS=%i  -D NIMAGE=%i -D WORKGROUP_SIZE=%i -D EPS=%e" % \
-                 (bins, size, workgroup_size, numpy.finfo(numpy.float32).eps)
--            
-+
- print(compile_options)
- 
- program = cl.Program(ctx, kernel_src).build(options=compile_options)
-@@ -110,8 +110,6 @@ d_idx_ptr = cl.array.to_device(queue, idx_ptr)
- 
- #cl.enqueue_copy(queue, lutsize, d_lutsize.data)
- 
--#print lutsize
--
- lut_size = int(idx_ptr[-1])
- 
- d_indices  = cl.array.empty(queue, (lut_size,), dtype=numpy.int32)
-diff --git a/test/profile_pixelsplitFull.py b/test/profile_pixelsplitFull.py
-index 53678ad..f75c5b1 100644
---- a/test/profile_pixelsplitFull.py
-+++ b/test/profile_pixelsplitFull.py
-@@ -50,7 +50,7 @@ with open("../openCL/ocl_lut_pixelsplit.cl", "r") as kernelFile:
- 
- compile_options = "-D BINS=%i  -D NIMAGE=%i -D WORKGROUP_SIZE=%i -D EPS=%e" % \
-                 (bins, size, workgroup_size, numpy.finfo(numpy.float32).eps)
--            
-+
- print(compile_options)
- 
- program = cl.Program(ctx, kernel_src).build(options=compile_options)
-@@ -185,7 +185,7 @@ legend()
- show()
- input()
- 
--  
-+
- #aaa = 0
- #bbb = 0
- #for i in range(bins):
-@@ -201,7 +201,3 @@ input()
-         #aaa += 1
-         #if not numpy.allclose(data_1[j],data_2[j]):
-             #bbb += 1
--            #print data_1[j],data_2[j],numpy.allclose(data_1[j],data_2[j]), idx_ptr[i]+j
--
--
--#print aaa,bbb
-\ No newline at end of file
-diff --git a/test/profile_pixelsplitFullLUT.py b/test/profile_pixelsplitFullLUT.py
-index 59ee713..585ed7e 100644
---- a/test/profile_pixelsplitFullLUT.py
-+++ b/test/profile_pixelsplitFullLUT.py
-@@ -102,7 +102,7 @@ pixels_bad.sort()
- #show()
- #raw_input()
- 
--  
-+
- #aaa = 0
- #bbb = 0
- #for i in range(bins):
-@@ -118,7 +118,3 @@ pixels_bad.sort()
-         #aaa += 1
-         #if not numpy.allclose(data_1[j],data_2[j]):
-             #bbb += 1
--            #print data_1[j],data_2[j],numpy.allclose(data_1[j],data_2[j]), idx_ptr[i]+j
--
--
--#print aaa,bbb
-\ No newline at end of file
-diff --git a/test/profile_pixelsplitFullLUT2.py b/test/profile_pixelsplitFullLUT2.py
-index 64199cf..8d980b8 100644
---- a/test/profile_pixelsplitFullLUT2.py
-+++ b/test/profile_pixelsplitFullLUT2.py
-@@ -104,7 +104,7 @@ legend()
- show()
- input()
- 
--  
-+
- #aaa = 0
- #bbb = 0
- #for i in range(bins):
-@@ -120,7 +120,3 @@ input()
-         #aaa += 1
-         #if not numpy.allclose(data_1[j],data_2[j]):
-             #bbb += 1
--            #print data_1[j],data_2[j],numpy.allclose(data_1[j],data_2[j]), idx_ptr[i]+j
--
--
--#print aaa,bbb
-\ No newline at end of file
-diff --git a/test/test_export.py b/test/test_export.py
-index ef4f8e4..5f2ab08 100755
---- a/test/test_export.py
-+++ b/test/test_export.py
-@@ -24,6 +24,8 @@
- 
- "test suite for masked arrays"
- 
-+from __future__ import print_function
-+
- __author__ = "Jérôme Kieffer"
- __contact__ = "Jerome.Kieffer at ESRF.eu"
- __license__ = "GPLv3+"
-@@ -55,7 +57,6 @@ def testExport(direct=100, centerX=900, centerY=1000, tilt=0, tpr=0, pixelX=50,
-     a2 = pyFAI.AzimuthalIntegrator()
-     a3 = pyFAI.AzimuthalIntegrator()
-     a1.setFit2D(direct, centerX, centerY, tilt, tpr, pixelX, pixelY)
--#    print a1
-     a2.setPyFAI(**a1.getPyFAI())
-     a3.setFit2D(**a2.getFit2D())
-     res = ""
-@@ -110,14 +111,8 @@ class TestSPD(unittest.TestCase):
- 
-     def test_simple(self):
-         ref = pyFAI.load(self.poniFile)
--#        ref.rot1 = 0
--#        ref.rot2 = 0
--#        ref.rot3 = 0
-         obt = pyFAI.AzimuthalIntegrator()
--#        print ref.getFit2D()
--#        print ref.getSPD()
-         obt.setSPD(**ref.getSPD())
--#        print obt.getSPD()
-         for key in ["dist", "poni1", "poni2", "rot3", "pixel1", "pixel2", "splineFile"]:
-             refv = ref.__getattribute__(key)
-             obtv = obt.__getattribute__(key)
-diff --git a/test/test_geometry_refinement.py b/test/test_geometry_refinement.py
-index bdceacd..ffd75a8 100755
---- a/test/test_geometry_refinement.py
-+++ b/test/test_geometry_refinement.py
-@@ -24,11 +24,13 @@
- 
- "test suite for Geometric Refinement class"
- 
-+from __future__ import print_function
-+
- __author__ = "Jérôme Kieffer"
- __contact__ = "Jerome.Kieffer at ESRF.eu"
- __license__ = "GPLv3+"
- __copyright__ = "European Synchrotron Radiation Facility, Grenoble, France"
--__date__ = "05/03/2015"
-+__date__ = "21/08/2015"
- 
- 
- import unittest
-@@ -204,7 +206,6 @@ class TestGeometryRefinement(unittest.TestCase):
-         wl = 2e-10 * numpy.sin(tth / 2.0)
-         ds = [1.0]
-         calibrant = pyFAI.calibrant.Calibrant(dSpacing=ds, wavelength=wl)
--#        print tth, wl, ds, 2 * ds[0] * numpy.sin(tth / 2)
-         r2 = GeometryRefinement(data, dist=0.1, splineFile=splineFine, wavelength=wl, calibrant=calibrant)
- #        r2.poni1 = 5e-2
- #        r2.poni2 = 5e-2
-@@ -216,8 +217,6 @@ class TestGeometryRefinement(unittest.TestCase):
-         r2.rot3_min = -0.0001
-         r2.refine2(10000000)
-         ref2 = numpy.array([0.1, 4.917310e-02, 4.722438e-02, 0 , 0.  , 0.00000])
--#        print "ref", ref2
--#        print "obt", r2.param
-         for i, key in enumerate(("dist", "poni1", "poni2", "rot1", "rot2", "rot3")):
-             self.assertAlmostEqual(ref2[i], r2.__getattribute__(key), 3,
-                                    "%s is %s, I expected %s%s%s" % (key, r2.__getattribute__(key) , ref2[i], os.linesep, r2))
-diff --git a/test/test_mask.py b/test/test_mask.py
-index 0c74382..47d825e 100755
---- a/test/test_mask.py
-+++ b/test/test_mask.py
-@@ -23,11 +23,13 @@
- #
- "test suite for masked arrays"
- 
-+from __future__ import print_function
-+
- __author__ = "Jérôme Kieffer"
- __contact__ = "Jerome.Kieffer at ESRF.eu"
- __license__ = "GPLv3+"
- __copyright__ = "European Synchrotron Radiation Facility, Grenoble, France"
--__date__ = "10/03/2015"
-+__date__ = "21/08/2015"
- 
- 
- import unittest
-@@ -54,7 +56,6 @@ class TestMask(unittest.TestCase):
-         self.dataFile = UtilsTest.getimage(self.__class__.dataFile)
-         self.poniFile = UtilsTest.getimage(self.__class__.poniFile)
-         self.ai = pyFAI.load(self.poniFile)
--#        self.ai.mask = None
-         self.data = fabio.open(self.dataFile).data
-         self.mask = self.data < 0
- 
-@@ -251,7 +252,7 @@ class TestMaskBeamstop(unittest.TestCase):
- 
-     def setUp(self):
-         """
--        Download files 
-+        Download files
-         Create a mask for tth<3.7 deg
-         """
-         self.dataFile = UtilsTest.getimage(self.__class__.dataFile)
-@@ -328,7 +329,7 @@ def test_suite_all_Mask():
-     testSuite.addTest(TestMask("test_mask_CSR"))
-     testSuite.addTest(TestMask("test_mask_LUT_OCL"))
-     testSuite.addTest(TestMask("test_mask_CSR_OCL"))
--    
-+
-     testSuite.addTest(TestMaskBeamstop("test_nomask"))
-     testSuite.addTest(TestMaskBeamstop("test_mask_splitBBox"))
-     testSuite.addTest(TestMaskBeamstop("test_mask_LUT"))
-diff --git a/test/test_peak_picking.py b/test/test_peak_picking.py
-index acfd8b5..506e493 100755
---- a/test/test_peak_picking.py
-+++ b/test/test_peak_picking.py
-@@ -25,11 +25,13 @@
- #
- "test suite for peak picking class"
- 
-+from __future__ import print_function
-+
- __author__ = "Jérôme Kieffer"
- __contact__ = "Jerome.Kieffer at ESRF.eu"
- __license__ = "GPLv3+"
- __copyright__ = "European Synchrotron Radiation Facility, Grenoble, France"
--__date__ = "20/03/2015"
-+__date__ = "21/08/2015"
- 
- 
- import unittest
-@@ -104,8 +106,6 @@ class testPeakPicking(unittest.TestCase):
- 
-         self.pp.points.save(self.nptfile)
-         lstPeak = self.pp.points.getListRing()
--#        print self.pp.points
--#        print lstPeak
-         logger.info("After peak-picking, we have %s points generated from %s groups ", len(lstPeak), len(self.ctrlPt))
-         gr = GeometryRefinement(lstPeak, dist=0.01, pixel1=1e-4, pixel2=1e-4, wavelength=self.wavelength, calibrant=self.calibrant)
-         gr.guess_poni()
-@@ -126,8 +126,6 @@ class testPeakPicking(unittest.TestCase):
-         self.assertAlmostEquals(gr.rot2, 0, 2, "rot2 is OK, got %s, expected 0" % gr.rot2)
-         self.assertAlmostEquals(gr.rot3, 0, 2, "rot3 is OK, got %s, expected 0" % gr.rot3)
- 
--#        print self.pp.points
--
- 
- class TestMassif(unittest.TestCase):
-     """test for ring extraction algorithm with image which needs binning (non regression test)"""
-diff --git a/test/test_polarization.py b/test/test_polarization.py
-index a587afd..9a89e63 100755
---- a/test/test_polarization.py
-+++ b/test/test_polarization.py
-@@ -24,11 +24,13 @@
- #
- "test suite for polarization corrections"
- 
-+from __future__ import print_function
-+
- __author__ = "Jérôme Kieffer"
- __contact__ = "Jerome.Kieffer at ESRF.eu"
- __license__ = "GPLv3+"
- __copyright__ = "European Synchrotron Radiation Facility, Grenoble, France"
--__date__ = "15/12/2014"
-+__date__ = "21/08/2015"
- 
- 
- import unittest
-@@ -54,10 +56,6 @@ class TestPolarization(unittest.TestCase):
-     rotX = numpy.radians(30.0 * X)
-     tth = numpy.sqrt(rotY ** 2 + rotX ** 2)
-     chi = numpy.arctan2(rotY, rotX)
--#    print numpy.degrees(tth[6])
--#    print numpy.degrees(chi[6])
--#    print numpy.degrees(tth[:, 6])
--#    print numpy.degrees(chi[:, 6])
-     ai = pyFAI.AzimuthalIntegrator(dist=1, pixel1=0.1, pixel2=0.1)
-     ai._ttha = tth
-     ai._chia = chi
diff --git a/debian/patches/0003-fix-from-upstream-for-fabio-3.x.patch b/debian/patches/0003-fix-from-upstream-for-fabio-3.x.patch
deleted file mode 100644
index 3fbdbd8..0000000
--- a/debian/patches/0003-fix-from-upstream-for-fabio-3.x.patch
+++ /dev/null
@@ -1,71 +0,0 @@
-From: =?utf-8?q?Picca_Fr=C3=A9d=C3=A9ric-Emmanuel?=
- <picca at synchrotron-soleil.fr>
-Date: Sun, 27 Mar 2016 15:50:40 +0200
-Subject: fix from upstream for fabio 3.x
-
----
- pyFAI-src/azimuthalIntegrator.py | 44 +++++++++++++++++++---------------------
- 1 file changed, 21 insertions(+), 23 deletions(-)
-
-diff --git a/pyFAI-src/azimuthalIntegrator.py b/pyFAI-src/azimuthalIntegrator.py
-index 78b413a..f064ba1 100644
---- a/pyFAI-src/azimuthalIntegrator.py
-+++ b/pyFAI-src/azimuthalIntegrator.py
-@@ -3340,27 +3340,26 @@ class AzimuthalIntegrator(Geometry):
-             return
- 
-         dim1_unit = units.to_unit(dim1_unit)
--        header_keys = ["dist", "poni1", "poni2", "rot1", "rot2", "rot3",
--                       "chi_min", "chi_max",
--                       dim1_unit.REPR + "_min",
--                       dim1_unit.REPR + "_max",
--                       "pixelX", "pixelY",
--                       "dark", "flat", "polarization_factor", "normalization_factor"]
--        header = {"dist": str(self._dist),
--                  "poni1": str(self._poni1),
--                  "poni2": str(self._poni2),
--                  "rot1": str(self._rot1),
--                  "rot2": str(self._rot2),
--                  "rot3": str(self._rot3),
--                  "chi_min": str(dim2.min()),
--                  "chi_max": str(dim2.max()),
--                  dim1_unit.REPR + "_min": str(dim1.min()),
--                  dim1_unit.REPR + "_max": str(dim1.max()),
--                  "pixelX": str(self.pixel2),  # this is not a bug ... most people expect dim1 to be X
--                  "pixelY": str(self.pixel1),  # this is not a bug ... most people expect dim2 to be Y
--                  "polarization_factor": str(polarization_factor),
--                  "normalization_factor":str(normalization_factor)
--                  }
-+        try:
-+            from collections import OrderedDict
-+            header = OrderedDict()
-+        except ImportError:
-+            header = {}
-+
-+        header["dist"] = str(self._dist)
-+        header["poni1"] = str(self._poni1)
-+        header["poni2"] = str(self._poni2)
-+        header["rot1"] = str(self._rot1)
-+        header["rot2"] = str(self._rot2)
-+        header["rot3"] = str(self._rot3)
-+        header["chi_min"] = str(dim2.min())
-+        header["chi_max"] = str(dim2.max())
-+        header[dim1_unit.REPR + "_min"] = str(dim1.min())
-+        header[dim1_unit.REPR + "_max"] = str(dim1.max())
-+        header["pixelX"] = str(self.pixel2)  # this is not a bug ... most people expect dim1 to be X
-+        header["pixelY"] = str(self.pixel1)  # this is not a bug ... most people expect dim2 to be Y
-+        header["polarization_factor"] = str(polarization_factor)
-+        header["normalization_factor"] = str(normalization_factor)
- 
-         if self.splineFile:
-             header["spline"] = str(self.splineFile)
-@@ -3380,8 +3379,7 @@ class AzimuthalIntegrator(Geometry):
-             header["key"] = f2d[key]
-         try:
-             img = fabio.edfimage.edfimage(data=I.astype("float32"),
--                                          header=header,
--                                          header_keys=header_keys)
-+                                          header=header)
- 
-             if error is not None:
-                 img.appendFrame(data=error, header={"EDF_DataBlockID": "1.Image.Error"})
diff --git a/debian/patches/series b/debian/patches/series
deleted file mode 100644
index 75c409b..0000000
--- a/debian/patches/series
+++ /dev/null
@@ -1,3 +0,0 @@
-0001-fix-pyFAI-when-third_party-is-missing.patch
-0002-fix-from-upstream-python3-installation.patch
-0003-fix-from-upstream-for-fabio-3.x.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/pyfai.git



More information about the debian-science-commits mailing list