Skip to content

Commit eef90a3

Browse files
authored
Merge pull request #145 from xsuite/release/v0.6.0
Release 0.6.0
2 parents 3666771 + fe091a3 commit eef90a3

File tree

106 files changed

+3535
-1599
lines changed

Some content is hidden

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

106 files changed

+3535
-1599
lines changed

examples/everest_collimator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
TCPH = xc.EverestCollimator(length=0.6, gap=5, material=xc.materials.MolybdenumGraphite, emittance=3.5e-6)
3434
TCPV = xc.EverestCollimator(length=0.6, gap=5, material=xc.materials.MolybdenumGraphite, angle=90, emittance=3.5e-6)
3535
TCPS = xc.EverestCollimator(length=0.6, gap=5, material=xc.materials.Carbon, angle=127.5, emittance=3.5e-6)
36-
xc.install_elements(line, ['tcp.c6l7.b1', 'tcp.d6l7.b1', 'tcp.b6l7.b1'], [TCPH, TCPV, TCPS], need_apertures=False)
36+
line.collimators.install(['tcp.c6l7.b1', 'tcp.d6l7.b1', 'tcp.b6l7.b1'], [TCPH, TCPV, TCPS], need_apertures=False)
3737

3838

3939
# Aperture model check

examples/lhc_run3_lossmap.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
from pathlib import Path
88
import time
99
start_time = time.time()
10+
import matplotlib.pyplot as plt
1011

1112
import xobjects as xo
1213
import xtrack as xt
@@ -93,3 +94,5 @@
9394

9495
print(f"Total calculation time {time.time()-start_time}s")
9596

97+
ThisLM.plot()
98+
plt.show()

examples/lhc_run3_lossmap_with_blowup.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55

66
import numpy as np
77
from pathlib import Path
8-
import matplotlib.pyplot as plt
98
import time
109
start_time = time.time()
10+
import matplotlib.pyplot as plt
1111

1212
import xobjects as xo
1313
import xtrack as xt
@@ -115,8 +115,12 @@
115115

116116
print(f"Total calculation time {time.time()-start_time}s")
117117

118+
ThisLM.plot()
119+
plt.show()
120+
121+
118122
# Plot
119-
collimators_with_most_losses = ThisLM.summary.sort_values('nabs', ascending=False).collname.values[:5]
123+
collimators_with_most_losses = ThisLM.summary.sort_values('n', ascending=False).name.values[:5]
120124

121125
bin_centers = {}
122126
losses = {}

examples/lhc_run3_lossmap_with_crystals.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
from pathlib import Path
88
import time
99
start_time = time.time()
10+
import matplotlib.pyplot as plt
1011

1112
import xobjects as xo
1213
import xpart as xp
@@ -140,3 +141,5 @@
140141

141142
print(f"Total calculation time {time.time()-start_time}s")
142143

144+
ThisLM.plot()
145+
plt.show()

examples/lhc_run3_offmomentum_lossmap.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
import numpy as np
77
from pathlib import Path
88
import time
9-
import matplotlib.pyplot as plt
109
start_time = time.time()
10+
import matplotlib.pyplot as plt
1111

1212
import xobjects as xo
1313
import xtrack as xt
@@ -143,3 +143,5 @@
143143

144144
print(f"Total calculation time {time.time()-start_time}s")
145145

146+
ThisLM.plot()
147+
plt.show()

examples/machines/madx_to_xsuite_sequence.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
line = xt.Line.from_madx_sequence(mad.sequence[sequence], apply_madx_errors=True, install_apertures=True)
2626
print(f"Imported {len(line.element_names)} elements.")
27-
line.particle_ref = xp.Particles(mass0=xp.PROTON_MASS_EV, gamma0=mad.sequence[sequence].beam.gamma)
27+
line.particle_ref = xp.Particles(mass0=xp.PROTON_MASS_EV, pdg_id=2212, gamma0=mad.sequence[sequence].beam.gamma)
2828

2929

3030
# Elements to keep

pyproject.toml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "xcoll"
3-
version = "0.5.12"
3+
version = "0.6.0"
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.6"
29-
xdeps = ">=0.8.4"
30-
xpart = ">=0.19.3"
31-
xtrack = ">=0.72.2"
28+
xobjects = ">=0.5.0"
29+
xdeps = ">=0.10.5"
30+
xpart = ">=0.23.0"
31+
xtrack = ">=0.84.5"
3232

33-
[tool.poetry.dev-dependencies]
33+
[poetry.group.dev.dependencies]
3434
pytest = ">=7.3"
35-
xaux = ">=0.2.2"
35+
xaux = ">=0.3.5"
3636

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

tests/data/all_tests.list

