xcoll 0.6.5__py3-none-any.whl → 0.6.7__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of xcoll might be problematic. Click here for more details.

xcoll/colldb.py CHANGED
@@ -36,7 +36,7 @@ def _dict_keys_to_lower(dct):
36
36
  else:
37
37
  return dct
38
38
 
39
-
39
+ # TODO: need better handling of beam argument (not hardcoded 'b1' and 'b2' strings)
40
40
  def _get_coll_dct_by_beam(coll, beam):
41
41
  # The dictionary can be a CollimatorDatabase for a single beam (beam=None)
42
42
  # or for both beams (beam='b1' or beam='b2)
@@ -51,7 +51,7 @@ def _get_coll_dct_by_beam(coll, beam):
51
51
  raise ValueError("Need to specify a beam, because the given dict is for both beams!")
52
52
  return coll[beam]
53
53
 
54
- elif len(beam_in_db) == 1:
54
+ elif len(beam_in_db) == 1 and beam_in_db[0].lower() in ['b1','b2']:
55
55
  if beam is None:
56
56
  beam = beam_in_db[0].lower()
57
57
  elif beam != beam_in_db[0].lower():
@@ -551,7 +551,8 @@ class CollimatorDatabase:
551
551
  prop_dict.update(kwargs)
552
552
  el = cls(**prop_dict)
553
553
  el.emittance = [self.nemitt_x, self.nemitt_y]
554
- if 'family' in self[name] and self[name]['family'].lower() != 'unknown':
554
+ if 'family' in self[name] and self[name]['family'] \
555
+ and self[name]['family'].lower() != 'unknown':
555
556
  if self[name]['family'] == name:
556
557
  raise ValueError(f"Collimator {name} has the same name as its family!")
557
558
  el.family = self[name]['family']
xcoll/general.py CHANGED
@@ -12,5 +12,5 @@ citation = "F.F. Van der Veken, et al.: Recent Developments with the New Tools f
12
12
  # ======================
13
13
  # Do not change
14
14
  # ======================
15
- __version__ = '0.6.5'
15
+ __version__ = '0.6.7'
16
16
  # ======================
@@ -1,8 +1,10 @@
1
- Metadata-Version: 2.3
1
+ Metadata-Version: 2.4
2
2
  Name: xcoll
3
- Version: 0.6.5
3
+ Version: 0.6.7
4
4
  Summary: Xsuite collimation package
5
5
  License: Apache-2.0
6
+ License-File: LICENSE
7
+ License-File: NOTICE
6
8
  Author: Frederik F. Van der Veken
7
9
  Author-email: frederik@cern.ch
8
10
  Requires-Python: >=3.10
@@ -12,6 +14,7 @@ Classifier: Programming Language :: Python :: 3.10
12
14
  Classifier: Programming Language :: Python :: 3.11
13
15
  Classifier: Programming Language :: Python :: 3.12
14
16
  Classifier: Programming Language :: Python :: 3.13
17
+ Classifier: Programming Language :: Python :: 3.14
15
18
  Provides-Extra: tests
16
19
  Requires-Dist: numpy (>=1.0)
17
20
  Requires-Dist: pandas (>=1.4)
@@ -20,9 +23,9 @@ Requires-Dist: pytest-html ; extra == "tests"
20
23
  Requires-Dist: pytest-xdist ; extra == "tests"
21
24
  Requires-Dist: ruamel-yaml (>=0.17.31,<0.18.15)
22
25
  Requires-Dist: xdeps (>=0.10.6)
23
- Requires-Dist: xobjects (>=0.5.2)
26
+ Requires-Dist: xobjects (>=0.5.3)
24
27
  Requires-Dist: xpart (>=0.23.1)
25
- Requires-Dist: xtrack (>=0.90.1)
28
+ Requires-Dist: xtrack (>=0.93.0)
26
29
  Project-URL: Bug Tracker, https://github.com/xsuite/xsuite/issues
27
30
  Project-URL: Documentation, https://xsuite.readthedocs.io/
28
31
  Project-URL: Homepage, https://github.com/xsuite/xcoll
@@ -10,17 +10,13 @@ xcoll/beam_elements/elements_src/emittance_monitor.h,sha256=vlHzQFoUjKQHWBmzpaSz
10
10
  xcoll/beam_elements/elements_src/everest_block.h,sha256=ITSzfiqwm8ZNIkAj_odQkAjKhPcdT8b0AUlq_uxtsqI,6562
