Skip to content

Commit 3666771

Browse files
authored
Merge pull request #124 from xsuite/release/v0.5.12
Release 0.5.12
2 parents 08a6071 + ba556ce commit 3666771

File tree

10 files changed

+542
-27
lines changed

10 files changed

+542
-27
lines changed

pyproject.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "xcoll"
3-
version = "0.5.11"
3+
version = "0.5.12"
44
description = "Xsuite collimation package"
55
homepage = "https://github.com/xsuite/xcoll"
66
repository = "https://github.com/xsuite/xcoll"
@@ -25,14 +25,14 @@ python = ">=3.8"
2525
ruamel-yaml = { version = "^0.17.31", optional = true }
2626
numpy = ">=1.0"
2727
pandas = ">=1.4"
28-
xobjects = ">=0.4.5"
29-
xdeps = ">=0.8.1"
28+
xobjects = ">=0.4.6"
29+
xdeps = ">=0.8.4"
3030
xpart = ">=0.19.3"
31-
xtrack = ">=0.70.3"
31+
xtrack = ">=0.72.2"
3232

3333
[tool.poetry.dev-dependencies]
3434
pytest = ">=7.3"
35-
xaux = ">=0.2.1"
35+
xaux = ">=0.2.2"
3636

3737
[tool.poetry.extras]
3838
tests = ["pytest", "ruamel-yaml", "pytest-html", "pytest-xdist"]

tests/data/all_tests.list

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,8 @@ tests/test_jaw_and_gaps.py::test_gaps[B1-ContextCpu]
119119
tests/test_jaw_and_gaps.py::test_gaps[B1-ContextCpu:auto]
120120
tests/test_jaw_and_gaps.py::test_gaps[B2-ContextCpu]
121121
tests/test_jaw_and_gaps.py::test_gaps[B2-ContextCpu:auto]
122-
tests/test_lossmap.py::test_run_lossmap[B1-ContextCpu]
123-
tests/test_lossmap.py::test_run_lossmap[B1-ContextCpu:auto]
122+
tests/test_lossmap.py::test_run_lossmap[B1H-ContextCpu]
123+
tests/test_lossmap.py::test_run_lossmap[B1H-ContextCpu:auto]
124124
tests/test_lossmap.py::test_run_lossmap[B2V-ContextCpu]
125125
tests/test_lossmap.py::test_run_lossmap[B2V-ContextCpu:auto]
126126
tests/test_lossmap.py::test_run_lossmap[B1V_crystals-ContextCpu]

tests/test_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
from xcoll import __version__
77

88
def test_version():
9-
assert __version__ == '0.5.11'
9+
assert __version__ == '0.5.12'

xcoll/general.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@
1212
# ======================
1313
# Do not change
1414
# ======================
15-
__version__ = '0.5.11'
15+
__version__ = '0.5.12'
1616
# ======================

xcoll/headers/particle_states.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010
#define XC_LOST_ON_EVEREST_COLL -331
1111
#define XC_LOST_ON_EVEREST_CRYSTAL -332
1212
#define XC_LOST_ON_FLUKA_BLOCK -333
13-
#define XC_LOST_ON_FLUKA -334
13+
#define XC_LOST_ON_FLUKA_COLL -334
1414
#define XC_LOST_ON_FLUKA_CRYSTAL -335
1515
#define XC_LOST_ON_GEANT4_BLOCK -336
16-
#define XC_LOST_ON_GEANT4 -337
16+
#define XC_LOST_ON_GEANT4_COLL -337
1717
#define XC_LOST_ON_GEANT4_CRYSTAL -338
1818
#define XC_LOST_ON_ABSORBER -340
1919

xcoll/initial_distribution.py

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -187,25 +187,21 @@ def _generate_4D_pencil_one_jaw(line, name, num_particles, plane, side, impact_p
187187
coll = line[name]
188188

189189
if side == '+':
190-
if is_converging:
191-
if isinstance(coll, EverestCrystal):
192-
pencil_pos = coll.jaw_U + impact_parameter
193-
else:
194-
pencil_pos = coll.jaw_LU + impact_parameter
190+
if isinstance(coll, EverestCrystal):
191+
# A pencil on the crystal should always be upstream
192+
pencil_pos = coll.jaw_U + impact_parameter
195193
else:
196-
if isinstance(coll, EverestCrystal):
197-
pencil_pos = coll.jaw_D - impact_parameter
194+
if is_converging:
195+
pencil_pos = coll.jaw_LU + impact_parameter
198196
else:
199197
pencil_pos = coll.jaw_LD + impact_parameter
200198
elif side == '-':
201-
if is_converging:
202-
if isinstance(coll, EverestCrystal):
203-
pencil_pos = coll.jaw_U - impact_parameter
204-
else:
205-
pencil_pos = coll.jaw_RU - impact_parameter
199+
if isinstance(coll, EverestCrystal):
200+
# A pencil on the crystal should always be upstream
201+
pencil_pos = coll.jaw_U - impact_parameter
206202
else:
207-
if isinstance(coll, EverestCrystal):
208-
pencil_pos = coll.jaw_D + impact_parameter
203+
if is_converging:
204+
pencil_pos = coll.jaw_RU - impact_parameter
209205
else:
210206
pencil_pos = coll.jaw_RD - impact_parameter
211207

xcoll/line_tools.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ def install(self, names, elements, *, at_s=None, apertures=None, need_apertures=
7878

7979
# Verify elements
8080
for el in elements:
81-
print(el.__class__)
8281
assert isinstance(el, block_classes)
8382
el._tracking = False
8483

0 commit comments

Comments
 (0)