Lines changed: 48 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -119,14 +119,54 @@ 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[B1H-ContextCpu]
123-
tests/test_lossmap.py::test_run_lossmap[B1H-ContextCpu:auto]
124-
tests/test_lossmap.py::test_run_lossmap[B2V-ContextCpu]
125-
tests/test_lossmap.py::test_run_lossmap[B2V-ContextCpu:auto]
126-
tests/test_lossmap.py::test_run_lossmap[B1V_crystals-ContextCpu]
127-
tests/test_lossmap.py::test_run_lossmap[B1V_crystals-ContextCpu:auto]
128-
tests/test_lossmap.py::test_run_lossmap[B2H_crystals-ContextCpu]
129-
tests/test_lossmap.py::test_run_lossmap[B2H_crystals-ContextCpu:auto]
122+
tests/test_jaw_position.py::test_everest[symmetric-0-no_tilt]
123+
tests/test_jaw_position.py::test_everest[symmetric-0-positive_tilt]
124+
tests/test_jaw_position.py::test_everest[symmetric-0-pos_neg_tilt]
125+
tests/test_jaw_position.py::test_everest[symmetric-90-no_tilt]
126+
tests/test_jaw_position.py::test_everest[symmetric-90-positive_tilt]
127+
tests/test_jaw_position.py::test_everest[symmetric-90-pos_neg_tilt]
128+
tests/test_jaw_position.py::test_everest[symmetric-127.5-no_tilt]
129+
tests/test_jaw_position.py::test_everest[symmetric-127.5-positive_tilt]
130+
tests/test_jaw_position.py::test_everest[symmetric-127.5-pos_neg_tilt]
131+
tests/test_jaw_position.py::test_everest[asymmetric-0-no_tilt]
132+
tests/test_jaw_position.py::test_everest[asymmetric-0-positive_tilt]
133+
tests/test_jaw_position.py::test_everest[asymmetric-0-pos_neg_tilt]
134+
tests/test_jaw_position.py::test_everest[asymmetric-90-no_tilt]
135+
tests/test_jaw_position.py::test_everest[asymmetric-90-positive_tilt]
136+
tests/test_jaw_position.py::test_everest[asymmetric-90-pos_neg_tilt]
137+
tests/test_jaw_position.py::test_everest[asymmetric-127.5-no_tilt]
138+
tests/test_jaw_position.py::test_everest[asymmetric-127.5-positive_tilt]
139+
tests/test_jaw_position.py::test_everest[asymmetric-127.5-pos_neg_tilt]
140+
tests/test_jaw_position.py::test_everest[negative-0-no_tilt]
141+
tests/test_jaw_position.py::test_everest[negative-0-positive_tilt]
142+
tests/test_jaw_position.py::test_everest[negative-0-pos_neg_tilt]
143+
tests/test_jaw_position.py::test_everest[negative-90-no_tilt]
144+
tests/test_jaw_position.py::test_everest[negative-90-positive_tilt]
145+
tests/test_jaw_position.py::test_everest[negative-90-pos_neg_tilt]
146+
tests/test_jaw_position.py::test_everest[negative-127.5-no_tilt]
147+
tests/test_jaw_position.py::test_everest[negative-127.5-positive_tilt]
148+
tests/test_jaw_position.py::test_everest[negative-127.5-pos_neg_tilt]
149+
tests/test_jaw_position.py::test_everest[positive-0-no_tilt]
150+
tests/test_jaw_position.py::test_everest[positive-0-positive_tilt]
151+
tests/test_jaw_position.py::test_everest[positive-0-pos_neg_tilt]
152+
tests/test_jaw_position.py::test_everest[positive-90-no_tilt]
153+
tests/test_jaw_position.py::test_everest[positive-90-positive_tilt]
154+
tests/test_jaw_position.py::test_everest[positive-90-pos_neg_tilt]
155+
tests/test_jaw_position.py::test_everest[positive-127.5-no_tilt]
156+
tests/test_jaw_position.py::test_everest[positive-127.5-positive_tilt]
157+
tests/test_jaw_position.py::test_everest[positive-127.5-pos_neg_tilt]
158+
tests/test_line_tools.py::test_line_accessor[1-ContextCpu]
159+
tests/test_line_tools.py::test_line_accessor[1-ContextCpu:auto]
160+
tests/test_line_tools.py::test_line_accessor[2-ContextCpu]
161+
tests/test_line_tools.py::test_line_accessor[2-ContextCpu:auto]
162+
tests/test_lossmap.py::test_lossmap_everest[B1H-ContextCpu]
163+
tests/test_lossmap.py::test_lossmap_everest[B1H-ContextCpu:auto]
164+
tests/test_lossmap.py::test_lossmap_everest[B2V-ContextCpu]
165+
tests/test_lossmap.py::test_lossmap_everest[B2V-ContextCpu:auto]
166+
tests/test_lossmap.py::test_lossmap_everest[B1V_crystals-ContextCpu]
167+
tests/test_lossmap.py::test_lossmap_everest[B1V_crystals-ContextCpu:auto]
168+
tests/test_lossmap.py::test_lossmap_everest[B2H_crystals-ContextCpu]
169+
tests/test_lossmap.py::test_lossmap_everest[B2H_crystals-ContextCpu:auto]
130170
tests/test_rf_sweep.py::test_rf_sweep[DP pos-ContextCpu]
131171
tests/test_rf_sweep.py::test_rf_sweep[DP pos-ContextCpu:auto]
132172
tests/test_rf_sweep.py::test_rf_sweep[DP neg-ContextCpu]

tests/data_test_everest/Ref/tcl.4l1.b2.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

tests/data_test_everest/Ref/tcl.4l5.b2.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)