11
11
  xcoll/beam_elements/elements_src/everest_collimator.h,sha256=fkD5GazVv2zlmqyb6s9zVNMq6baXeFb_pf7gg9TKjNc,9787
12
12
  xcoll/beam_elements/elements_src/everest_crystal.h,sha256=LISp_9NEWMIi5GvZ3LwPfeSbmsbXvHWcTqxW6eCCsiE,11951
13
- xcoll/beam_elements/elements_src/rf_sweep.h,sha256=eTPPSJvFrkoh9STI0hmmiozwMUL-TQVhz1mOZQhObWE,846
14
13
  xcoll/beam_elements/elements_src/transparent_collimator.h,sha256=pA_Fxx85N87iSbpHSjR2OSOx6JN9e38T1pOUKrC7zxs,4610
15
14
  xcoll/beam_elements/elements_src/transparent_crystal.h,sha256=DGX4uL0hpm4njOypoPuEWtMzYxnL9jQkf2ZrGaS0alI,4128
16
15
  xcoll/beam_elements/everest.py,sha256=iJva_S0OQnmG-qj7rIAiUCssu5WL_Qs5P_n6Qx-IWzo,9080
17
16
  xcoll/beam_elements/monitor.py,sha256=baMYT_PNya8KX35ReeMwk5Cm04ePUqiDF_s69L5GTX0,16968
18
- xcoll/beam_elements/sweep.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
19
17
  xcoll/beam_elements/transparent.py,sha256=AZOWfH3dvsetL6DjQGejUgX7T18e_3omIIffG_1gwc0,2894
20
- xcoll/colldb.py,sha256=WaJC6gkDNVvxo65OhucTM6Fwo6pgRFHNnBnHSkiX7AQ,31054
21
- xcoll/general.py,sha256=RyE6HAGBJF0DRK5n4X3-2o4fbRQwBZIV-LRjUo5-n8A,534
22
- xcoll/general.py.orig,sha256=vIx4LhKIwbjcC8cyk6wtxrjuihDEF1THgzwb7_dpgJU,609
23
- xcoll/geometry.md,sha256=AARDOk5lZWFBAllX75UYMRywSYSB04FIlYWE0ra1t5c,1623
18
+ xcoll/colldb.py,sha256=4QwvWH-KYTa6xyaVS7Y8S473T6RHXOER8B2xZjeNahI,31213
19
+ xcoll/general.py,sha256=NYF0rBViyMS_GaNBuPF8_Me6rLrMZBwn6npYxpLSLG0,534
24
20
  xcoll/headers/checks.h,sha256=qdXsOTBOK1MwW6bdFF93j4yE648mcDtEv5rGN1w9sfk,1582
25
21
  xcoll/headers/particle_states.py,sha256=N8ehLtg99358I4RGCJ3sjuKCk2LVdGqgVx2xGoHrRdM,1959
26
22
  xcoll/initial_distribution.py,sha256=CHhqeCVjVOyaBWhfy2sDgLwIgtXZoqcTW-su-M2YByE,10989
@@ -61,9 +57,9 @@ xcoll/scattering_routines/geometry/rotation.h,sha256=lO3RaQBys9r0ROMjR8T8Rr7UsIE
61
57
  xcoll/scattering_routines/geometry/segments.h,sha256=7nKnnin2ByxkKyaYwGvFaqgLQg5uBba4CdLHL7L3iQs,7667
62
58
  xcoll/scattering_routines/geometry/sort.h,sha256=b1MkFO2ddzv1fWGeQzsLuz46qo2pKyRSXHjoAEVU7Ts,5763
63
59
  xcoll/xaux.py,sha256=mh4E_jhaUFm2LOKawJ0b6X4zuz8JiJhx6w7GcnRgIXQ,2291
