Skip to content

Commit a85d0ea

Browse files
authored
Merge pull request #112 from PyCOMPLETE/release/v1.14.0
Release/v1.14.0
2 parents 85242b0 + d8598e3 commit a85d0ea

File tree

172 files changed

+29239
-1162
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

172 files changed

+29239
-1162
lines changed

PyHEADTAIL/__init__.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,11 @@
2222
from ._version import __version__
2323
dirty = False
2424

25-
print ('PyHEADTAIL v' + __version__)
25+
print(('PyHEADTAIL v' + __version__))
2626
if dirty:
2727
print ('(dirty git work tree)')
2828
print ('\n')
2929

30-
from .general.element import Element, Printing
31-
from .general import utils
3230
# print ' '
3331
# print ' ;Cfttttt11111111tttt1f0f. '
3432
# print ' ,GttttfG0GGG00000GGG0G0G0G0G0G0Ct1t1fG: '

PyHEADTAIL/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = '1.13.5'
1+
__version__ = '1.14.0'

PyHEADTAIL/aperture/__init__.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1 @@
1-
from .. import Element
2-
from ..particles.slicing import clean_slices
3-
from .. import __version__
41

PyHEADTAIL/aperture/aperture.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
from __future__ import division
21
'''
32
Aperture module to manage particle losses. An aperture is
43
defined as a condition on the phase space coordinates. Particles
@@ -11,26 +10,26 @@
1110
Michael Schenk
1211
'''
1312

14-
from . import Element, clean_slices
1513

16-
from abc import ABCMeta, abstractmethod
1714

18-
from ..general import pmath as pm
1915
import numpy as np
16+
from abc import ABCMeta, abstractmethod
17+
18+
from PyHEADTAIL.general.element import Element, Printing
19+
from PyHEADTAIL.general import pmath as pm
20+
from PyHEADTAIL.particles.slicing import clean_slices
2021

2122
def make_int32(array):
2223
return array.astype(np.int32)
2324

2425

25-
class Aperture(Element):
26+
class Aperture(Element, metaclass=ABCMeta):
2627
'''Abstract base class for Aperture elements. An aperture is
2728
generally defined as a condition on the phase space coordinates.
2829
Particles not fulfilling this condition are tagged as lost and
2930
are removed from the beam directly after.
3031
'''
3132

32-
__metaclass__ = ABCMeta
33-
3433
@clean_slices
3534
def track(self, beam):
3635
'''Tag particles not passing through the aperture as lost. If

PyHEADTAIL/aperture/aperture_cython.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ cimport cython
1717
import numpy as np
1818
cimport numpy as np
1919

20-
import aperture
20+
import PyHEADTAIL.aperture.aperture as aperture
2121

2222
class Aperture(aperture.Aperture):
2323
'''Pendant to aperture.Aperture with the relocate algorithm
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +0,0 @@
1-
from .. import __version__

PyHEADTAIL/cobra_functions/curve_tools.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from __future__ import division
1+
22

33
import numpy as np
44
from scipy.optimize import brentq
@@ -20,4 +20,4 @@ def extrema(x, y=None):
2020
zix = np.where(np.abs(np.diff(np.sign(np.diff(x)))) == 2)[0]
2121
return zix
2222
if not y:
23-
print zix
23+
print(zix)

PyHEADTAIL/cobra_functions/pdf_integrators_2d.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
@date 21.06.2017
44
@brief 2D distribution integration methods for y(x) parametrised domains
55
'''
6-
from scipy.integrate import quad, dblquad, cumtrapz, romb
76

87
import numpy as np
8+
from scipy.integrate import quad, dblquad, cumtrapz, romb
99

1010

1111
def quad2d(f, ylimits, xmin, xmax):

PyHEADTAIL/cobra_functions/stats.pyx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
of bunch and slice_set data.
66
@copyright CERN
77
"""
8+
89
import numpy as np
910
cimport numpy as np
1011
cimport libc.math as cmath

PyHEADTAIL/feedback/__init__.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +0,0 @@
1-
from .. import __version__
2-
from .. import Element

0 commit comments

Comments
 (0)