xcoll 0.6.6__tar.gz → 0.6.8__tar.gz
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-0.6.6 → xcoll-0.6.8}/PKG-INFO +3 -3
- {xcoll-0.6.6 → xcoll-0.6.8}/pyproject.toml +4 -4
- {xcoll-0.6.6 → xcoll-0.6.8}/xcoll/colldb.py +4 -3
- {xcoll-0.6.6 → xcoll-0.6.8}/xcoll/general.py +1 -1
- {xcoll-0.6.6 → xcoll-0.6.8}/xcoll/lossmap.py +2 -1
- xcoll-0.6.6/xcoll/beam_elements/elements_src/rf_sweep.h +0 -23
- xcoll-0.6.6/xcoll/beam_elements/sweep.py +0 -0
- xcoll-0.6.6/xcoll/geometry.md +0 -42
- {xcoll-0.6.6 → xcoll-0.6.8}/LICENSE +0 -0
- {xcoll-0.6.6 → xcoll-0.6.8}/NOTICE +0 -0
- {xcoll-0.6.6 → xcoll-0.6.8}/README.md +0 -0
- {xcoll-0.6.6 → xcoll-0.6.8}/xcoll/__init__.py +0 -0
- {xcoll-0.6.6 → xcoll-0.6.8}/xcoll/beam_elements/__init__.py +0 -0
- {xcoll-0.6.6 → xcoll-0.6.8}/xcoll/beam_elements/absorber.py +0 -0
- {xcoll-0.6.6 → xcoll-0.6.8}/xcoll/beam_elements/base.py +0 -0
- {xcoll-0.6.6 → xcoll-0.6.8}/xcoll/beam_elements/blowup.py +0 -0
- {xcoll-0.6.6 → xcoll-0.6.8}/xcoll/beam_elements/elements_src/black_absorber.h +0 -0
- {xcoll-0.6.6 → xcoll-0.6.8}/xcoll/beam_elements/elements_src/black_crystal.h +0 -0
- {xcoll-0.6.6 → xcoll-0.6.8}/xcoll/beam_elements/elements_src/blowup.h +0 -0
- {xcoll-0.6.6 → xcoll-0.6.8}/xcoll/beam_elements/elements_src/emittance_monitor.h +0 -0
- {xcoll-0.6.6 → xcoll-0.6.8}/xcoll/beam_elements/elements_src/everest_block.h +0 -0
- {xcoll-0.6.6 → xcoll-0.6.8}/xcoll/beam_elements/elements_src/everest_collimator.h +0 -0
- {xcoll-0.6.6 → xcoll-0.6.8}/xcoll/beam_elements/elements_src/everest_crystal.h +0 -0
- {xcoll-0.6.6 → xcoll-0.6.8}/xcoll/beam_elements/elements_src/transparent_collimator.h +0 -0
- {xcoll-0.6.6 → xcoll-0.6.8}/xcoll/beam_elements/elements_src/transparent_crystal.h +0 -0
- {xcoll-0.6.6 → xcoll-0.6.8}/xcoll/beam_elements/everest.py +0 -0
- {xcoll-0.6.6 → xcoll-0.6.8}/xcoll/beam_elements/monitor.py +0 -0
- {xcoll-0.6.6 → xcoll-0.6.8}/xcoll/beam_elements/transparent.py +0 -0
- {xcoll-0.6.6 → xcoll-0.6.8}/xcoll/headers/checks.h +0 -0
- {xcoll-0.6.6 → xcoll-0.6.8}/xcoll/headers/particle_states.py +0 -0
- {xcoll-0.6.6 → xcoll-0.6.8}/xcoll/initial_distribution.py +0 -0
- {xcoll-0.6.6 → xcoll-0.6.8}/xcoll/interaction_record/__init__.py +0 -0
- {xcoll-0.6.6 → xcoll-0.6.8}/xcoll/interaction_record/interaction_record.py +0 -0
- {xcoll-0.6.6 → xcoll-0.6.8}/xcoll/interaction_record/interaction_record_src/interaction_record.h +0 -0
- {xcoll-0.6.6 → xcoll-0.6.8}/xcoll/interaction_record/interaction_types.py +0 -0
- {xcoll-0.6.6 → xcoll-0.6.8}/xcoll/line_tools.py +0 -0
- {xcoll-0.6.6 → xcoll-0.6.8}/xcoll/plot.py +0 -0
- {xcoll-0.6.6 → xcoll-0.6.8}/xcoll/prebuilt_kernel_definitions/__init__.py +0 -0
- {xcoll-0.6.6 → xcoll-0.6.8}/xcoll/prebuilt_kernel_definitions/element_inits.py +0 -0
- {xcoll-0.6.6 → xcoll-0.6.8}/xcoll/prebuilt_kernel_definitions/element_types.py +0 -0
- {xcoll-0.6.6 → xcoll-0.6.8}/xcoll/rf_sweep.py +0 -0
- {xcoll-0.6.6 → xcoll-0.6.8}/xcoll/scattering_routines/engine.py +0 -0
- {xcoll-0.6.6 → xcoll-0.6.8}/xcoll/scattering_routines/environment.py +0 -0
- {xcoll-0.6.6 → xcoll-0.6.8}/xcoll/scattering_routines/everest/__init__.py +0 -0
- {xcoll-0.6.6 → xcoll-0.6.8}/xcoll/scattering_routines/everest/amorphous.h +0 -0
- {xcoll-0.6.6 → xcoll-0.6.8}/xcoll/scattering_routines/everest/channelling.h +0 -0
- {xcoll-0.6.6 → xcoll-0.6.8}/xcoll/scattering_routines/everest/constants.h +0 -0
- {xcoll-0.6.6 → xcoll-0.6.8}/xcoll/scattering_routines/everest/crystal_parameters.h +0 -0
- {xcoll-0.6.6 → xcoll-0.6.8}/xcoll/scattering_routines/everest/everest.h +0 -0
- {xcoll-0.6.6 → xcoll-0.6.8}/xcoll/scattering_routines/everest/everest.py +0 -0
- {xcoll-0.6.6 → xcoll-0.6.8}/xcoll/scattering_routines/everest/ionisation_loss.h +0 -0
- {xcoll-0.6.6 → xcoll-0.6.8}/xcoll/scattering_routines/everest/jaw.h +0 -0
- {xcoll-0.6.6 → xcoll-0.6.8}/xcoll/scattering_routines/everest/materials.py +0 -0
- {xcoll-0.6.6 → xcoll-0.6.8}/xcoll/scattering_routines/everest/multiple_coulomb_scattering.h +0 -0
- {xcoll-0.6.6 → xcoll-0.6.8}/xcoll/scattering_routines/everest/nuclear_interaction.h +0 -0
- {xcoll-0.6.6 → xcoll-0.6.8}/xcoll/scattering_routines/everest/properties.h +0 -0
- {xcoll-0.6.6 → xcoll-0.6.8}/xcoll/scattering_routines/geometry/__init__.py +0 -0
- {xcoll-0.6.6 → xcoll-0.6.8}/xcoll/scattering_routines/geometry/collimator_geometry.h +0 -0
- {xcoll-0.6.6 → xcoll-0.6.8}/xcoll/scattering_routines/geometry/crystal_geometry.h +0 -0
- {xcoll-0.6.6 → xcoll-0.6.8}/xcoll/scattering_routines/geometry/geometry.py +0 -0
- {xcoll-0.6.6 → xcoll-0.6.8}/xcoll/scattering_routines/geometry/get_s.h +0 -0
- {xcoll-0.6.6 → xcoll-0.6.8}/xcoll/scattering_routines/geometry/methods.h +0 -0
- {xcoll-0.6.6 → xcoll-0.6.8}/xcoll/scattering_routines/geometry/objects.h +0 -0
- {xcoll-0.6.6 → xcoll-0.6.8}/xcoll/scattering_routines/geometry/rotation.h +0 -0
- {xcoll-0.6.6 → xcoll-0.6.8}/xcoll/scattering_routines/geometry/segments.h +0 -0
- {xcoll-0.6.6 → xcoll-0.6.8}/xcoll/scattering_routines/geometry/sort.h +0 -0
- {xcoll-0.6.6 → xcoll-0.6.8}/xcoll/xaux.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: xcoll
|
|
3
|
-
Version: 0.6.
|
|
3
|
+
Version: 0.6.8
|
|
4
4
|
Summary: Xsuite collimation package
|
|
5
5
|
License: Apache-2.0
|
|
6
6
|
Author: Frederik F. Van der Veken
|
|
@@ -19,10 +19,10 @@ Requires-Dist: pytest ; extra == "tests"
|
|
|
19
19
|
Requires-Dist: pytest-html ; extra == "tests"
|
|
20
20
|
Requires-Dist: pytest-xdist ; extra == "tests"
|
|
21
21
|
Requires-Dist: ruamel-yaml (>=0.17.31,<0.18.15)
|
|
22
|
-
Requires-Dist: xdeps (>=0.10.
|
|
22
|
+
Requires-Dist: xdeps (>=0.10.7)
|
|
23
23
|
Requires-Dist: xobjects (>=0.5.3)
|
|
24
24
|
Requires-Dist: xpart (>=0.23.1)
|
|
25
|
-
Requires-Dist: xtrack (>=0.
|
|
25
|
+
Requires-Dist: xtrack (>=0.93.2)
|
|
26
26
|
Project-URL: Bug Tracker, https://github.com/xsuite/xsuite/issues
|
|
27
27
|
Project-URL: Documentation, https://xsuite.readthedocs.io/
|
|
28
28
|
Project-URL: Homepage, https://github.com/xsuite/xcoll
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "xcoll"
|
|
3
|
-
version = "0.6.
|
|
3
|
+
version = "0.6.8"
|
|
4
4
|
description = "Xsuite collimation package"
|
|
5
5
|
authors = [
|
|
6
6
|
{name="Frederik F. Van der Veken", email="frederik@cern.ch"},
|
|
@@ -23,9 +23,9 @@ dependencies = [
|
|
|
23
23
|
"numpy>=1.0",
|
|
24
24
|
"pandas>=1.4",
|
|
25
25
|
"xobjects>=0.5.3",
|
|
26
|
-
"xdeps>=0.10.
|
|
26
|
+
"xdeps>=0.10.7",
|
|
27
27
|
"xpart>=0.23.1",
|
|
28
|
-
"xtrack>=0.
|
|
28
|
+
"xtrack>=0.93.2",
|
|
29
29
|
]
|
|
30
30
|
|
|
31
31
|
[project.optional-dependencies]
|
|
@@ -46,7 +46,7 @@ exclude = ["xcoll/lib", "xcoll/config"]
|
|
|
46
46
|
|
|
47
47
|
[poetry.group.dev.dependencies]
|
|
48
48
|
pytest = ">=7.3"
|
|
49
|
-
xaux = ">=0.3.
|
|
49
|
+
xaux = ">=0.3.8"
|
|
50
50
|
|
|
51
51
|
[build-system]
|
|
52
52
|
# Needed for pip install -e (BTW: need pip version 22)
|
|
@@ -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']
|
|
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']
|
|
@@ -254,7 +254,8 @@ class LossMap:
|
|
|
254
254
|
prev_elem = len(line.element_names) - 1
|
|
255
255
|
else:
|
|
256
256
|
prev_elem = elem - 1
|
|
257
|
-
if line.element_names[prev_elem] in coll_elements
|
|
257
|
+
if line.element_names[prev_elem] in coll_elements \
|
|
258
|
+
and line[prev_elem].active:
|
|
258
259
|
if verbose:
|
|
259
260
|
print(f"Found at {line.element_names[elem]}, "
|
|
260
261
|
+ f"moved to {line.element_names[elem-1]}")
|
|
@@ -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-0.6.6/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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{xcoll-0.6.6 → xcoll-0.6.8}/xcoll/interaction_record/interaction_record_src/interaction_record.h
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|