xcoll 0.5.0__py3-none-any.whl → 0.5.1__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.

@@ -10,7 +10,8 @@ from .blowup import BlowUp
10
10
  from .monitor import EmittanceMonitor
11
11
 
12
12
  block_classes = tuple(v for v in globals().values()
13
- if isinstance(v, type) and issubclass(v, BaseBlock) and v != BaseBlock)
13
+ if isinstance(v, type) and issubclass(v, BaseBlock) and v != BaseBlock
14
+ and v != BaseCollimator and v != BaseCrystal)
14
15
  # Includes crystals
15
16
  collimator_classes = tuple(v for v in globals().values()
16
17
  if isinstance(v, type) and (issubclass(v, BaseCollimator) or issubclass(v, BaseCrystal))
@@ -18,7 +19,7 @@ collimator_classes = tuple(v for v in globals().values()
18
19
  crystal_classes = tuple(v for v in globals().values()
19
20
  if isinstance(v, type) and issubclass(v, BaseCrystal) and v != BaseCrystal)
20
21
 
21
- element_classes = block_classes + collimator_classes + (BlowUp, EmittanceMonitor)
22
+ element_classes = block_classes + (BlowUp, EmittanceMonitor)
22
23
 
23
24
  _all_collimator_classes = collimator_classes
24
25
  _all_crystal_classes = crystal_classes
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.5.0'
15
+ __version__ = '0.5.1'
16
16
  # ======================
@@ -264,7 +264,7 @@ class InteractionRecord(xt.BeamElement):
264
264
 
265
265
 
266
266
  def _get_xcoll_elements(line=None, elements=None, names=None):
267
- from xcoll import element_classes
267
+ from xcoll.beam_elements import block_classes
268
268
  if names is not None and names is not False and \
269
269
  (not hasattr(names, '__iter__') or isinstance(names, str)):
270
270
  names = [names]
@@ -278,7 +278,7 @@ def _get_xcoll_elements(line=None, elements=None, names=None):
278
278
  if elements is not None and elements is not False:
279
279
  raise ValueError("Cannot provide both line and elements!")
280
280
  if names is None or names is True:
281
- elements, names = line.get_elements_of_type(element_classes)
281
+ elements, names = line.get_elements_of_type(block_classes)
282
282
  if len(names) == 0:
283
283
  raise ValueError("No Xcoll elements in line!")
284
284
  elif names is False:
@@ -291,7 +291,7 @@ def _get_xcoll_elements(line=None, elements=None, names=None):
291
291
  raise ValueError(f"Element {name} not found in line!")
292
292
  elements = [line[name] for name in names]
293
293
  for idx, element in enumerate(elements):
294
- if not isinstance(element, element_classes):
294
+ if not isinstance(element, block_classes):
295
295
  name = name[idx] if names is not None else element.__class__.__name__
296
296
  raise ValueError(f"Element {name} not an Xcoll element!")
297
297
  return elements, names
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: xcoll
3
- Version: 0.5.0
3
+ Version: 0.5.1
4
4
  Summary: Xsuite collimation package
5
5
  Home-page: https://github.com/xsuite/xcoll
6
6
  License: Apache 2.0
@@ -1,7 +1,7 @@
1
1
  LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
2
2
  NOTICE,sha256=6DO_E7WCdRKc42vUoVVBPGttvQi4mRt9fAcxj9u8zy8,74
3
3
  xcoll/__init__.py,sha256=dUv7QzbojU0SfOiKPe6-XThev2ir9jhqzRIUhTz8y84,1021
4
- xcoll/beam_elements/__init__.py,sha256=6DENPooYBVZfonhOoqSA5u22OF1B-07QHUcUa6y7ZQs,1164
4
+ xcoll/beam_elements/__init__.py,sha256=gJRYzcDjoimFrHiLvYQYLDtP_5A97Qbg0XL6q-j2uC4,1210
5
5
  xcoll/beam_elements/absorber.py,sha256=teLGFiO22S8ItXa3ftsjg7oAN7Ypw0iJhkJmjbtGlL4,2502
6
6
  xcoll/beam_elements/base.py,sha256=UJHjC4-EQd7j_cfJZI7eJ9ADgQFZB1XPyrErHmchcVA,50914
7
7
  xcoll/beam_elements/blowup.py,sha256=0YdKTzMRt_ABGyFwHvnnYFBq0oHMs0ezHrU3hUTMp7Q,7879
@@ -15,13 +15,13 @@ xcoll/beam_elements/elements_src/everest_crystal.h,sha256=UCLq62yKoKq-qrfrX8naWU
15
15
  xcoll/beam_elements/everest.py,sha256=jlPDmUq11DFxJXuT1f-GVYI18aKo7PMwzGjnPa8Yqls,8367
16
16
  xcoll/beam_elements/monitor.py,sha256=yInXQYVDM_9opcp7CyywUBsAJbSr3B18ZjkKmlOK7b4,16778
17
17
  xcoll/colldb.py,sha256=rSSR_j19tsPAWBGZYnFVgOMEP2fbywhfXA0WiVN8Wkw,31027
18
- xcoll/general.py,sha256=NRBkZprYIqgiP1o6pgFimSu6bl_azPL_F5yXPsjoFsc,534
18
+ xcoll/general.py,sha256=FKB0NMJHEYV4RVjv52MBDT0x0EhKFF2T817Ae3N1oOU,534
19
19
  xcoll/headers/checks.h,sha256=IMLhQMnh3t-t9UhVK-1hfS4GVgl2Mry69H_17By00M0,1582
20
20
  xcoll/headers/particle_states.h,sha256=WCzeHAniEK7sX7HTwhoIgewioQ7SibGn01RLrhVI98k,840
21
21
  xcoll/initial_distribution.py,sha256=RlBWGm1e_qUF3svz4id77aDxl4TFxMuP65LZcepxC8U,8404
22
22
  xcoll/install.py,sha256=v9TdrKa7hjwFH25WN8mQ21Yy6qV3jW3NAH4YhBvEibw,7685
23
23
  xcoll/interaction_record/__init__.py,sha256=UFoLiKa-z2oX7YoszP-7Vgdt1nM6kT382v1CaIu8_u0,50
24
- xcoll/interaction_record/interaction_record.py,sha256=MKibjRZYcLGYlY1wDSTtVKZV7m9Z8SK9p3K-dEk-U_Q,13184
24
+ xcoll/interaction_record/interaction_record.py,sha256=QzkK27-KAztWD__3l97dB-GvNrB6RJgZnKmGVMppDQ4,13192
25
25
  xcoll/interaction_record/interaction_record_src/interaction_record.h,sha256=YCJLbk1dUcuj-I935K8iFwqDDja4afGB9bJ5jNWJSpo,6067
26
26
  xcoll/interaction_record/interaction_types.py,sha256=_UGq-PBq30hj1lp29CpNTmmwzsP7tuCng8ZIAALnzCc,2894
27
27
  xcoll/line_tools.py,sha256=MSNQly2_7SxXPM68qGGnGm_HGW78Llu_kqguE04P69o,3253
@@ -406,8 +406,8 @@ xcoll/scattering_routines/geometry/objects.h,sha256=lNFEfqrSDnJuB6sKh59bbg52bGqO
406
406
  xcoll/scattering_routines/geometry/rotation.h,sha256=AvNwcqAAlhjEUtSbTqi53BTvzR256gtfUYcM5jlXUco,701
407
407
  xcoll/scattering_routines/geometry/segments.h,sha256=IAz4IWvarIIpX7Waph-Hh2j6o6n_2uCPmHxxQp8Q3yg,7667
408
408
  xcoll/scattering_routines/geometry/sort.h,sha256=wNdQLwEn58jgeSG4B9x-jfm7vOjN4hnAlxZ3SG-SkWg,5763
409
- xcoll-0.5.0.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
410
- xcoll-0.5.0.dist-info/METADATA,sha256=2cwlzCRry48_7NRFQF8i3ceGIzns1j-1dE4bMHIqDDQ,2709
411
- xcoll-0.5.0.dist-info/NOTICE,sha256=6DO_E7WCdRKc42vUoVVBPGttvQi4mRt9fAcxj9u8zy8,74
412
- xcoll-0.5.0.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
413
- xcoll-0.5.0.dist-info/RECORD,,
409
+ xcoll-0.5.1.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
410
+ xcoll-0.5.1.dist-info/METADATA,sha256=5m3ZpHN5fKSZ0iANDHgpi8N20s5C4xxkMpmP8weLuQw,2709
411
+ xcoll-0.5.1.dist-info/NOTICE,sha256=6DO_E7WCdRKc42vUoVVBPGttvQi4mRt9fAcxj9u8zy8,74
412
+ xcoll-0.5.1.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
413
+ xcoll-0.5.1.dist-info/RECORD,,
File without changes
File without changes
File without changes