Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 0.5.12 #124

Merged
merged 8 commits into from
Jan 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "xcoll"
version = "0.5.11"
version = "0.5.12"
description = "Xsuite collimation package"
homepage = "https://github.com/xsuite/xcoll"
repository = "https://github.com/xsuite/xcoll"
Expand All @@ -25,14 +25,14 @@ python = ">=3.8"
ruamel-yaml = { version = "^0.17.31", optional = true }
numpy = ">=1.0"
pandas = ">=1.4"
xobjects = ">=0.4.5"
xdeps = ">=0.8.1"
xobjects = ">=0.4.6"
xdeps = ">=0.8.4"
xpart = ">=0.19.3"
xtrack = ">=0.70.3"
xtrack = ">=0.72.2"

[tool.poetry.dev-dependencies]
pytest = ">=7.3"
xaux = ">=0.2.1"
xaux = ">=0.2.2"

[tool.poetry.extras]
tests = ["pytest", "ruamel-yaml", "pytest-html", "pytest-xdist"]
Expand Down
4 changes: 2 additions & 2 deletions tests/data/all_tests.list
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@ tests/test_jaw_and_gaps.py::test_gaps[B1-ContextCpu]
tests/test_jaw_and_gaps.py::test_gaps[B1-ContextCpu:auto]
tests/test_jaw_and_gaps.py::test_gaps[B2-ContextCpu]
tests/test_jaw_and_gaps.py::test_gaps[B2-ContextCpu:auto]
tests/test_lossmap.py::test_run_lossmap[B1-ContextCpu]
tests/test_lossmap.py::test_run_lossmap[B1-ContextCpu:auto]
tests/test_lossmap.py::test_run_lossmap[B1H-ContextCpu]
tests/test_lossmap.py::test_run_lossmap[B1H-ContextCpu:auto]
tests/test_lossmap.py::test_run_lossmap[B2V-ContextCpu]
tests/test_lossmap.py::test_run_lossmap[B2V-ContextCpu:auto]
tests/test_lossmap.py::test_run_lossmap[B1V_crystals-ContextCpu]
Expand Down
2 changes: 1 addition & 1 deletion tests/test_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
from xcoll import __version__

def test_version():
assert __version__ == '0.5.11'
assert __version__ == '0.5.12'
2 changes: 1 addition & 1 deletion xcoll/general.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@
# ======================
# Do not change
# ======================
__version__ = '0.5.11'
__version__ = '0.5.12'
# ======================
4 changes: 2 additions & 2 deletions xcoll/headers/particle_states.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
#define XC_LOST_ON_EVEREST_COLL -331
#define XC_LOST_ON_EVEREST_CRYSTAL -332
#define XC_LOST_ON_FLUKA_BLOCK -333
#define XC_LOST_ON_FLUKA -334
#define XC_LOST_ON_FLUKA_COLL -334
#define XC_LOST_ON_FLUKA_CRYSTAL -335
#define XC_LOST_ON_GEANT4_BLOCK -336
#define XC_LOST_ON_GEANT4 -337
#define XC_LOST_ON_GEANT4_COLL -337
#define XC_LOST_ON_GEANT4_CRYSTAL -338
#define XC_LOST_ON_ABSORBER -340

Expand Down
24 changes: 10 additions & 14 deletions xcoll/initial_distribution.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,25 +187,21 @@ def _generate_4D_pencil_one_jaw(line, name, num_particles, plane, side, impact_p
coll = line[name]

if side == '+':
if is_converging:
if isinstance(coll, EverestCrystal):
pencil_pos = coll.jaw_U + impact_parameter
else:
pencil_pos = coll.jaw_LU + impact_parameter
if isinstance(coll, EverestCrystal):
# A pencil on the crystal should always be upstream
pencil_pos = coll.jaw_U + impact_parameter
else:
if isinstance(coll, EverestCrystal):
pencil_pos = coll.jaw_D - impact_parameter
if is_converging:
pencil_pos = coll.jaw_LU + impact_parameter
else:
pencil_pos = coll.jaw_LD + impact_parameter
elif side == '-':
if is_converging:
if isinstance(coll, EverestCrystal):
pencil_pos = coll.jaw_U - impact_parameter
else:
pencil_pos = coll.jaw_RU - impact_parameter
if isinstance(coll, EverestCrystal):
# A pencil on the crystal should always be upstream
pencil_pos = coll.jaw_U - impact_parameter
else:
if isinstance(coll, EverestCrystal):
pencil_pos = coll.jaw_D + impact_parameter
if is_converging:
pencil_pos = coll.jaw_RU - impact_parameter
else:
pencil_pos = coll.jaw_RD - impact_parameter

Expand Down
1 change: 0 additions & 1 deletion xcoll/line_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ def install(self, names, elements, *, at_s=None, apertures=None, need_apertures=

# Verify elements
for el in elements:
print(el.__class__)
assert isinstance(el, block_classes)
el._tracking = False

Expand Down
Loading