xtrack 0.83.2__tar.gz → 0.83.4__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.
Files changed (308) hide show
  1. {xtrack-0.83.2/xtrack.egg-info → xtrack-0.83.4}/PKG-INFO +1 -1
  2. {xtrack-0.83.2 → xtrack-0.83.4}/tests/test_environment.py +1 -0
  3. {xtrack-0.83.2 → xtrack-0.83.4}/tests/test_match_orbit_bump.py +3 -1
  4. xtrack-0.83.4/xtrack/_version.py +1 -0
  5. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/beam_elements/elements_src/track_magnet_radiation.h +92 -88
  6. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/line.py +7 -2
  7. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/particles/particles.py +3 -1
  8. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/tapering.py +4 -2
  9. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/twiss.py +21 -0
  10. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/twissplot.py +1 -1
  11. {xtrack-0.83.2 → xtrack-0.83.4/xtrack.egg-info}/PKG-INFO +1 -1
  12. xtrack-0.83.2/xtrack/_version.py +0 -1
  13. {xtrack-0.83.2 → xtrack-0.83.4}/LICENSE +0 -0
  14. {xtrack-0.83.2 → xtrack-0.83.4}/MANIFEST.in +0 -0
  15. {xtrack-0.83.2 → xtrack-0.83.4}/README.md +0 -0
  16. {xtrack-0.83.2 → xtrack-0.83.4}/ducktrack/__init__.py +0 -0
  17. {xtrack-0.83.2 → xtrack-0.83.4}/ducktrack/base_classes.py +0 -0
  18. {xtrack-0.83.2 → xtrack-0.83.4}/ducktrack/be_beamfields/BB6D.py +0 -0
  19. {xtrack-0.83.2 → xtrack-0.83.4}/ducktrack/be_beamfields/BB6Ddata.py +0 -0
  20. {xtrack-0.83.2 → xtrack-0.83.4}/ducktrack/be_beamfields/__init__.py +0 -0
  21. {xtrack-0.83.2 → xtrack-0.83.4}/ducktrack/be_beamfields/beambeam.py +0 -0
  22. {xtrack-0.83.2 → xtrack-0.83.4}/ducktrack/be_beamfields/boost.py +0 -0
  23. {xtrack-0.83.2 → xtrack-0.83.4}/ducktrack/be_beamfields/gaussian_fields.py +0 -0
  24. {xtrack-0.83.2 → xtrack-0.83.4}/ducktrack/be_beamfields/propagate_sigma_matrix.py +0 -0
  25. {xtrack-0.83.2 → xtrack-0.83.4}/ducktrack/be_beamfields/qgauss.py +0 -0
  26. {xtrack-0.83.2 → xtrack-0.83.4}/ducktrack/be_beamfields/slicing.py +0 -0
  27. {xtrack-0.83.2 → xtrack-0.83.4}/ducktrack/be_beamfields/spacecharge.py +0 -0
  28. {xtrack-0.83.2 → xtrack-0.83.4}/ducktrack/elements.py +0 -0
  29. {xtrack-0.83.2 → xtrack-0.83.4}/ducktrack/line.py +0 -0
  30. {xtrack-0.83.2 → xtrack-0.83.4}/ducktrack/mathlibs.py +0 -0
  31. {xtrack-0.83.2 → xtrack-0.83.4}/ducktrack/particles.py +0 -0
  32. {xtrack-0.83.2 → xtrack-0.83.4}/ducktrack/temp_pyparticles.py +0 -0
  33. {xtrack-0.83.2 → xtrack-0.83.4}/pyproject.toml +0 -0
  34. {xtrack-0.83.2 → xtrack-0.83.4}/setup.cfg +0 -0
  35. {xtrack-0.83.2 → xtrack-0.83.4}/setup.py +0 -0
  36. {xtrack-0.83.2 → xtrack-0.83.4}/tests/test_acceleration.py +0 -0
  37. {xtrack-0.83.2 → xtrack-0.83.4}/tests/test_amplitude_detuning.py +0 -0
  38. {xtrack-0.83.2 → xtrack-0.83.4}/tests/test_aperture_table.py +0 -0
  39. {xtrack-0.83.2 → xtrack-0.83.4}/tests/test_aperture_turn_ele_and_monitor.py +0 -0
  40. {xtrack-0.83.2 → xtrack-0.83.4}/tests/test_apertures.py +0 -0
  41. {xtrack-0.83.2 → xtrack-0.83.4}/tests/test_attr_replicas_and_slices.py +0 -0
  42. {xtrack-0.83.2 → xtrack-0.83.4}/tests/test_bucket_with_ref_energy_change.py +0 -0
  43. {xtrack-0.83.2 → xtrack-0.83.4}/tests/test_cavity_absolute_time.py +0 -0
  44. {xtrack-0.83.2 → xtrack-0.83.4}/tests/test_chromatic_functions_vs_madx.py +0 -0
  45. {xtrack-0.83.2 → xtrack-0.83.4}/tests/test_coasting.py +0 -0
  46. {xtrack-0.83.2 → xtrack-0.83.4}/tests/test_collective_tracker.py +0 -0
  47. {xtrack-0.83.2 → xtrack-0.83.4}/tests/test_collimation.py +0 -0
  48. {xtrack-0.83.2 → xtrack-0.83.4}/tests/test_electron_cooler.py +0 -0
  49. {xtrack-0.83.2 → xtrack-0.83.4}/tests/test_element_characterization_functions.py +0 -0
  50. {xtrack-0.83.2 → xtrack-0.83.4}/tests/test_element_internal_record.py +0 -0
  51. {xtrack-0.83.2 → xtrack-0.83.4}/tests/test_elements.py +0 -0
  52. {xtrack-0.83.2 → xtrack-0.83.4}/tests/test_elements_classflags.py +0 -0
  53. {xtrack-0.83.2 → xtrack-0.83.4}/tests/test_elements_thick.py +0 -0
  54. {xtrack-0.83.2 → xtrack-0.83.4}/tests/test_fcc_ee_solenoid_correction.py +0 -0
  55. {xtrack-0.83.2 → xtrack-0.83.4}/tests/test_fcc_ee_solenoid_correction_new_optimize_api.py +0 -0
  56. {xtrack-0.83.2 → xtrack-0.83.4}/tests/test_footprint.py +0 -0
  57. {xtrack-0.83.2 → xtrack-0.83.4}/tests/test_freeze_longitudinal.py +0 -0
  58. {xtrack-0.83.2 → xtrack-0.83.4}/tests/test_full_rings.py +0 -0
  59. {xtrack-0.83.2 → xtrack-0.83.4}/tests/test_h6_sps_beamline.py +0 -0
  60. {xtrack-0.83.2 → xtrack-0.83.4}/tests/test_hvkick.py +0 -0
  61. {xtrack-0.83.2 → xtrack-0.83.4}/tests/test_ions.py +0 -0
  62. {xtrack-0.83.2 → xtrack-0.83.4}/tests/test_legacy_multiline_to_env.py +0 -0
  63. {xtrack-0.83.2 → xtrack-0.83.4}/tests/test_lhc_env.py +0 -0
  64. {xtrack-0.83.2 → xtrack-0.83.4}/tests/test_lhc_match_phase_15.py +0 -0
  65. {xtrack-0.83.2 → xtrack-0.83.4}/tests/test_line.py +0 -0
  66. {xtrack-0.83.2 → xtrack-0.83.4}/tests/test_lumi.py +0 -0
  67. {xtrack-0.83.2 → xtrack-0.83.4}/tests/test_mad_writer.py +0 -0
  68. {xtrack-0.83.2 → xtrack-0.83.4}/tests/test_madloader.py +0 -0
  69. {xtrack-0.83.2 → xtrack-0.83.4}/tests/test_madnginterface.py +0 -0
  70. {xtrack-0.83.2 → xtrack-0.83.4}/tests/test_magnet.py +0 -0
  71. {xtrack-0.83.2 → xtrack-0.83.4}/tests/test_match_and_track_from_element.py +0 -0
  72. {xtrack-0.83.2 → xtrack-0.83.4}/tests/test_match_coupling_knob.py +0 -0
  73. {xtrack-0.83.2 → xtrack-0.83.4}/tests/test_match_nested.py +0 -0
  74. {xtrack-0.83.2 → xtrack-0.83.4}/tests/test_match_optics_and_ip_knob.py +0 -0
  75. {xtrack-0.83.2 → xtrack-0.83.4}/tests/test_match_optics_and_ip_knob_new_optimize_api.py +0 -0
  76. {xtrack-0.83.2 → xtrack-0.83.4}/tests/test_match_tune_chroma_cminus.py +0 -0
  77. {xtrack-0.83.2 → xtrack-0.83.4}/tests/test_monitor.py +0 -0
  78. {xtrack-0.83.2 → xtrack-0.83.4}/tests/test_multi_bunch_gauss.py +0 -0
  79. {xtrack-0.83.2 → xtrack-0.83.4}/tests/test_multiline.py +0 -0
  80. {xtrack-0.83.2 → xtrack-0.83.4}/tests/test_multisetter.py +0 -0
  81. {xtrack-0.83.2 → xtrack-0.83.4}/tests/test_multispecies.py +0 -0
  82. {xtrack-0.83.2 → xtrack-0.83.4}/tests/test_native_madloader.py +0 -0
  83. {xtrack-0.83.2 → xtrack-0.83.4}/tests/test_optimize_for_tracking.py +0 -0
  84. {xtrack-0.83.2 → xtrack-0.83.4}/tests/test_particles.py +0 -0
  85. {xtrack-0.83.2 → xtrack-0.83.4}/tests/test_particles_basics.py +0 -0
  86. {xtrack-0.83.2 → xtrack-0.83.4}/tests/test_particles_pdg.py +0 -0
  87. {xtrack-0.83.2 → xtrack-0.83.4}/tests/test_periodic_symmetric_twiss_and_match.py +0 -0
  88. {xtrack-0.83.2 → xtrack-0.83.4}/tests/test_pipeline.py +0 -0
  89. {xtrack-0.83.2 → xtrack-0.83.4}/tests/test_prebuild_kernels.py +0 -0
  90. {xtrack-0.83.2 → xtrack-0.83.4}/tests/test_ps_against_ptc.py +0 -0
  91. {xtrack-0.83.2 → xtrack-0.83.4}/tests/test_ps_multiturn_twiss.py +0 -0
  92. {xtrack-0.83.2 → xtrack-0.83.4}/tests/test_psb_chicane.py +0 -0
  93. {xtrack-0.83.2 → xtrack-0.83.4}/tests/test_pyht_interface.py +0 -0
  94. {xtrack-0.83.2 → xtrack-0.83.4}/tests/test_radial_steering.py +0 -0
  95. {xtrack-0.83.2 → xtrack-0.83.4}/tests/test_radiation.py +0 -0
  96. {xtrack-0.83.2 → xtrack-0.83.4}/tests/test_radiation_equilibrium_emittances.py +0 -0
  97. {xtrack-0.83.2 → xtrack-0.83.4}/tests/test_radiation_equilibrium_emittances_thick.py +0 -0
  98. {xtrack-0.83.2 → xtrack-0.83.4}/tests/test_random_gen.py +0 -0
  99. {xtrack-0.83.2 → xtrack-0.83.4}/tests/test_random_gen_exp.py +0 -0
  100. {xtrack-0.83.2 → xtrack-0.83.4}/tests/test_random_gen_gauss.py +0 -0
  101. {xtrack-0.83.2 → xtrack-0.83.4}/tests/test_random_gen_ruth.py +0 -0
  102. {xtrack-0.83.2 → xtrack-0.83.4}/tests/test_rbend_rbarc.py +0 -0
  103. {xtrack-0.83.2 → xtrack-0.83.4}/tests/test_rf_track.py +0 -0
  104. {xtrack-0.83.2 → xtrack-0.83.4}/tests/test_rotation_signs.py +0 -0
  105. {xtrack-0.83.2 → xtrack-0.83.4}/tests/test_second_order_taylor_map.py +0 -0
  106. {xtrack-0.83.2 → xtrack-0.83.4}/tests/test_seeds.py +0 -0
  107. {xtrack-0.83.2 → xtrack-0.83.4}/tests/test_slice_and_insert_with_replicas.py +0 -0
  108. {xtrack-0.83.2 → xtrack-0.83.4}/tests/test_slice_elements.py +0 -0
  109. {xtrack-0.83.2 → xtrack-0.83.4}/tests/test_slicing.py +0 -0
  110. {xtrack-0.83.2 → xtrack-0.83.4}/tests/test_solenoid_bz_map_vs_boris.py +0 -0
  111. {xtrack-0.83.2 → xtrack-0.83.4}/tests/test_spacecharge_in_ring.py +0 -0
  112. {xtrack-0.83.2 → xtrack-0.83.4}/tests/test_spin.py +0 -0
  113. {xtrack-0.83.2 → xtrack-0.83.4}/tests/test_sps_thick.py +0 -0
  114. {xtrack-0.83.2 → xtrack-0.83.4}/tests/test_survey.py +0 -0
  115. {xtrack-0.83.2 → xtrack-0.83.4}/tests/test_tapering.py +0 -0
  116. {xtrack-0.83.2 → xtrack-0.83.4}/tests/test_thick_lhc.py +0 -0
  117. {xtrack-0.83.2 → xtrack-0.83.4}/tests/test_tilt_shifts.py +0 -0
  118. {xtrack-0.83.2 → xtrack-0.83.4}/tests/test_tracker.py +0 -0
  119. {xtrack-0.83.2 → xtrack-0.83.4}/tests/test_trajectory_correcton.py +0 -0
  120. {xtrack-0.83.2 → xtrack-0.83.4}/tests/test_twiss.py +0 -0
  121. {xtrack-0.83.2 → xtrack-0.83.4}/tests/test_twiss_vs_madx_psb.py +0 -0
  122. {xtrack-0.83.2 → xtrack-0.83.4}/tests/test_vs_madx.py +0 -0
  123. {xtrack-0.83.2 → xtrack-0.83.4}/tests/test_xmask_orbit_correction.py +0 -0
  124. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/__init__.py +0 -0
  125. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/_temp/__init__.py +0 -0
  126. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/_temp/boris_and_solenoid_map/__init__.py +0 -0
  127. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/_temp/boris_and_solenoid_map/boris.h +0 -0
  128. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/_temp/boris_and_solenoid_map/solenoid_field.py +0 -0
  129. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/_temp/lhc_match/__init__.py +0 -0
  130. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/_temp/lhc_match/gen_madx_optics_file.py +0 -0
  131. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/_temp/lhc_match/lhc_match.py +0 -0
  132. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/_temp/lhc_match/var_limits.py +0 -0
  133. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/aperture_meas.py +0 -0
  134. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/base_element.py +0 -0
  135. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/beam_elements/__init__.py +0 -0
  136. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/beam_elements/apertures.py +0 -0
  137. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/beam_elements/apertures_src/limitellipse.h +0 -0
  138. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/beam_elements/apertures_src/limitpolygon.h +0 -0
  139. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/beam_elements/apertures_src/limitracetrack.h +0 -0
  140. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/beam_elements/apertures_src/limitrect.h +0 -0
  141. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/beam_elements/apertures_src/limitrectellipse.h +0 -0
  142. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/beam_elements/apertures_src/longitudinallimitrect.h +0 -0
  143. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/beam_elements/beam_interaction.py +0 -0
  144. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/beam_elements/elements.py +0 -0
  145. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/beam_elements/elements_src/bend.h +0 -0
  146. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/beam_elements/elements_src/cavity.h +0 -0
  147. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/beam_elements/elements_src/dipole_fringe.h +0 -0
  148. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/beam_elements/elements_src/dipoleedge.h +0 -0
  149. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/beam_elements/elements_src/drift.h +0 -0
  150. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/beam_elements/elements_src/drift_slice.h +0 -0
  151. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/beam_elements/elements_src/drift_slice_bend.h +0 -0
  152. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/beam_elements/elements_src/drift_slice_octupole.h +0 -0
  153. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/beam_elements/elements_src/drift_slice_quadrupole.h +0 -0
  154. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/beam_elements/elements_src/drift_slice_rbend.h +0 -0
  155. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/beam_elements/elements_src/drift_slice_sextupole.h +0 -0
  156. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/beam_elements/elements_src/electroncooler.h +0 -0
  157. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/beam_elements/elements_src/elens.h +0 -0
  158. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/beam_elements/elements_src/exciter.h +0 -0
  159. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/beam_elements/elements_src/firstordertaylormap.h +0 -0
  160. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/beam_elements/elements_src/linesegmentmap.h +0 -0
  161. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/beam_elements/elements_src/magnet.h +0 -0
  162. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/beam_elements/elements_src/magnet_drift.h +0 -0
  163. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/beam_elements/elements_src/magnet_edge.h +0 -0
  164. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/beam_elements/elements_src/magnet_kick.h +0 -0
  165. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/beam_elements/elements_src/marker.h +0 -0
  166. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/beam_elements/elements_src/multipole.h +0 -0
  167. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/beam_elements/elements_src/multipoleedge.h +0 -0
  168. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/beam_elements/elements_src/nonlinearlens.h +0 -0
  169. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/beam_elements/elements_src/octupole.h +0 -0
  170. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/beam_elements/elements_src/quadrupole.h +0 -0
  171. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/beam_elements/elements_src/rbend.h +0 -0
  172. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/beam_elements/elements_src/referenceenergyincrease.h +0 -0
  173. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/beam_elements/elements_src/rfmultipole.h +0 -0
  174. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/beam_elements/elements_src/second_order_taylor_map.h +0 -0
  175. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/beam_elements/elements_src/sextupole.h +0 -0
  176. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/beam_elements/elements_src/simplethinbend.h +0 -0
  177. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/beam_elements/elements_src/simplethinquadrupole.h +0 -0
  178. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/beam_elements/elements_src/solenoid.h +0 -0
  179. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/beam_elements/elements_src/srotation.h +0 -0
  180. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/beam_elements/elements_src/thick_slice_bend.h +0 -0
  181. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/beam_elements/elements_src/thick_slice_drift.h +0 -0
  182. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/beam_elements/elements_src/thick_slice_octupole.h +0 -0
  183. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/beam_elements/elements_src/thick_slice_quadrupole.h +0 -0
  184. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/beam_elements/elements_src/thick_slice_rbend.h +0 -0
  185. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/beam_elements/elements_src/thick_slice_sextupole.h +0 -0
  186. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/beam_elements/elements_src/thick_slice_solenoid.h +0 -0
  187. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/beam_elements/elements_src/thin_slice_bend.h +0 -0
  188. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/beam_elements/elements_src/thin_slice_bend_entry.h +0 -0
  189. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/beam_elements/elements_src/thin_slice_bend_exit.h +0 -0
  190. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/beam_elements/elements_src/thin_slice_octupole.h +0 -0
  191. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/beam_elements/elements_src/thin_slice_octupole_entry.h +0 -0
  192. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/beam_elements/elements_src/thin_slice_octupole_exit.h +0 -0
  193. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/beam_elements/elements_src/thin_slice_quadrupole.h +0 -0
  194. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/beam_elements/elements_src/thin_slice_quadrupole_entry.h +0 -0
  195. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/beam_elements/elements_src/thin_slice_quadrupole_exit.h +0 -0
  196. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/beam_elements/elements_src/thin_slice_rbend.h +0 -0
  197. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/beam_elements/elements_src/thin_slice_rbend_entry.h +0 -0
  198. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/beam_elements/elements_src/thin_slice_rbend_exit.h +0 -0
  199. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/beam_elements/elements_src/thin_slice_sextupole.h +0 -0
  200. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/beam_elements/elements_src/thin_slice_sextupole_entry.h +0 -0
  201. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/beam_elements/elements_src/thin_slice_sextupole_exit.h +0 -0
  202. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/beam_elements/elements_src/track_bend.h +0 -0
  203. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/beam_elements/elements_src/track_cavity.h +0 -0
  204. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/beam_elements/elements_src/track_dipole_edge_linear.h +0 -0
  205. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/beam_elements/elements_src/track_dipole_edge_nonlinear.h +0 -0
  206. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/beam_elements/elements_src/track_dipole_fringe.h +0 -0
  207. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/beam_elements/elements_src/track_drift.h +0 -0
  208. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/beam_elements/elements_src/track_magnet.h +0 -0
  209. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/beam_elements/elements_src/track_magnet_drift.h +0 -0
  210. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/beam_elements/elements_src/track_magnet_edge.h +0 -0
  211. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/beam_elements/elements_src/track_magnet_kick.h +0 -0
  212. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/beam_elements/elements_src/track_mult_fringe.h +0 -0
  213. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/beam_elements/elements_src/track_multipolar_components.h +0 -0
  214. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/beam_elements/elements_src/track_multipole.h +0 -0
  215. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/beam_elements/elements_src/track_quadrupole.h +0 -0
  216. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/beam_elements/elements_src/track_solenoid.h +0 -0
  217. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/beam_elements/elements_src/track_srotation.h +0 -0
  218. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/beam_elements/elements_src/track_thick_bend.h +0 -0
  219. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/beam_elements/elements_src/track_thick_cfd.h +0 -0
  220. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/beam_elements/elements_src/track_wedge.h +0 -0
  221. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/beam_elements/elements_src/track_xrotation.h +0 -0
  222. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/beam_elements/elements_src/track_yrotation.h +0 -0
  223. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/beam_elements/elements_src/wedge.h +0 -0
  224. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/beam_elements/elements_src/wire.h +0 -0
  225. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/beam_elements/elements_src/xrotation.h +0 -0
  226. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/beam_elements/elements_src/xyshift.h +0 -0
  227. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/beam_elements/elements_src/yrotation.h +0 -0
  228. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/beam_elements/elements_src/zetashift.h +0 -0
  229. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/beam_elements/exciter.py +0 -0
  230. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/beam_elements/magnets.py +0 -0
  231. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/beam_elements/rft_element.py +0 -0
  232. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/beam_elements/slice_elements.py +0 -0
  233. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/beam_elements/slice_elements_thick.py +0 -0
  234. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/environment.py +0 -0
  235. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/footprint.py +0 -0
  236. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/general.py +0 -0
  237. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/headers/atomicadd.h +0 -0
  238. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/headers/checks.h +0 -0
  239. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/headers/constants.h +0 -0
  240. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/headers/particle_states.h +0 -0
  241. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/headers/synrad_spectrum.h +0 -0
  242. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/headers/track.h +0 -0
  243. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/internal_record.py +0 -0
  244. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/json.py +0 -0
  245. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/linear_normal_form.py +0 -0
  246. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/loss_location_refinement/__init__.py +0 -0
  247. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/loss_location_refinement/loss_location_refinement.py +0 -0
  248. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/lumi.py +0 -0
  249. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/mad_loader.py +0 -0
  250. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/mad_parser/__init__.py +0 -0
  251. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/mad_parser/loader.py +0 -0
  252. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/mad_parser/madx.lark +0 -0
  253. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/mad_parser/parse.py +0 -0
  254. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/mad_writer.py +0 -0
  255. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/madng_interface.py +0 -0
  256. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/match.py +0 -0
  257. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/monitors/__init__.py +0 -0
  258. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/monitors/beam_position_monitor.h +0 -0
  259. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/monitors/beam_position_monitor.py +0 -0
  260. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/monitors/beam_profile_monitor.h +0 -0
  261. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/monitors/beam_profile_monitor.py +0 -0
  262. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/monitors/beam_size_monitor.h +0 -0
  263. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/monitors/beam_size_monitor.py +0 -0
  264. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/monitors/last_turns_monitor.h +0 -0
  265. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/monitors/last_turns_monitor.py +0 -0
  266. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/monitors/particles_monitor.h +0 -0
  267. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/monitors/particles_monitor.py +0 -0
  268. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/multiline.py +0 -0
  269. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/multiline_legacy/__init__.py +0 -0
  270. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/multiline_legacy/multiline_legacy.py +0 -0
  271. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/multiline_legacy/shared_knobs.py +0 -0
  272. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/multisetter/__init__.py +0 -0
  273. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/multisetter/multisetter.py +0 -0
  274. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/particles/__init__.py +0 -0
  275. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/particles/constants.py +0 -0
  276. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/particles/masses.py +0 -0
  277. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/particles/pdg.py +0 -0
  278. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/particles/rng_src/base_rng.h +0 -0
  279. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/particles/rng_src/particles_rng.h +0 -0
  280. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/pipeline/__init__.py +0 -0
  281. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/pipeline/core.py +0 -0
  282. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/pipeline/manager.py +0 -0
  283. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/pipeline/multitracker.py +0 -0
  284. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/progress_indicator.py +0 -0
  285. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/random/__init__.py +0 -0
  286. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/random/random_generators.py +0 -0
  287. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/random/random_src/exponential.h +0 -0
  288. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/random/random_src/exponential_integral_Ei.h +0 -0
  289. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/random/random_src/normal.h +0 -0
  290. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/random/random_src/rutherford.h +0 -0
  291. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/random/random_src/uniform.h +0 -0
  292. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/random/random_src/uniform_accurate.h +0 -0
  293. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/slicing.py +0 -0
  294. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/survey.py +0 -0
  295. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/svgutils/__init__.py +0 -0
  296. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/svgutils/parser.py +0 -0
  297. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/svgutils/path.py +0 -0
  298. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/svgutils/svgutils.py +0 -0
  299. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/synctime.py +0 -0
  300. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/targets.py +0 -0
  301. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/tracker.py +0 -0
  302. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/tracker_data.py +0 -0
  303. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/tracker_src/tracker.h +0 -0
  304. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack/trajectory_correction.py +0 -0
  305. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack.egg-info/SOURCES.txt +0 -0
  306. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack.egg-info/dependency_links.txt +0 -0
  307. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack.egg-info/requires.txt +0 -0
  308. {xtrack-0.83.2 → xtrack-0.83.4}/xtrack.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: xtrack
