Codebase list xrayutilities / 0bb196a
refresh patch series Picca Frédéric-Emmanuel 3 years ago
7 changed file(s) with 17 addition(s) and 116 deletion(s). Raw diff Collapse all Expand all
66 1 file changed, 1 insertion(+), 1 deletion(-)
77
88 diff --git a/doc/source/conf.py b/doc/source/conf.py
9 index c8f0991..2726cbd 100644
9 index cad17ee..f358e8d 100644
1010 --- a/doc/source/conf.py
1111 +++ b/doc/source/conf.py
12 @@ -116,7 +116,7 @@ html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
12 @@ -115,7 +115,7 @@ html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
1313 # Theme options are theme-specific and customize the look and feel of a theme
1414 # further. For a list of options available for each theme, see the
1515 # documentation.
66 1 file changed, 10 insertions(+), 11 deletions(-)
77
88 diff --git a/doc/source/conf.py b/doc/source/conf.py
9 index 2726cbd..ce7bc8f 100644
9 index f358e8d..cc1dde6 100644
1010 --- a/doc/source/conf.py
1111 +++ b/doc/source/conf.py
12 @@ -37,8 +37,7 @@ extensions = [
12 @@ -36,8 +36,7 @@ extensions = [
1313 'sphinx.ext.coverage',
1414 'sphinx.ext.mathjax',
1515 'sphinx.ext.viewcode',
1919
2020 # Add any paths that contain templates here, relative to this directory.
2121 templates_path = ['_templates']
22 @@ -281,12 +280,12 @@ texinfo_documents = [
22 @@ -280,12 +279,12 @@ texinfo_documents = [
2323 # would mean that specific document would be compressed
2424 # regardless of the global pdf_compressed setting.
2525
2626 -pdf_documents = [
2727 - ('index',
28 - u'xrayutilities',
29 - u'xrayutilities',
30 - u'Dominik Kriegner\\Eugen Wintersberger'),
28 - 'xrayutilities',
29 - 'xrayutilities',
30 - 'Dominik Kriegner\\Eugen Wintersberger'),
3131 -]
3232 +# pdf_documents = [
3333 +# ('index',
3838
3939 # A comma-separated list of custom stylesheets. Example:
4040 # pdf_stylesheets = ['sphinx','kerning','a4']
41 @@ -297,7 +296,7 @@ pdf_documents = [
41 @@ -296,7 +295,7 @@ pdf_documents = [
4242 # Create a compressed PDF
4343 # Use True/False or 1/0
4444 # Example: compressed=True
4747
4848 # A colon-separated list of folders to search for fonts. Example:
4949 # pdf_font_path = ['/usr/share/fonts', '/usr/share/texmf-dist/fonts/']
50 @@ -345,11 +344,11 @@ pdf_compressed = True
50 @@ -344,11 +343,11 @@ pdf_compressed = True
5151 # pdf_splittables = False
5252
5353 # Set the default DPI for images
5656
5757 # Enable rst2pdf extension modules (default is only vectorpdf)
5858 # you need vectorpdf if you want to use sphinx's graphviz support
59 -pdf_extensions = ['inkscape', 'vectorpdf']
60 +# pdf_extensions = ['inkscape', 'vectorpdf']
59 -pdf_extensions = []
60 +# pdf_extensions = []
6161
6262 # Page template name for "regular" pages
6363 # pdf_page_template = 'cutePage'
66 1 file changed, 3 insertions(+), 3 deletions(-)
77
88 diff --git a/setup.py b/setup.py
9 index de19937..70c2266 100644
9 index 519ef2d..5855cac 100644
1010 --- a/setup.py
1111 +++ b/setup.py
12 @@ -154,8 +154,8 @@ try:
12 @@ -152,8 +152,8 @@ try:
1313 # make sure the python path is pointing to the newly built
1414 # code so that the documentation is built on this and not a
1515 # previously installed version
2020 try:
2121 sphinx.setup_command.BuildDoc.run(self)
2222 except UnicodeDecodeError:
23 @@ -164,7 +164,7 @@ try:
23 @@ -162,7 +162,7 @@ try:
2424 " source path with non-ASCII characters. Please"
2525 " try to move the source package to another"
2626 " location (path with *only* ASCII characters)")
66 1 file changed, 5 insertions(+)
77
88 diff --git a/doc/source/conf.py b/doc/source/conf.py
9 index ce7bc8f..a52001e 100644
9 index cc1dde6..fb52bcd 100644
1010 --- a/doc/source/conf.py
1111 +++ b/doc/source/conf.py
12 @@ -241,6 +241,11 @@ man_pages = [
12 @@ -240,6 +240,11 @@ man_pages = [
1313 # man_show_urls = False
1414
1515
+0
-23
debian/patches/0005-workaround-bug-in-scipy-1.5.0.patch less more
0 From: Dominik Kriegner <dominik.kriegner@gmail.com>
1 Date: Wed, 5 Aug 2020 18:25:13 +0200
2 Subject: workaround bug in scipy >= 1.5.0
3
4 ---
5 lib/xrayutilities/q2ang_fit.py | 4 +++-
6 1 file changed, 3 insertions(+), 1 deletion(-)
7
8 diff --git a/lib/xrayutilities/q2ang_fit.py b/lib/xrayutilities/q2ang_fit.py
9 index e9a190d..1cb6798 100644
10 --- a/lib/xrayutilities/q2ang_fit.py
11 +++ b/lib/xrayutilities/q2ang_fit.py
12 @@ -69,7 +69,9 @@ def _makebounds(boundsin):
13 else:
14 raise InputError('bound values must have two or one elements')
15 elif isinstance(b, numbers.Number):
16 - boundsout.append((b, b)) # variable fixed
17 + # boundsout.append((b, b)) # variable fixed
18 + # due to a bug in scipy >= 1.5.0 we need to allow a small variation
19 + boundsout.append((b-config.EPSILON, b+config.EPSILON))
20 elif b is None:
21 boundsout.append((None, None)) # no bound
22 else:
+0
-74
debian/patches/0006-issue-101-convert-to-scipy.optimize.Bounds-and-circu.patch less more
0 From: Dominik Kriegner <dominik.kriegner@gmail.com>
1 Date: Thu, 6 Aug 2020 15:33:53 +0200
2 Subject: issue #101: convert to scipy.optimize.Bounds and circumvent scipy
3 bug
4
5 ---
6 lib/xrayutilities/q2ang_fit.py | 24 ++++++++++++++++--------
7 1 file changed, 16 insertions(+), 8 deletions(-)
8
9 diff --git a/lib/xrayutilities/q2ang_fit.py b/lib/xrayutilities/q2ang_fit.py
10 index 1cb6798..8d6dcb3 100644
11 --- a/lib/xrayutilities/q2ang_fit.py
12 +++ b/lib/xrayutilities/q2ang_fit.py
13 @@ -59,25 +59,32 @@ def _makebounds(boundsin):
14 bounds to be handed over to the scipy.minimize routine. The function
15 will expand fixed values to two equal bounds
16 """
17 - boundsout = []
18 + lb = []
19 + ub = []
20 for b in boundsin:
21 if isinstance(b, (tuple, list, numpy.ndarray)):
22 if len(b) == 2:
23 - boundsout.append((b[0], b[1]))
24 + lb.append(b[0])
25 + ub.append(b[1])
26 elif len(b) == 1:
27 - boundsout.append((b[0], b[0]))
28 + # due to a bug in scipy >= 1.5.0 we need to allow a small
29 + # variation
30 + lb.append(b[0]-1000*config.EPSILON)
31 + ub.append(b[0]+1000*config.EPSILON)
32 else:
33 raise InputError('bound values must have two or one elements')
34 elif isinstance(b, numbers.Number):
35 # boundsout.append((b, b)) # variable fixed
36 # due to a bug in scipy >= 1.5.0 we need to allow a small variation
37 - boundsout.append((b-config.EPSILON, b+config.EPSILON))
38 + lb.append(b-1000*config.EPSILON)
39 + ub.append(b+1000*config.EPSILON)
40 elif b is None:
41 - boundsout.append((None, None)) # no bound
42 + lb.append(-np.inf)
43 + ub.append(np.inf)
44 else:
45 raise InputError('bound value is of invalid type (%s)' % type(b))
46
47 - return tuple(boundsout)
48 + return scipy.optimize.Bounds(lb, ub)
49
50
51 def _errornorm_q2ang(angles, qvec, hxrd, U=numpy.identity(3)):
52 @@ -204,10 +211,11 @@ def Q2AngFit(qvec, expclass, bounds=None, ormat=numpy.identity(3),
53 elif len(bounds) != nangles:
54 raise ValueError("XU.Q2AngFit: number of specified bounds invalid")
55
56 + sbounds = _makebounds(bounds)
57 # perform optimization
58 res = scipy.optimize.minimize(_errornorm_q2ang, start,
59 args=(lqvec, expclass, ormat),
60 - method='SLSQP', bounds=_makebounds(bounds),
61 + method='SLSQP', bounds=sbounds,
62 constraints=constraints,
63 options={'maxiter': 1000,
64 'eps': config.EPSILON,
65 @@ -221,7 +229,7 @@ def Q2AngFit(qvec, expclass, bounds=None, ormat=numpy.identity(3),
66 res = scipy.optimize.minimize(_errornorm_q2ang, res.x,
67 args=(lqvec, expclass, ormat),
68 method='SLSQP',
69 - bounds=_makebounds(bounds),
70 + bounds=sbounds,
71 constraints=constraints,
72 options={'maxiter': 1000,
73 'eps': config.EPSILON,
11 0002-Desactivated-pdf-generation-for-the-doc.patch
22 0003-Do-not-change-PYTHONPATH-during-the-build.patch
33 0004-Used-the-system-Mathjax.patch
4 0005-workaround-bug-in-scipy-1.5.0.patch
5 0006-issue-101-convert-to-scipy.optimize.Bounds-and-circu.patch