64
- xcoll-0.6.5.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
65
- xcoll-0.6.5.dist-info/METADATA,sha256=3HdRmdvs2oyskur291fR-oZf2lbRZAIRoX6fNyY0iuA,2953
66
- xcoll-0.6.5.dist-info/NOTICE,sha256=6DO_E7WCdRKc42vUoVVBPGttvQi4mRt9fAcxj9u8zy8,74
67
- xcoll-0.6.5.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
68
- xcoll-0.6.5.dist-info/entry_points.txt,sha256=fC9oojAU6WjKujnGBodo7ZcEeBGfSfeLPO5287echdY,26
69
- xcoll-0.6.5.dist-info/RECORD,,
60
+ xcoll-0.6.7.dist-info/METADATA,sha256=-8wXPMjf3s99eSTuM08jv9pYu1rkts0MRDrmgneUTRc,3047
61
+ xcoll-0.6.7.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
62
+ xcoll-0.6.7.dist-info/entry_points.txt,sha256=fC9oojAU6WjKujnGBodo7ZcEeBGfSfeLPO5287echdY,26
63
+ xcoll-0.6.7.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
64
+ xcoll-0.6.7.dist-info/licenses/NOTICE,sha256=6DO_E7WCdRKc42vUoVVBPGttvQi4mRt9fAcxj9u8zy8,74
65
+ xcoll-0.6.7.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: poetry-core 2.1.3
2
+ Generator: poetry-core 2.2.1
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
@@ -1,23 +0,0 @@
1
- // copyright ############################### #
2
- // This file is part of the Xcoll package. #
3
- // Copyright (c) CERN, 2025. #
4
- // ######################################### #
5
-
6
- #ifndef XCOLL_RF_SWEEP_H
7
- #define XCOLL_RF_SWEEP_H
8
-
9
- /*gpufun*/
10
- void RFSweep_track_local_particle(RFSweepData el, LocalParticle* part0){
11
- double const step = RFSweepData_get__rf_sweep_df_step(el); // L*df/(f0 + df)
12
- int64_t const start_turn = RFSweepData_get_start_turn(el);
13
- int64_t const stop_turn = RFSweepData_get_stop_turn(el);
14
-
15
- //start_per_particle_block (part0->part)
16
- int64_t at_turn = LocalParticle_get_at_turn(part);
17
- if (at_turn >= start_turn && at_turn <= stop_turn){
18
- LocalParticle_add_to_zeta(part, -(at_turn - start_turn + 1)*step);
19
- }
20
- //end_per_particle_block
21
- }
22
-
23
- #endif /* XCOLL_RF_SWEEP_H */
File without changes
xcoll/general.py.orig DELETED
@@ -1,21 +0,0 @@
1
- # copyright ############################### #
2
- # This file is part of the Xcoll package. #
3
- # Copyright (c) CERN, 2025. #
4
- # ######################################### #
5
-
6
- from pathlib import Path
7
-
8
- _pkg_root = Path(__file__).parent.absolute()
9
-
10
- citation = "F.F. Van der Veken, et al.: Recent Developments with the New Tools for Collimation "
11
- citation += "Simulations in Xsuite, Proceedings of HB2023, Geneva, Switzerland."
12
-
13
- # ======================
14
- # Do not change
15
- # ======================
16
- <<<<<<< HEAD
17
- __version__ = '0.7.0rc0'
18
- =======
19
- __version__ = '0.6.4'
20
- >>>>>>> main
21
- # ======================
xcoll/geometry.md DELETED
@@ -1,42 +0,0 @@
1
- PSEUDOCODE for material interactions tracking in collimator
2
- ===========================================================
3
-
4
- - create DriftTrajectory from particle
5
- - loop:
6
- - find first crossing with collimator shape (segments)
7
- - if distance larger than end of BeamElement -> move particle to exendit and break loop
8
- - move particle to collimator impact point
9
- - create MCSTrajectory from new particle
10
- - loop:
11
- - find first crossing with collimator shape (segments)
12
- - do not move, but calculate path length
13
- - compare to distance to nuclear interaction
14
- - shortest wins (nuclear or exit)
15
- - move to next point
16
- - when at exit, create DriftTrajectory from particle
17
-
18
-
19
-
20
- PSEUDOCODE for material interactions tracking in crystal
21
- ========================================================
22
-
23
- - create DriftTrajectory from particle
24
- - loop:
25
- - find first crossing with crystal shape (segments)
26
- - if distance larger than end of BeamElement -> move particle to end and break loop
27
- - move particle to crystal impact point
28
- - create MCSTrajectory (if amorphous) or CircularTrajectory (if channelling) from new particle
29
- - loop:
30
- - find first crossing with crystal shape (segments)
31
- - do not move, but calculate path length
32
- - compare to distance to nuclear interaction and dechannelling
33
- - shortest wins (nuclear, dechannelling, or exit)
34
- - move to next point
35
- - when at exit, create DriftTrajectory from particle
36
-
37
-
38
- PSEUDOCODE for crossing finder
39
- ==============================
40
-
41
- - if DriftTrajectory and any segment
42
- => use analytical