3
- Version: 0.83.2
3
+ Version: 0.83.4
4
4
  Summary: Tracking library for particle accelerators
5
5
  Home-page: https://xsuite.readthedocs.io/
6
6
  Download-URL: https://pypi.python.org/pypi/xtrack
@@ -618,6 +618,7 @@ def test_assemble_ring():
618
618
  cell3_select = ring2.select(start='start.cell.3.arc.2', end='end.cell.3.arc.2',
619
619
  name='cell3_copy')
620
620
  assert 'cell3_copy' in env.lines
621
+ assert cell3_select.particle_ref is not None
621
622
  assert env.lines['cell3_copy'] is cell3_select
622
623
  assert cell3_select._element_dict is env.element_dict
623
624
  assert cell3_select.element_names[0] == 'start.cell.3.arc.2'
@@ -643,9 +643,11 @@ def test_match_bump_sets_init_middle(test_context):
643
643
  'hllhc15_thick/lhc_thick_with_knobs.json')
644
644
  line.build_tracker(test_context)
645
645
 
646
+ line.insert('mymarker', xt.Marker(), at='mb.c28l8.b1@start')
647
+
646
648
  opt = line.match(
647
649
  start='mq.30l8.b1', end='mq.23l8.b1',
648
- init_at='mb.b28l8.b1', betx=1, bety=1, y=3e-3, py=0, # <-- conditions at point inside the range
650
+ init_at='mymarker', betx=1, bety=1, y=3e-3, py=0, # <-- conditions at point inside the range
649
651
  vary=xt.VaryList(['acbv30.l8b1', 'acbv28.l8b1', 'acbv26.l8b1', 'acbv24.l8b1'],
650
652
  step=1e-10, limits=[-1e-3, 1e-3]),
651
653
  targets = [
@@ -0,0 +1 @@
1
+ __version__ = '0.83.4'
@@ -116,95 +116,99 @@ void magnet_apply_radiation_single_particle(
116
116
 
117
117
  if ((spin_flag != 0) && (spin_x_0 != 0. || spin_y_0 != 0. || spin_z_0 != 0.)){
118
118
 
119
- double const kin_px_mean = (old_px + new_ax);
120
- double const kin_py_mean = (old_py + new_ay);
121
-
122
- double const kin_pz_mean = sqrt((1 + delta)*(1 + delta) - kin_px_mean * kin_px_mean - kin_py_mean * kin_py_mean);
123
-
124
- double const beta_x = beta * (kin_px_mean / kin_pz_mean);
125
- double const beta_y = beta * (kin_py_mean / kin_pz_mean);
126
- double const beta_z = sqrt(beta*beta - beta_x * beta_x - beta_y * beta_y);
127
-
128
- double const iv_x = beta_x / beta;
129
- double const iv_y = beta_y / beta;
130
- double const iv_z = beta_z / beta;
131
-
132
- double B_par_spin = Bx_T * iv_x + By_T * iv_y + Bz_T * iv_z;
133
- double const B_par_spin_x = B_par_spin * iv_x;
134
- double const B_par_spin_y = B_par_spin * iv_y;
135
- double const B_par_spin_z = B_par_spin * iv_z;
136
-
137
- double const B_perp_spin_x = Bx_T - B_par_spin_x;
138
- double const B_perp_spin_y = By_T - B_par_spin_y;
139
- double const B_perp_spin_z = Bz_T - B_par_spin_z;
140
-
141
- double const brho_part = P_J / (q0 * QELEM);
142
-
143
- double const G_spin = LocalParticle_get_anomalous_magnetic_moment(part);
144
-
145
- double const Omega_BMT_x = -1/brho_part * (
146
- (1 + G_spin*gamma) * B_perp_spin_x + (1 + G_spin) * B_par_spin_x);
147
- double const Omega_BMT_y = -1/brho_part * (
148
- (1 + G_spin*gamma) * B_perp_spin_y + (1 + G_spin) * B_par_spin_y);
149
- double const Omega_BMT_z = -1/brho_part * (
150
- (1 + G_spin*gamma) * B_perp_spin_z + (1 + G_spin) * B_par_spin_z);
151
-
152
- double Omega_BMT_mod = sqrt(Omega_BMT_x * Omega_BMT_x +
153
- Omega_BMT_y * Omega_BMT_y + Omega_BMT_z * Omega_BMT_z);
154
-
155
- if (Omega_BMT_mod > 1e-10){
156
-
157
- double const omega_x = Omega_BMT_x / Omega_BMT_mod;
158
- double const omega_y = Omega_BMT_y / Omega_BMT_mod;
159
- double const omega_z = Omega_BMT_z / Omega_BMT_mod;
160
-
161
- double const phi = Omega_BMT_mod * l_path;
162
-
163
- double const sin_phi_2 = sin(phi/2);
164
- double const cos_phi_2 = cos(phi/2);
165
-
166
- // Quaternion rotation
167
- double const t0 = cos_phi_2;
168
- double const tx = omega_x * sin_phi_2;
169
- double const ty = omega_y * sin_phi_2;
170
- double const tz = omega_z * sin_phi_2;
171
-
172
- // Rotation matrix
173
- double const M11 = t0 * t0 + tx * tx - ty * ty - tz * tz;
174
- double const M12 = 2 * (tx * ty - t0 * tz);
175
- double const M13 = 2 * (tx * tz + t0 * ty);
176
- double const M21 = 2 * (tx * ty + t0 * tz);
177
- double const M22 = t0 * t0 - tx * tx + ty * ty - tz * tz;
178
- double const M23 = 2 * (ty * tz - t0 * tx);
179
- double const M31 = 2 * (tx * tz - t0 * ty);
180
- double const M32 = 2 * (ty * tz + t0 * tx);
181
- double const M33 = t0 * t0 - tx * tx - ty * ty + tz * tz;
182
-
183
- double sin_hxl2 = 0.;
184
- double cos_hxl2 = 1.;
185
- if (hx != 0.){
186
- sin_hxl2 = sin(hx * length / 2);
187
- cos_hxl2 = cos(hx * length / 2);
119
+ #ifdef XSUITE_BACKTRACK
120
+ LocalParticle_set_state(part, -33);
121
+ #else
122
+ double const kin_px_mean = (old_px + new_ax);
123
+ double const kin_py_mean = (old_py + new_ay);
124
+
125
+ double const kin_pz_mean = sqrt((1 + delta)*(1 + delta) - kin_px_mean * kin_px_mean - kin_py_mean * kin_py_mean);
126
+
127
+ double const beta_x = beta * (kin_px_mean / kin_pz_mean);
128
+ double const beta_y = beta * (kin_py_mean / kin_pz_mean);
129
+ double const beta_z = sqrt(beta*beta - beta_x * beta_x - beta_y * beta_y);
130
+
131
+ double const iv_x = beta_x / beta;
132
+ double const iv_y = beta_y / beta;
133
+ double const iv_z = beta_z / beta;
134
+
135
+ double B_par_spin = Bx_T * iv_x + By_T * iv_y + Bz_T * iv_z;
136
+ double const B_par_spin_x = B_par_spin * iv_x;
137
+ double const B_par_spin_y = B_par_spin * iv_y;
138
+ double const B_par_spin_z = B_par_spin * iv_z;
139
+
140
+ double const B_perp_spin_x = Bx_T - B_par_spin_x;
141
+ double const B_perp_spin_y = By_T - B_par_spin_y;
142
+ double const B_perp_spin_z = Bz_T - B_par_spin_z;
143
+
144
+ double const brho_part = P_J / (q0 * QELEM);
145
+
146
+ double const G_spin = LocalParticle_get_anomalous_magnetic_moment(part);
147
+
148
+ double const Omega_BMT_x = -1/brho_part * (
149
+ (1 + G_spin*gamma) * B_perp_spin_x + (1 + G_spin) * B_par_spin_x);
150
+ double const Omega_BMT_y = -1/brho_part * (
151
+ (1 + G_spin*gamma) * B_perp_spin_y + (1 + G_spin) * B_par_spin_y);
152
+ double const Omega_BMT_z = -1/brho_part * (
153
+ (1 + G_spin*gamma) * B_perp_spin_z + (1 + G_spin) * B_par_spin_z);
154
+
155
+ double Omega_BMT_mod = sqrt(Omega_BMT_x * Omega_BMT_x +
156
+ Omega_BMT_y * Omega_BMT_y + Omega_BMT_z * Omega_BMT_z);
157
+
158
+ if (Omega_BMT_mod > 1e-10){
159
+
160
+ double const omega_x = Omega_BMT_x / Omega_BMT_mod;
161
+ double const omega_y = Omega_BMT_y / Omega_BMT_mod;
162
+ double const omega_z = Omega_BMT_z / Omega_BMT_mod;
163
+
164
+ double const phi = Omega_BMT_mod * l_path;
165
+
166
+ double const sin_phi_2 = sin(phi/2);
167
+ double const cos_phi_2 = cos(phi/2);
168
+
169
+ // Quaternion rotation
170
+ double const t0 = cos_phi_2;
171
+ double const tx = omega_x * sin_phi_2;
172
+ double const ty = omega_y * sin_phi_2;
173
+ double const tz = omega_z * sin_phi_2;
174
+
175
+ // Rotation matrix
176
+ double const M11 = t0 * t0 + tx * tx - ty * ty - tz * tz;
177
+ double const M12 = 2 * (tx * ty - t0 * tz);
178
+ double const M13 = 2 * (tx * tz + t0 * ty);
179
+ double const M21 = 2 * (tx * ty + t0 * tz);
180
+ double const M22 = t0 * t0 - tx * tx + ty * ty - tz * tz;
181
+ double const M23 = 2 * (ty * tz - t0 * tx);
182
+ double const M31 = 2 * (tx * tz - t0 * ty);
183
+ double const M32 = 2 * (ty * tz + t0 * tx);
184
+ double const M33 = t0 * t0 - tx * tx - ty * ty + tz * tz;
185
+
186
+ double sin_hxl2 = 0.;
187
+ double cos_hxl2 = 1.;
188
+ if (hx != 0.){
189
+ sin_hxl2 = sin(hx * length / 2);
190
+ cos_hxl2 = cos(hx * length / 2);
191
+ }
192
+ // Entry rotation (bend frame)
193
+ double const spin_x_1 = spin_x_0 * cos_hxl2 + spin_z_0 * sin_hxl2;
194
+ double const spin_y_1 = spin_y_0;
195
+ double const spin_z_1 = -spin_x_0 * sin_hxl2 + spin_z_0 * cos_hxl2;
196
+
197
+ // BMT rotation
198
+ double const spin_x_2 = M11 * spin_x_1 + M12 * spin_y_1 + M13 * spin_z_1;
199
+ double const spin_y_2 = M21 * spin_x_1 + M22 * spin_y_1 + M23 * spin_z_1;
200
+ double const spin_z_2 = M31 * spin_x_1 + M32 * spin_y_1 + M33 * spin_z_1;
201
+
202
+ // Exit rotation (bend frame)
203
+ double const spin_x_3 = spin_x_2 * cos_hxl2 + spin_z_2 * sin_hxl2;
204
+ double const spin_y_3 = spin_y_2;
205
+ double const spin_z_3 = -spin_x_2 * sin_hxl2 + spin_z_2 * cos_hxl2;
206
+
207
+ LocalParticle_set_spin_x(part, spin_x_3);
208
+ LocalParticle_set_spin_y(part, spin_y_3);
209
+ LocalParticle_set_spin_z(part, spin_z_3);
188
210
  }
189
- // Entry rotation (bend frame)
190
- double const spin_x_1 = spin_x_0 * cos_hxl2 + spin_z_0 * sin_hxl2;
191
- double const spin_y_1 = spin_y_0;
192
- double const spin_z_1 = -spin_x_0 * sin_hxl2 + spin_z_0 * cos_hxl2;
193
-
194
- // BMT rotation
195
- double const spin_x_2 = M11 * spin_x_1 + M12 * spin_y_1 + M13 * spin_z_1;
196
- double const spin_y_2 = M21 * spin_x_1 + M22 * spin_y_1 + M23 * spin_z_1;
197
- double const spin_z_2 = M31 * spin_x_1 + M32 * spin_y_1 + M33 * spin_z_1;
198
-
199
- // Exit rotation (bend frame)
200
- double const spin_x_3 = spin_x_2 * cos_hxl2 + spin_z_2 * sin_hxl2;
201
- double const spin_y_3 = spin_y_2;
202
- double const spin_z_3 = -spin_x_2 * sin_hxl2 + spin_z_2 * cos_hxl2;
203
-
204
- LocalParticle_set_spin_x(part, spin_x_3);
205
- LocalParticle_set_spin_y(part, spin_y_3);
206
- LocalParticle_set_spin_z(part, spin_z_3);
207
- }
211
+ #endif
208
212
  }
209
213
 
210
214
  // Synchrotron radiation
@@ -2248,8 +2248,10 @@ class Line:
2248
2248
  def cut_at_s(self, s: List[float], s_tol=1e-6, return_slices=False):
2249
2249
  """Slice the line so that positions in s never fall inside an element."""
2250
2250
 
2251
- if self._has_valid_tracker():
2252
- self.discard_tracker()
2251
+ if not self._has_valid_tracker():
2252
+ self.build_tracker() # To resolve replicase and slices
2253
+
2254
+ self.discard_tracker()
2253
2255
 
2254
2256
  cuts_for_element = self._elements_intersecting_s(s, s_tol=s_tol)
2255
2257
  strategies = [Strategy(None)] # catch-all, ignore unaffected elements
@@ -3582,6 +3584,7 @@ class Line:
3582
3584
  assert inplace is True, 'Only inplace is supported for now'
3583
3585
 
3584
3586
  self._frozen_check()
3587
+ self.replace_all_repeated_elements()
3585
3588
 
3586
3589
  if keep is None:
3587
3590
  keep = []
@@ -3904,6 +3907,7 @@ class Line:
3904
3907
  ' used')
3905
3908
 
3906
3909
  self._frozen_check()
3910
+ self.replace_all_repeated_elements()
3907
3911
 
3908
3912
  if keep is None:
3909
3913
  keep = []
@@ -4182,6 +4186,7 @@ class Line:
4182
4186
  self._env_if_needed()
4183
4187
 
4184
4188
  out = self.env.new_line(components=list(tt.env_name), name=name)
4189
+ out.particle_ref = self.particle_ref.copy() if self.particle_ref else None
4185
4190
 
4186
4191
  if hasattr(self, '_in_multiline') and self._in_multiline is not None:
4187
4192
  out.env._var_management = None
@@ -221,7 +221,7 @@ class Particles(xo.HybridClass):
221
221
 
222
222
  accepted_args = set(self._xofields.keys()) | {
223
223
  'energy0', 'tau', 'pzeta', 'mass_ratio', 'mass', 'kinetic_energy0',
224
- '_context', '_buffer', '_offset', 'p0',
224
+ '_context', '_buffer', '_offset', 'p0', 'name',
225
225
  }
226
226
  if set(kwargs.keys()) - accepted_args:
227
227
  raise NameError(f'Invalid argument(s) provided: '
@@ -383,6 +383,8 @@ class Particles(xo.HybridClass):
383
383
  if isinstance(self._context, xo.ContextCpu) and not _no_reorganize:
384
384
  self.reorganize()
385
385
 
386
+ if 'name' in kwargs.keys():
387
+ self.name = kwargs['name']
386
388
 
387
389
  @classmethod
388
390
  def from_dict(cls, dct, load_rng_state=True, **kwargs):
@@ -7,7 +7,9 @@ import xtrack as xt
7
7
  import xobjects as xo
8
8
 
9
9
  def compensate_radiation_energy_loss(line, delta0=0, rtol_eneloss=1e-12,
10
- max_iter=100, verbose=True, **kwargs):
10
+ max_iter=100, verbose=True,
11
+ co_search_at=None,
12
+ **kwargs):
11
13
 
12
14
  assert isinstance(line._context, xo.ContextCpu), "Only CPU context is supported"
13
15
  assert line.particle_ref is not None, "Particle reference is not set"
@@ -24,7 +26,7 @@ def compensate_radiation_energy_loss(line, delta0=0, rtol_eneloss=1e-12,
24
26
 
25
27
  line.config.XTRACK_MULTIPOLE_NO_SYNRAD = True
26
28
  with xt.freeze_longitudinal(line):
27
- particle_on_co = line.find_closed_orbit()
29
+ particle_on_co = line.find_closed_orbit(co_search_at=co_search_at)
28
30
  line.config.XTRACK_MULTIPOLE_NO_SYNRAD = False
29
31
 
30
32
  beta0 = float(particle_on_co._xobject.beta0[0])
@@ -449,6 +449,12 @@ def twiss_line(line, particle_ref=None, method=None,
449
449
  else:
450
450
  periodic = True
451
451
  periodic_mode = init or 'periodic'
452
+ assert x is None, '`x` not supported for periodic twiss'
453
+ assert px is None, '`px` not supported for periodic twiss'
454
+ assert y is None, '`y` not supported for periodic twiss'
455
+ assert py is None, '`py` not supported for periodic twiss'
456
+ assert zeta is None, '`zeta` not supported for periodic twiss'
457
+ assert delta is None, '`delta` not supported for periodic twiss'
452
458
 
453
459
  if freeze_longitudinal:
454
460
  kwargs = _updated_kwargs_from_locals(kwargs, locals().copy())
@@ -631,6 +637,11 @@ def twiss_line(line, particle_ref=None, method=None,
631
637
  raise ValueError(f'init={init} not anymore supported')
632
638
  assert init == 'periodic' or 'full_periodic'
633
639
 
640
+ if not periodic:
641
+ if delta0 is not None or zeta0 is not None:
642
+ raise ValueError(
643
+ 'delta0 and zeta0 cannot be provided for open twiss')
644
+
634
645
  if periodic:
635
646
 
636
647
  assert not _initial_particles
@@ -747,6 +758,8 @@ def twiss_line(line, particle_ref=None, method=None,
747
758
 
748
759
  if eneloss_and_damping and not only_orbit:
749
760
  assert 'R_matrix' in twiss_res._data
761
+ if method == '4d':
762
+ raise ValueError('method="4d" not supported for eneloss_and_damping=True')
750
763
  if radiation_method != 'full' or twiss_res._data['R_matrix_ebe'] is None:
751
764
  with xt.line._preserve_config(line):
752
765
  line.config.XTRACK_SYNRAD_KICK_SAME_AS_FIRST = False
@@ -2123,6 +2136,14 @@ def _handle_init_inside_range(kwargs):
2123
2136
  reverse = kwargs.pop('reverse')
2124
2137
 
2125
2138
  ele_name_init = init.element_name
2139
+ ele_init = line.get(ele_name_init)
2140
+ if isinstance(ele_init, xt.Replica):
2141
+ ele_init = ele_init.resolve()
2142
+ if not isinstance(ele_init, xt.Marker):
2143
+ raise ValueError(
2144
+ 'The element at the initial position is not a Marker. '
2145
+ 'This is not yet supported')
2146
+
2126
2147
  if reverse:
2127
2148
  assert _str_to_index(line, ele_name_init) <= _str_to_index(line, start)
2128
2149
  assert _str_to_index(line, ele_name_init) >= _str_to_index(line, end)
@@ -223,7 +223,7 @@ class TwissPlot(object):
223
223
 
224
224
  if self.lattice:
225
225
  self.lattice.clear()
226
- self._lattice(["k0l", "kn0l", "angle"], "#a0ffa0", "Bend h")
226
+ self._lattice(["angle_rad"], "#a0ffa0", "Bend h")
227
227
  self._lattice(["ks0l"], "#ffa0a0", "Bend v")
228
228
  self._lattice(["kn1l", "k1l"], "#a0a0ff", "Quad")
229
229
  self._lattice(["hkick"], "#e0a0e0", "Kick h")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: xtrack
3
- Version: 0.83.2
3
+ Version: 0.83.4
4
4
  Summary: Tracking library for particle accelerators
5
5
  Home-page: https://xsuite.readthedocs.io/
6
6
  Download-URL: https://pypi.python.org/pypi/xtrack
@@ -1 +0,0 @@
1
- __version__ = '0.83.2'
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