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

@@ -629,7 +629,7 @@ class BaseCollimator(BaseBlock):
629
629
  raise ValueError("When using `twiss`, need to provide the name as well.")
630
630
  else:
631
631
  tw_up = twiss.rows[name]
632
- tw_down = twiss.rows[twiss.mask[[name]]+1]
632
+ tw_down = twiss.rows[twiss.rows.indices[[name]]+1]
633
633
  if not np.isclose(tw_up.s[0] + self.length, tw_down.s[0]):
634
634
  raise ValueError(f"Downstream twiss not compatible with length {self.length}m.")
635
635
  self._optics = {
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.1'
15
+ __version__ = '0.5.2'
16
16
  # ======================
@@ -61,13 +61,13 @@ def generate_pencil_on_collimator(line, name, num_particles, *, side='+-', penci
61
61
  if is_converging:
62
62
  # pencil at front of jaw
63
63
  match_at_s = s_front
64
- sigma = beam_sizes.rows[name:f'{name}%%1'][f'sigma_{plane}'][0]
65
- sigma_transv = beam_sizes.rows[name:f'{name}%%1'][f'sigma_{transv_plane}'][0]
64
+ sigma = beam_sizes.rows[name:f'{name}>>1'][f'sigma_{plane}'][0]
65
+ sigma_transv = beam_sizes.rows[name:f'{name}>>1'][f'sigma_{transv_plane}'][0]
66
66
  else:
67
67
  # pencil at back of jaw
68
68
  match_at_s = s_back
69
- sigma = beam_sizes.rows[name:f'{name}%%1'][f'sigma_{plane}'][1]
70
- sigma_transv = beam_sizes.rows[name:f'{name}%%1'][f'sigma_{transv_plane}'][1]
69
+ sigma = beam_sizes.rows[name:f'{name}>>1'][f'sigma_{plane}'][1]
70
+ sigma_transv = beam_sizes.rows[name:f'{name}>>1'][f'sigma_{transv_plane}'][1]
71
71
  dr_sigmas = pencil_spread/sigma
72
72
 
73
73
  # Generate 4D coordinates
@@ -157,7 +157,7 @@ def generate_delta_from_dispersion(line, at_element, *, plane, position_mm, nemi
157
157
  twiss = line.twiss()
158
158
 
159
159
  beam_sizes = twiss.get_beam_covariance(nemitt_x=nemitt_x, nemitt_y=nemitt_y)
160
- beam_sizes = beam_sizes.rows[at_element:f'{at_element}%%1'][f'sigma_{plane}']
160
+ beam_sizes = beam_sizes.rows[at_element:f'{at_element}>>1'][f'sigma_{plane}']
161
161
  sigma = beam_sizes[0] if match_at_front else beam_sizes[1]
162
162
  delta = (position_mm - betatron_cut*sigma - twiss.rows[at_element][plane])
163
163
  delta /= twiss.rows[at_element][f'd{plane}']
xcoll/line_tools.py CHANGED
@@ -26,9 +26,9 @@ def get_optics_at(names, *, twiss=None, line=None):
26
26
  twiss = line.twiss()
27
27
  if not hasattr(names, '__iter__') and not isinstance(names, str):
28
28
  names = [names]
29
- coll_entry_mask = twiss.mask[names]
30
- tw_entry = twiss.rows[coll_entry_mask]
31
- tw_exit = twiss.rows[coll_entry_mask+1]
29
+ coll_entry_indices = twiss.rows.indices[names]
30
+ tw_entry = twiss.rows[coll_entry_indices]
31
+ tw_exit = twiss.rows[coll_entry_indices+1]
32
32
  tw_exit.name = tw_entry.name
33
33
  return tw_entry, tw_exit
34
34
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: xcoll
3
- Version: 0.5.1
3
+ Version: 0.5.2
4
4
  Summary: Xsuite collimation package
5
5
  Home-page: https://github.com/xsuite/xcoll
6
6
  License: Apache 2.0
@@ -3,7 +3,7 @@ NOTICE,sha256=6DO_E7WCdRKc42vUoVVBPGttvQi4mRt9fAcxj9u8zy8,74
3
3
  xcoll/__init__.py,sha256=dUv7QzbojU0SfOiKPe6-XThev2ir9jhqzRIUhTz8y84,1021
4
4
  xcoll/beam_elements/__init__.py,sha256=gJRYzcDjoimFrHiLvYQYLDtP_5A97Qbg0XL6q-j2uC4,1210
5
5
  xcoll/beam_elements/absorber.py,sha256=teLGFiO22S8ItXa3ftsjg7oAN7Ypw0iJhkJmjbtGlL4,2502
6
- xcoll/beam_elements/base.py,sha256=UJHjC4-EQd7j_cfJZI7eJ9ADgQFZB1XPyrErHmchcVA,50914
6
+ xcoll/beam_elements/base.py,sha256=vX3fvRgGa-penwdpUnyHIa8WMIwzcbFDx2S1Ezv7F7E,50922
7
7
  xcoll/beam_elements/blowup.py,sha256=0YdKTzMRt_ABGyFwHvnnYFBq0oHMs0ezHrU3hUTMp7Q,7879
8
8
  xcoll/beam_elements/elements_src/black_absorber.h,sha256=ERDortSn5pVFec-9b9DWkHQEkgfHKeUDNqeJ6-DU5Zg,5027
9
9
  xcoll/beam_elements/elements_src/black_crystal.h,sha256=rrrQ9RW8ltiZ47-w2ZZM91iLBEwn4C5SJrwQiiXBJ4M,4622
@@ -15,16 +15,16 @@ 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=FKB0NMJHEYV4RVjv52MBDT0x0EhKFF2T817Ae3N1oOU,534
18
+ xcoll/general.py,sha256=wK6veBvEA_MhE0ux3hmOc4uJkD2FzpZ1QY3vBocghNY,534
19
19
  xcoll/headers/checks.h,sha256=IMLhQMnh3t-t9UhVK-1hfS4GVgl2Mry69H_17By00M0,1582
20
20
  xcoll/headers/particle_states.h,sha256=WCzeHAniEK7sX7HTwhoIgewioQ7SibGn01RLrhVI98k,840
21
- xcoll/initial_distribution.py,sha256=RlBWGm1e_qUF3svz4id77aDxl4TFxMuP65LZcepxC8U,8404
21
+ xcoll/initial_distribution.py,sha256=RWPwBqusqgdBxeeIgJiyZK4bfiOJ4KCmAalkx6zQxEY,8404
22
22
  xcoll/install.py,sha256=v9TdrKa7hjwFH25WN8mQ21Yy6qV3jW3NAH4YhBvEibw,7685
23
23
  xcoll/interaction_record/__init__.py,sha256=UFoLiKa-z2oX7YoszP-7Vgdt1nM6kT382v1CaIu8_u0,50
24
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
- xcoll/line_tools.py,sha256=MSNQly2_7SxXPM68qGGnGm_HGW78Llu_kqguE04P69o,3253
27
+ xcoll/line_tools.py,sha256=Zt1VpBwtF_5zm-OMaEYOg6zdxLgk7ZsnCXkalQ41pJQ,3270
28
28
  xcoll/lossmap.py,sha256=VOck3CFvra0BUgKzzP2ddmN8bSnSMUXQg01FCmeSBrU,8091
29
29
  xcoll/manager.py,sha256=Uy58saX2836q_CZjNa5at611k38Za_L9jQSTqBQXooA,343
30
30
  xcoll/rf_sweep.py,sha256=5ABhou9cZcLYQ8DSPYowPpLCea8zJQyhWgUa7JUHJIg,8936
@@ -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.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,,
409
+ xcoll-0.5.2.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
410
+ xcoll-0.5.2.dist-info/METADATA,sha256=UicliZTLYRdKGKu--FRIX__QNiUGMDp0METIB-1CqSI,2709
411
+ xcoll-0.5.2.dist-info/NOTICE,sha256=6DO_E7WCdRKc42vUoVVBPGttvQi4mRt9fAcxj9u8zy8,74
412
+ xcoll-0.5.2.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
413
+ xcoll-0.5.2.dist-info/RECORD,,
File without changes
File without changes
File without changes