xtrack 0.84.3__tar.gz → 0.84.5__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 (309) hide show
  1. {xtrack-0.84.3/xtrack.egg-info → xtrack-0.84.5}/PKG-INFO +1 -1
  2. {xtrack-0.84.3 → xtrack-0.84.5}/tests/test_radiation_equilibrium_emittances.py +18 -18
  3. {xtrack-0.84.3 → xtrack-0.84.5}/tests/test_radiation_equilibrium_emittances_thick.py +16 -16
  4. {xtrack-0.84.3 → xtrack-0.84.5}/tests/test_radiation_integrals.py +2 -1
  5. {xtrack-0.84.3 → xtrack-0.84.5}/tests/test_spin.py +23 -0
  6. xtrack-0.84.5/xtrack/_version.py +1 -0
  7. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/twiss.py +118 -87
  8. {xtrack-0.84.3 → xtrack-0.84.5/xtrack.egg-info}/PKG-INFO +1 -1
  9. xtrack-0.84.3/xtrack/_version.py +0 -1
  10. {xtrack-0.84.3 → xtrack-0.84.5}/LICENSE +0 -0
  11. {xtrack-0.84.3 → xtrack-0.84.5}/MANIFEST.in +0 -0
  12. {xtrack-0.84.3 → xtrack-0.84.5}/README.md +0 -0
  13. {xtrack-0.84.3 → xtrack-0.84.5}/ducktrack/__init__.py +0 -0
  14. {xtrack-0.84.3 → xtrack-0.84.5}/ducktrack/base_classes.py +0 -0
  15. {xtrack-0.84.3 → xtrack-0.84.5}/ducktrack/be_beamfields/BB6D.py +0 -0
  16. {xtrack-0.84.3 → xtrack-0.84.5}/ducktrack/be_beamfields/BB6Ddata.py +0 -0
  17. {xtrack-0.84.3 → xtrack-0.84.5}/ducktrack/be_beamfields/__init__.py +0 -0
  18. {xtrack-0.84.3 → xtrack-0.84.5}/ducktrack/be_beamfields/beambeam.py +0 -0
  19. {xtrack-0.84.3 → xtrack-0.84.5}/ducktrack/be_beamfields/boost.py +0 -0
  20. {xtrack-0.84.3 → xtrack-0.84.5}/ducktrack/be_beamfields/gaussian_fields.py +0 -0
  21. {xtrack-0.84.3 → xtrack-0.84.5}/ducktrack/be_beamfields/propagate_sigma_matrix.py +0 -0
  22. {xtrack-0.84.3 → xtrack-0.84.5}/ducktrack/be_beamfields/qgauss.py +0 -0
  23. {xtrack-0.84.3 → xtrack-0.84.5}/ducktrack/be_beamfields/slicing.py +0 -0
  24. {xtrack-0.84.3 → xtrack-0.84.5}/ducktrack/be_beamfields/spacecharge.py +0 -0
  25. {xtrack-0.84.3 → xtrack-0.84.5}/ducktrack/elements.py +0 -0
  26. {xtrack-0.84.3 → xtrack-0.84.5}/ducktrack/line.py +0 -0
  27. {xtrack-0.84.3 → xtrack-0.84.5}/ducktrack/mathlibs.py +0 -0
  28. {xtrack-0.84.3 → xtrack-0.84.5}/ducktrack/particles.py +0 -0
  29. {xtrack-0.84.3 → xtrack-0.84.5}/ducktrack/temp_pyparticles.py +0 -0
  30. {xtrack-0.84.3 → xtrack-0.84.5}/pyproject.toml +0 -0
  31. {xtrack-0.84.3 → xtrack-0.84.5}/setup.cfg +0 -0
  32. {xtrack-0.84.3 → xtrack-0.84.5}/setup.py +0 -0
  33. {xtrack-0.84.3 → xtrack-0.84.5}/tests/test_acceleration.py +0 -0
  34. {xtrack-0.84.3 → xtrack-0.84.5}/tests/test_amplitude_detuning.py +0 -0
  35. {xtrack-0.84.3 → xtrack-0.84.5}/tests/test_aperture_table.py +0 -0
  36. {xtrack-0.84.3 → xtrack-0.84.5}/tests/test_aperture_turn_ele_and_monitor.py +0 -0
  37. {xtrack-0.84.3 → xtrack-0.84.5}/tests/test_apertures.py +0 -0
  38. {xtrack-0.84.3 → xtrack-0.84.5}/tests/test_attr_replicas_and_slices.py +0 -0
  39. {xtrack-0.84.3 → xtrack-0.84.5}/tests/test_bucket_with_ref_energy_change.py +0 -0
  40. {xtrack-0.84.3 → xtrack-0.84.5}/tests/test_cavity_absolute_time.py +0 -0
  41. {xtrack-0.84.3 → xtrack-0.84.5}/tests/test_chromatic_functions_vs_madx.py +0 -0
  42. {xtrack-0.84.3 → xtrack-0.84.5}/tests/test_coasting.py +0 -0
  43. {xtrack-0.84.3 → xtrack-0.84.5}/tests/test_collective_tracker.py +0 -0
  44. {xtrack-0.84.3 → xtrack-0.84.5}/tests/test_collimation.py +0 -0
  45. {xtrack-0.84.3 → xtrack-0.84.5}/tests/test_electron_cooler.py +0 -0
  46. {xtrack-0.84.3 → xtrack-0.84.5}/tests/test_element_characterization_functions.py +0 -0
  47. {xtrack-0.84.3 → xtrack-0.84.5}/tests/test_element_internal_record.py +0 -0
  48. {xtrack-0.84.3 → xtrack-0.84.5}/tests/test_elements.py +0 -0
  49. {xtrack-0.84.3 → xtrack-0.84.5}/tests/test_elements_classflags.py +0 -0
  50. {xtrack-0.84.3 → xtrack-0.84.5}/tests/test_elements_thick.py +0 -0
  51. {xtrack-0.84.3 → xtrack-0.84.5}/tests/test_environment.py +0 -0
  52. {xtrack-0.84.3 → xtrack-0.84.5}/tests/test_fcc_ee_solenoid_correction.py +0 -0
  53. {xtrack-0.84.3 → xtrack-0.84.5}/tests/test_fcc_ee_solenoid_correction_new_optimize_api.py +0 -0
  54. {xtrack-0.84.3 → xtrack-0.84.5}/tests/test_footprint.py +0 -0
  55. {xtrack-0.84.3 → xtrack-0.84.5}/tests/test_freeze_longitudinal.py +0 -0
  56. {xtrack-0.84.3 → xtrack-0.84.5}/tests/test_full_rings.py +0 -0
  57. {xtrack-0.84.3 → xtrack-0.84.5}/tests/test_h6_sps_beamline.py +0 -0
  58. {xtrack-0.84.3 → xtrack-0.84.5}/tests/test_hvkick.py +0 -0
  59. {xtrack-0.84.3 → xtrack-0.84.5}/tests/test_ions.py +0 -0
  60. {xtrack-0.84.3 → xtrack-0.84.5}/tests/test_legacy_multiline_to_env.py +0 -0
  61. {xtrack-0.84.3 → xtrack-0.84.5}/tests/test_lhc_env.py +0 -0
  62. {xtrack-0.84.3 → xtrack-0.84.5}/tests/test_lhc_match_phase_15.py +0 -0
  63. {xtrack-0.84.3 → xtrack-0.84.5}/tests/test_line.py +0 -0
  64. {xtrack-0.84.3 → xtrack-0.84.5}/tests/test_lumi.py +0 -0
  65. {xtrack-0.84.3 → xtrack-0.84.5}/tests/test_mad_writer.py +0 -0
  66. {xtrack-0.84.3 → xtrack-0.84.5}/tests/test_madloader.py +0 -0
  67. {xtrack-0.84.3 → xtrack-0.84.5}/tests/test_madnginterface.py +0 -0
  68. {xtrack-0.84.3 → xtrack-0.84.5}/tests/test_magnet.py +0 -0
  69. {xtrack-0.84.3 → xtrack-0.84.5}/tests/test_match_and_track_from_element.py +0 -0
  70. {xtrack-0.84.3 → xtrack-0.84.5}/tests/test_match_coupling_knob.py +0 -0
  71. {xtrack-0.84.3 → xtrack-0.84.5}/tests/test_match_nested.py +0 -0
  72. {xtrack-0.84.3 → xtrack-0.84.5}/tests/test_match_optics_and_ip_knob.py +0 -0
  73. {xtrack-0.84.3 → xtrack-0.84.5}/tests/test_match_optics_and_ip_knob_new_optimize_api.py +0 -0
  74. {xtrack-0.84.3 → xtrack-0.84.5}/tests/test_match_orbit_bump.py +0 -0
  75. {xtrack-0.84.3 → xtrack-0.84.5}/tests/test_match_tune_chroma_cminus.py +0 -0
  76. {xtrack-0.84.3 → xtrack-0.84.5}/tests/test_monitor.py +0 -0
  77. {xtrack-0.84.3 → xtrack-0.84.5}/tests/test_multi_bunch_gauss.py +0 -0
  78. {xtrack-0.84.3 → xtrack-0.84.5}/tests/test_multiline.py +0 -0
  79. {xtrack-0.84.3 → xtrack-0.84.5}/tests/test_multisetter.py +0 -0
  80. {xtrack-0.84.3 → xtrack-0.84.5}/tests/test_multispecies.py +0 -0
  81. {xtrack-0.84.3 → xtrack-0.84.5}/tests/test_native_madloader.py +0 -0
  82. {xtrack-0.84.3 → xtrack-0.84.5}/tests/test_optimize_for_tracking.py +0 -0
  83. {xtrack-0.84.3 → xtrack-0.84.5}/tests/test_particles.py +0 -0
  84. {xtrack-0.84.3 → xtrack-0.84.5}/tests/test_particles_basics.py +0 -0
  85. {xtrack-0.84.3 → xtrack-0.84.5}/tests/test_particles_pdg.py +0 -0
  86. {xtrack-0.84.3 → xtrack-0.84.5}/tests/test_periodic_symmetric_twiss_and_match.py +0 -0
  87. {xtrack-0.84.3 → xtrack-0.84.5}/tests/test_pipeline.py +0 -0
  88. {xtrack-0.84.3 → xtrack-0.84.5}/tests/test_prebuild_kernels.py +0 -0
  89. {xtrack-0.84.3 → xtrack-0.84.5}/tests/test_ps_against_ptc.py +0 -0
  90. {xtrack-0.84.3 → xtrack-0.84.5}/tests/test_ps_multiturn_twiss.py +0 -0
  91. {xtrack-0.84.3 → xtrack-0.84.5}/tests/test_psb_chicane.py +0 -0
  92. {xtrack-0.84.3 → xtrack-0.84.5}/tests/test_pyht_interface.py +0 -0
  93. {xtrack-0.84.3 → xtrack-0.84.5}/tests/test_radial_steering.py +0 -0
  94. {xtrack-0.84.3 → xtrack-0.84.5}/tests/test_radiation.py +0 -0
  95. {xtrack-0.84.3 → xtrack-0.84.5}/tests/test_random_gen.py +0 -0
  96. {xtrack-0.84.3 → xtrack-0.84.5}/tests/test_random_gen_exp.py +0 -0
  97. {xtrack-0.84.3 → xtrack-0.84.5}/tests/test_random_gen_gauss.py +0 -0
  98. {xtrack-0.84.3 → xtrack-0.84.5}/tests/test_random_gen_ruth.py +0 -0
  99. {xtrack-0.84.3 → xtrack-0.84.5}/tests/test_rbend_rbarc.py +0 -0
  100. {xtrack-0.84.3 → xtrack-0.84.5}/tests/test_rf_track.py +0 -0
  101. {xtrack-0.84.3 → xtrack-0.84.5}/tests/test_rotation_signs.py +0 -0
  102. {xtrack-0.84.3 → xtrack-0.84.5}/tests/test_second_order_taylor_map.py +0 -0
  103. {xtrack-0.84.3 → xtrack-0.84.5}/tests/test_seeds.py +0 -0
  104. {xtrack-0.84.3 → xtrack-0.84.5}/tests/test_slice_and_insert_with_replicas.py +0 -0
  105. {xtrack-0.84.3 → xtrack-0.84.5}/tests/test_slice_elements.py +0 -0
  106. {xtrack-0.84.3 → xtrack-0.84.5}/tests/test_slicing.py +0 -0
  107. {xtrack-0.84.3 → xtrack-0.84.5}/tests/test_solenoid_bz_map_vs_boris.py +0 -0
  108. {xtrack-0.84.3 → xtrack-0.84.5}/tests/test_spacecharge_in_ring.py +0 -0
  109. {xtrack-0.84.3 → xtrack-0.84.5}/tests/test_sps_thick.py +0 -0
  110. {xtrack-0.84.3 → xtrack-0.84.5}/tests/test_survey.py +0 -0
  111. {xtrack-0.84.3 → xtrack-0.84.5}/tests/test_tapering.py +0 -0
  112. {xtrack-0.84.3 → xtrack-0.84.5}/tests/test_thick_lhc.py +0 -0
  113. {xtrack-0.84.3 → xtrack-0.84.5}/tests/test_tilt_shifts.py +0 -0
  114. {xtrack-0.84.3 → xtrack-0.84.5}/tests/test_tracker.py +0 -0
  115. {xtrack-0.84.3 → xtrack-0.84.5}/tests/test_trajectory_correcton.py +0 -0
  116. {xtrack-0.84.3 → xtrack-0.84.5}/tests/test_twiss.py +0 -0
  117. {xtrack-0.84.3 → xtrack-0.84.5}/tests/test_twiss_vs_madx_psb.py +0 -0
  118. {xtrack-0.84.3 → xtrack-0.84.5}/tests/test_vs_madx.py +0 -0
  119. {xtrack-0.84.3 → xtrack-0.84.5}/tests/test_xmask_orbit_correction.py +0 -0
  120. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/__init__.py +0 -0
  121. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/_temp/__init__.py +0 -0
  122. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/_temp/boris_and_solenoid_map/__init__.py +0 -0
  123. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/_temp/boris_and_solenoid_map/boris.h +0 -0
  124. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/_temp/boris_and_solenoid_map/solenoid_field.py +0 -0
  125. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/_temp/lhc_match/__init__.py +0 -0
  126. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/_temp/lhc_match/gen_madx_optics_file.py +0 -0
  127. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/_temp/lhc_match/lhc_match.py +0 -0
  128. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/_temp/lhc_match/var_limits.py +0 -0
  129. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/aperture_meas.py +0 -0
  130. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/base_element.py +0 -0
  131. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/beam_elements/__init__.py +0 -0
  132. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/beam_elements/apertures.py +0 -0
  133. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/beam_elements/apertures_src/limitellipse.h +0 -0
  134. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/beam_elements/apertures_src/limitpolygon.h +0 -0
  135. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/beam_elements/apertures_src/limitracetrack.h +0 -0
  136. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/beam_elements/apertures_src/limitrect.h +0 -0
  137. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/beam_elements/apertures_src/limitrectellipse.h +0 -0
  138. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/beam_elements/apertures_src/longitudinallimitrect.h +0 -0
  139. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/beam_elements/beam_interaction.py +0 -0
  140. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/beam_elements/elements.py +0 -0
  141. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/beam_elements/elements_src/bend.h +0 -0
  142. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/beam_elements/elements_src/cavity.h +0 -0
  143. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/beam_elements/elements_src/dipole_fringe.h +0 -0
  144. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/beam_elements/elements_src/dipoleedge.h +0 -0
  145. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/beam_elements/elements_src/drift.h +0 -0
  146. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/beam_elements/elements_src/drift_slice.h +0 -0
  147. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/beam_elements/elements_src/drift_slice_bend.h +0 -0
  148. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/beam_elements/elements_src/drift_slice_octupole.h +0 -0
  149. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/beam_elements/elements_src/drift_slice_quadrupole.h +0 -0
  150. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/beam_elements/elements_src/drift_slice_rbend.h +0 -0
  151. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/beam_elements/elements_src/drift_slice_sextupole.h +0 -0
  152. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/beam_elements/elements_src/electroncooler.h +0 -0
  153. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/beam_elements/elements_src/elens.h +0 -0
  154. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/beam_elements/elements_src/exciter.h +0 -0
  155. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/beam_elements/elements_src/firstordertaylormap.h +0 -0
  156. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/beam_elements/elements_src/linesegmentmap.h +0 -0
  157. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/beam_elements/elements_src/magnet.h +0 -0
  158. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/beam_elements/elements_src/magnet_drift.h +0 -0
  159. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/beam_elements/elements_src/magnet_edge.h +0 -0
  160. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/beam_elements/elements_src/magnet_kick.h +0 -0
  161. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/beam_elements/elements_src/marker.h +0 -0
  162. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/beam_elements/elements_src/multipole.h +0 -0
  163. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/beam_elements/elements_src/multipoleedge.h +0 -0
  164. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/beam_elements/elements_src/nonlinearlens.h +0 -0
  165. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/beam_elements/elements_src/octupole.h +0 -0
  166. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/beam_elements/elements_src/quadrupole.h +0 -0
  167. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/beam_elements/elements_src/rbend.h +0 -0
  168. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/beam_elements/elements_src/referenceenergyincrease.h +0 -0
  169. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/beam_elements/elements_src/rfmultipole.h +0 -0
  170. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/beam_elements/elements_src/second_order_taylor_map.h +0 -0
  171. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/beam_elements/elements_src/sextupole.h +0 -0
  172. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/beam_elements/elements_src/simplethinbend.h +0 -0
  173. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/beam_elements/elements_src/simplethinquadrupole.h +0 -0
  174. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/beam_elements/elements_src/solenoid.h +0 -0
  175. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/beam_elements/elements_src/srotation.h +0 -0
  176. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/beam_elements/elements_src/thick_slice_bend.h +0 -0
  177. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/beam_elements/elements_src/thick_slice_drift.h +0 -0
  178. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/beam_elements/elements_src/thick_slice_octupole.h +0 -0
  179. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/beam_elements/elements_src/thick_slice_quadrupole.h +0 -0
  180. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/beam_elements/elements_src/thick_slice_rbend.h +0 -0
  181. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/beam_elements/elements_src/thick_slice_sextupole.h +0 -0
  182. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/beam_elements/elements_src/thick_slice_solenoid.h +0 -0
  183. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/beam_elements/elements_src/thin_slice_bend.h +0 -0
  184. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/beam_elements/elements_src/thin_slice_bend_entry.h +0 -0
  185. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/beam_elements/elements_src/thin_slice_bend_exit.h +0 -0
  186. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/beam_elements/elements_src/thin_slice_octupole.h +0 -0
  187. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/beam_elements/elements_src/thin_slice_octupole_entry.h +0 -0
  188. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/beam_elements/elements_src/thin_slice_octupole_exit.h +0 -0
  189. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/beam_elements/elements_src/thin_slice_quadrupole.h +0 -0
  190. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/beam_elements/elements_src/thin_slice_quadrupole_entry.h +0 -0
  191. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/beam_elements/elements_src/thin_slice_quadrupole_exit.h +0 -0
  192. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/beam_elements/elements_src/thin_slice_rbend.h +0 -0
  193. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/beam_elements/elements_src/thin_slice_rbend_entry.h +0 -0
  194. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/beam_elements/elements_src/thin_slice_rbend_exit.h +0 -0
  195. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/beam_elements/elements_src/thin_slice_sextupole.h +0 -0
  196. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/beam_elements/elements_src/thin_slice_sextupole_entry.h +0 -0
  197. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/beam_elements/elements_src/thin_slice_sextupole_exit.h +0 -0
  198. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/beam_elements/elements_src/track_bend.h +0 -0
  199. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/beam_elements/elements_src/track_cavity.h +0 -0
  200. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/beam_elements/elements_src/track_dipole_edge_linear.h +0 -0
  201. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/beam_elements/elements_src/track_dipole_edge_nonlinear.h +0 -0
  202. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/beam_elements/elements_src/track_dipole_fringe.h +0 -0
  203. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/beam_elements/elements_src/track_drift.h +0 -0
  204. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/beam_elements/elements_src/track_magnet.h +0 -0
  205. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/beam_elements/elements_src/track_magnet_drift.h +0 -0
  206. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/beam_elements/elements_src/track_magnet_edge.h +0 -0
  207. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/beam_elements/elements_src/track_magnet_kick.h +0 -0
  208. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/beam_elements/elements_src/track_magnet_radiation.h +0 -0
  209. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/beam_elements/elements_src/track_mult_fringe.h +0 -0
  210. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/beam_elements/elements_src/track_multipolar_components.h +0 -0
  211. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/beam_elements/elements_src/track_multipole.h +0 -0
  212. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/beam_elements/elements_src/track_quadrupole.h +0 -0
  213. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/beam_elements/elements_src/track_solenoid.h +0 -0
  214. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/beam_elements/elements_src/track_srotation.h +0 -0
  215. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/beam_elements/elements_src/track_thick_bend.h +0 -0
  216. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/beam_elements/elements_src/track_thick_cfd.h +0 -0
  217. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/beam_elements/elements_src/track_wedge.h +0 -0
  218. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/beam_elements/elements_src/track_xrotation.h +0 -0
  219. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/beam_elements/elements_src/track_yrotation.h +0 -0
  220. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/beam_elements/elements_src/wedge.h +0 -0
  221. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/beam_elements/elements_src/wire.h +0 -0
  222. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/beam_elements/elements_src/xrotation.h +0 -0
  223. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/beam_elements/elements_src/xyshift.h +0 -0
  224. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/beam_elements/elements_src/yrotation.h +0 -0
  225. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/beam_elements/elements_src/zetashift.h +0 -0
  226. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/beam_elements/exciter.py +0 -0
  227. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/beam_elements/magnets.py +0 -0
  228. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/beam_elements/rft_element.py +0 -0
  229. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/beam_elements/slice_elements.py +0 -0
  230. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/beam_elements/slice_elements_thick.py +0 -0
  231. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/environment.py +0 -0
  232. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/footprint.py +0 -0
  233. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/general.py +0 -0
  234. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/headers/atomicadd.h +0 -0
  235. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/headers/checks.h +0 -0
  236. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/headers/constants.h +0 -0
  237. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/headers/particle_states.h +0 -0
  238. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/headers/synrad_spectrum.h +0 -0
  239. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/headers/track.h +0 -0
  240. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/internal_record.py +0 -0
  241. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/json.py +0 -0
  242. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/line.py +0 -0
  243. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/linear_normal_form.py +0 -0
  244. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/loss_location_refinement/__init__.py +0 -0
  245. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/loss_location_refinement/loss_location_refinement.py +0 -0
  246. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/lumi.py +0 -0
  247. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/mad_loader.py +0 -0
  248. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/mad_parser/__init__.py +0 -0
  249. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/mad_parser/loader.py +0 -0
  250. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/mad_parser/madx.lark +0 -0
  251. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/mad_parser/parse.py +0 -0
  252. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/mad_writer.py +0 -0
  253. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/madng_interface.py +0 -0
  254. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/match.py +0 -0
  255. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/monitors/__init__.py +0 -0
  256. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/monitors/beam_position_monitor.h +0 -0
  257. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/monitors/beam_position_monitor.py +0 -0
  258. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/monitors/beam_profile_monitor.h +0 -0
  259. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/monitors/beam_profile_monitor.py +0 -0
  260. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/monitors/beam_size_monitor.h +0 -0
  261. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/monitors/beam_size_monitor.py +0 -0
  262. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/monitors/last_turns_monitor.h +0 -0
  263. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/monitors/last_turns_monitor.py +0 -0
  264. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/monitors/particles_monitor.h +0 -0
  265. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/monitors/particles_monitor.py +0 -0
  266. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/multiline.py +0 -0
  267. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/multiline_legacy/__init__.py +0 -0
  268. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/multiline_legacy/multiline_legacy.py +0 -0
  269. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/multiline_legacy/shared_knobs.py +0 -0
  270. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/multisetter/__init__.py +0 -0
  271. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/multisetter/multisetter.py +0 -0
  272. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/particles/__init__.py +0 -0
  273. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/particles/constants.py +0 -0
  274. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/particles/masses.py +0 -0
  275. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/particles/particles.py +0 -0
  276. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/particles/pdg.py +0 -0
  277. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/particles/rng_src/base_rng.h +0 -0
  278. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/particles/rng_src/particles_rng.h +0 -0
  279. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/pipeline/__init__.py +0 -0
  280. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/pipeline/core.py +0 -0
  281. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/pipeline/manager.py +0 -0
  282. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/pipeline/multitracker.py +0 -0
  283. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/progress_indicator.py +0 -0
  284. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/random/__init__.py +0 -0
  285. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/random/random_generators.py +0 -0
  286. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/random/random_src/exponential.h +0 -0
  287. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/random/random_src/exponential_integral_Ei.h +0 -0
  288. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/random/random_src/normal.h +0 -0
  289. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/random/random_src/rutherford.h +0 -0
  290. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/random/random_src/uniform.h +0 -0
  291. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/random/random_src/uniform_accurate.h +0 -0
  292. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/slicing.py +0 -0
  293. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/survey.py +0 -0
  294. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/svgutils/__init__.py +0 -0
  295. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/svgutils/parser.py +0 -0
  296. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/svgutils/path.py +0 -0
  297. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/svgutils/svgutils.py +0 -0
  298. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/synctime.py +0 -0
  299. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/tapering.py +0 -0
  300. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/targets.py +0 -0
  301. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/tracker.py +0 -0
  302. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/tracker_data.py +0 -0
  303. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/tracker_src/tracker.h +0 -0
  304. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/trajectory_correction.py +0 -0
  305. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack/twissplot.py +0 -0
  306. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack.egg-info/SOURCES.txt +0 -0
  307. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack.egg-info/dependency_links.txt +0 -0
  308. {xtrack-0.84.3 → xtrack-0.84.5}/xtrack.egg-info/requires.txt +0 -0
  309. {xtrack-0.84.3 → xtrack-0.84.5}/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.84.3
3
+ Version: 0.84.5
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
@@ -122,34 +122,34 @@ def test_eq_emitt(conf):
122
122
  # for regression testing
123
123
  checked = False
124
124
  if not tilt_machine_by_90_degrees and not vertical_orbit_distortion and not wiggler_on:
125
- xo.assert_allclose(ex, 7.1357e-10, atol=0, rtol=1e-4)
126
- xo.assert_allclose(ey, 0, atol=1e-14, rtol=0)
127
- xo.assert_allclose(ez, 3.4595e-6, atol=0, rtol=1e-4)
125
+ xo.assert_allclose(ex, 7.09232e-10, atol=0, rtol=1e-4)
126
+ xo.assert_allclose(ey, 0, atol=1e-14, rtol=0)
127
+ xo.assert_allclose(ez, 3.43821e-06, atol=0, rtol=1e-4)
128
128
  checked = True
129
129
  elif tilt_machine_by_90_degrees and not vertical_orbit_distortion and not wiggler_on:
130
- xo.assert_allclose(ex, 0, atol=1e-14, rtol=0)
131
- xo.assert_allclose(ey, 7.1357e-10, atol=0, rtol=1e-4)
132
- xo.assert_allclose(ez, 3.4595e-6, atol=0, rtol=1e-4)
130
+ xo.assert_allclose(ex, 0, atol=1e-14, rtol=0)
131
+ xo.assert_allclose(ey, 7.09232e-10, atol=0, rtol=1e-4)
132
+ xo.assert_allclose(ez, 3.43821e-6, atol=0, rtol=1e-4)
133
133
  checked = True
134
134
  elif not tilt_machine_by_90_degrees and not vertical_orbit_distortion and wiggler_on:
135
- xo.assert_allclose(ex, 7.0714e-10, atol=0, rtol=1e-4)
136
- xo.assert_allclose(ey, 5.6113e-13, atol=0, rtol=4e-3)
137
- xo.assert_allclose(ez, 3.7089e-6, atol=0, rtol=1e-4)
135
+ xo.assert_allclose(ex, 7.0283e-10, atol=0, rtol=1e-4)
136
+ xo.assert_allclose(ey, 5.5765e-13, atol=0, rtol=4e-3)
137
+ xo.assert_allclose(ez, 3.6860e-6, atol=0, rtol=1e-4)
138
138
  checked = True
139
139
  elif tilt_machine_by_90_degrees and not vertical_orbit_distortion and wiggler_on:
140
- xo.assert_allclose(ex, 5.6229e-13, atol=0, rtol=4e-3) # Quite large, to be kept in mind
141
- xo.assert_allclose(ey, 7.0714e-10, atol=0, rtol=1e-4)
142
- xo.assert_allclose(ez, 3.7089e-6, atol=0, rtol=1e-4)
140
+ xo.assert_allclose(ex, 5.5790e-13, atol=0, rtol=4e-3) # Quite large, to be kept in mind
141
+ xo.assert_allclose(ey, 7.0283e-10, atol=0, rtol=1e-4)
142
+ xo.assert_allclose(ez, 3.6860e-6, atol=0, rtol=1e-4)
143
143
  checked = True
144
144
  elif not tilt_machine_by_90_degrees and vertical_orbit_distortion and not wiggler_on:
145
- xo.assert_allclose(ex, 7.1345e-10, atol=0, rtol=1e-4)
146
- xo.assert_allclose(ey, 2.2100e-12, atol=0, rtol=1e-2)
147
- xo.assert_allclose(ez, 3.4433e-6, atol=0, rtol=1e-4)
145
+ xo.assert_allclose(ex, 7.0911e-10, atol=0, rtol=1e-4)
146
+ xo.assert_allclose(ey, 2.1821e-12, atol=0, rtol=1e-2)
147
+ xo.assert_allclose(ez, 3.4221e-6, atol=0, rtol=1e-4)
148
148
  checked = True
149
149
  elif tilt_machine_by_90_degrees and vertical_orbit_distortion and not wiggler_on:
150
- xo.assert_allclose(ex, 2.2071e-12, atol=0, rtol=7e-3)
151
- xo.assert_allclose(ey, 7.1345e-10, atol=0, rtol=1e-4)
152
- xo.assert_allclose(ez, 3.4433e-6, atol=0, rtol=1e-4)
150
+ xo.assert_allclose(ex, 2.1828e-12, atol=0, rtol=7e-3)
151
+ xo.assert_allclose(ey, 7.0911e-10, atol=0, rtol=1e-4)
152
+ xo.assert_allclose(ez, 3.4221e-6, atol=0, rtol=1e-4)
153
153
  checked = True
154
154
  else:
155
155
  raise ValueError('Unknown configuration')
@@ -129,34 +129,34 @@ def test_eq_emitt(conf):
129
129
  # for regression testing
130
130
  checked = False
131
131
  if not tilt_machine_by_90_degrees and not vertical_orbit_distortion and not wiggler_on:
132
- xo.assert_allclose(ex, 7.1357e-10, atol=0, rtol=1e-4)
132
+ xo.assert_allclose(ex, 7.0923e-10, atol=0, rtol=1e-4)
133
133
  xo.assert_allclose(ey, 0, atol=1e-14, rtol=0)
134
- xo.assert_allclose(ez, 3.6000e-6, atol=0, rtol=1e-4)
134
+ xo.assert_allclose(ez, 3.5778e-6, atol=0, rtol=1e-4)
135
135
  checked = True
136
136
  elif tilt_machine_by_90_degrees and not vertical_orbit_distortion and not wiggler_on:
137
137
  xo.assert_allclose(ex, 0, atol=1e-14, rtol=0)
138
- xo.assert_allclose(ey, 7.1358e-10, atol=0, rtol=1e-4)
139
- xo.assert_allclose(ez, 3.6000e-6, atol=0, rtol=1e-4)
138
+ xo.assert_allclose(ey, 7.0923e-10, atol=0, rtol=1e-4)
139
+ xo.assert_allclose(ez, 3.5778e-6, atol=0, rtol=1e-4)
140
140
  checked = True
141
141
  elif not tilt_machine_by_90_degrees and not vertical_orbit_distortion and wiggler_on:
142
- xo.assert_allclose(ex, 7.0714e-10, atol=0, rtol=1e-4)
143
- xo.assert_allclose(ey, 5.6986e-13, atol=0, rtol=4e-3)
144
- xo.assert_allclose(ez, 3.8595e-6, atol=0, rtol=1e-4)
142
+ xo.assert_allclose(ex, 7.0283e-10, atol=0, rtol=1e-4)
143
+ xo.assert_allclose(ey, 5.6461e-13, atol=0, rtol=4e-3)
144
+ xo.assert_allclose(ez, 3.8357e-6, atol=0, rtol=1e-4)
145
145
  checked = True
146
146
  elif tilt_machine_by_90_degrees and not vertical_orbit_distortion and wiggler_on:
147
- xo.assert_allclose(ex, 5.7068e-13, atol=0, rtol=1e-2) # Quite large, to be kept in mind
148
- xo.assert_allclose(ey, 7.0714e-10, atol=0, rtol=1e-4)
149
- xo.assert_allclose(ez, 3.8595e-6, atol=0, rtol=1e-4)
147
+ xo.assert_allclose(ex, 5.6448e-13, atol=0, rtol=1e-2) # Quite large, to be kept in mind
148
+ xo.assert_allclose(ey, 7.0283e-10, atol=0, rtol=1e-4)
149
+ xo.assert_allclose(ez, 3.8357e-6, atol=0, rtol=1e-4)
150
150
  checked = True
151
151
  elif not tilt_machine_by_90_degrees and vertical_orbit_distortion and not wiggler_on:
152
- xo.assert_allclose(ex, 7.1345e-10, atol=0, rtol=1e-4)
153
- xo.assert_allclose(ey, 2.2295e-12, atol=0, rtol=7e-3)
154
- xo.assert_allclose(ez, 3.5828e-6, atol=0, rtol=1e-4)
152
+ xo.assert_allclose(ex, 7.0910e-10, atol=0, rtol=1e-4)
153
+ xo.assert_allclose(ey, 2.2195e-12, atol=0, rtol=7e-3)
154
+ xo.assert_allclose(ez, 3.5607e-6, atol=0, rtol=1e-4)
155
155
  checked = True
156
156
  elif tilt_machine_by_90_degrees and vertical_orbit_distortion and not wiggler_on:
157
- xo.assert_allclose(ex, 2.2393e-12, atol=0, rtol=7e-3)
158
- xo.assert_allclose(ey, 7.1345e-10, atol=0, rtol=1e-4)
159
- xo.assert_allclose(ez, 3.5828e-6, atol=0, rtol=1e-4)
157
+ xo.assert_allclose(ex, 2.2154e-12, atol=0, rtol=7e-3)
158
+ xo.assert_allclose(ey, 7.0911e-10, atol=0, rtol=1e-4)
159
+ xo.assert_allclose(ez, 3.5607e-6, atol=0, rtol=1e-4)
160
160
  checked = True
161
161
  else:
162
162
  raise ValueError('Unknown configuration')
@@ -123,7 +123,8 @@ def test_radiation_integrals_sls_combined_function_magnets():
123
123
 
124
124
  line.configure_radiation(model='mean')
125
125
 
126
- tw_rad = line.twiss(eneloss_and_damping=True, strengths=True)
126
+ tw_rad = line.twiss(eneloss_and_damping=True, strengths=True,
127
+ radiation_method='full')
127
128
 
128
129
  tw_integrals = line.twiss(radiation_integrals=True)
129
130
 
@@ -562,3 +562,26 @@ def test_polarization_lep_sext_corr():
562
562
  xo.assert_allclose(
563
563
  tw.spin_dn_ddelta_z, spin_dn_dpz_z_interp, atol=0.1, rtol=0
564
564
  )
565
+
566
+ line['on_sol.2'] = 0
567
+ line['on_sol.4'] = 0
568
+ line['on_sol.6'] = 0
569
+ line['on_sol.8'] = 0
570
+ line['on_spin_bump.2'] = 0
571
+ line['on_spin_bump.4'] = 0
572
+ line['on_spin_bump.6'] = 0
573
+ line['on_spin_bump.8'] = 0
574
+ line['on_coupl_sol.2'] = 0
575
+ line['on_coupl_sol.4'] = 0
576
+ line['on_coupl_sol.6'] = 0
577
+ line['on_coupl_sol.8'] = 0
578
+ line['on_coupl_sol_bump.2'] = 0
579
+ line['on_coupl_sol_bump.4'] = 0
580
+ line['on_coupl_sol_bump.6'] = 0
581
+ line['on_coupl_sol_bump.8'] = 0
582
+
583
+ tw = line.twiss4d(polarization=True)
584
+ xo.assert_allclose(
585
+ line.particle_ref.anomalous_magnetic_moment[0]*line.particle_ref.gamma0[0],
586
+ 103.45, rtol=0, atol=1e-9)
587
+ xo.assert_allclose(tw.spin_tune_fractional, 0.45, rtol=0, atol=1e-6)
@@ -0,0 +1 @@
1
+ __version__ = '0.84.5'
@@ -795,19 +795,22 @@ def twiss_line(line, particle_ref=None, method=None,
795
795
  line=line, radiation_method=radiation_method)
796
796
  twiss_res._data.update(eneloss_damp_res)
797
797
 
798
+ for kk in ['angle_rad', 'rot_s_rad', 'length', 'radiation_flag']:
799
+ if kk not in twiss_res._data:
800
+ aa = line.attr[kk]
801
+ twiss_res[kk] = np.concatenate([aa, [aa[0]*0]])
802
+
798
803
  # Equilibrium emittances
799
804
  if radiation_method == 'kick_as_co':
800
805
  eq_emitts = _compute_equilibrium_emittance_kick_as_co(
801
- twiss_res.kin_px, twiss_res.kin_py, twiss_res.ptau,
802
- twiss_res.W_matrix,
803
- line, radiation_method,
804
- eneloss_damp_res['damping_constants_turns'])
806
+ twiss_res=twiss_res,
807
+ damping_constants_turns=eneloss_damp_res['damping_constants_turns'],
808
+ radiation_method=radiation_method)
805
809
  twiss_res._data.update(eq_emitts)
806
810
  elif radiation_method == 'full':
807
- eq_emitts = _compute_equilibrium_emittance_full(
808
- kin_px_co=twiss_res.kin_px, kin_py_co=twiss_res.kin_py,
809
- ptau_co=twiss_res.ptau, R_matrix_ebe=RR_ebe,
810
- line=line, radiation_method=radiation_method)
811
+ eq_emitts = _compute_equilibrium_emittance_full(twiss_res=twiss_res,
812
+ R_matrix_ebe=RR_ebe,
813
+ radiation_method=radiation_method)
811
814
  twiss_res._data.update(eq_emitts)
812
815
 
813
816
  if method == '4d' and 'muzeta' in twiss_res._data:
@@ -1559,31 +1562,25 @@ def _compute_eneloss_and_damping_rates(particle_on_co, R_matrix,
1559
1562
 
1560
1563
  return eneloss_damp_res
1561
1564
 
1562
- def _extract_sr_distribution_properties(line, px_co, py_co, ptau_co):
1563
-
1565
+ def _extract_sr_distribution_properties(twiss_res):
1564
1566
 
1565
- radiation_flag = line.attr['radiation_flag']
1567
+ radiation_flag = twiss_res['radiation_flag']
1566
1568
  if np.any(radiation_flag > 1):
1567
1569
  raise ValueError('Incompatible radiation flag')
1568
1570
 
1569
- hxl = line.attr['angle_rad'] * np.cos(line.attr['rot_s_rad'])
1570
- hyl = line.attr['angle_rad'] * np.sin(line.attr['rot_s_rad'])
1571
- dl = line.attr['length'] * (radiation_flag == 1)
1572
-
1573
- mask = (dl != 0)
1574
- hx = np.zeros(shape=(len(dl),), dtype=np.float64)
1575
- hy = np.zeros(shape=(len(dl),), dtype=np.float64)
1576
- hx[mask] = (np.diff(px_co)[mask] + hxl[mask] * (1 + ptau_co[:-1][mask])) / dl[mask]
1577
- hy[mask] = (np.diff(py_co)[mask] + hyl[mask] * (1 + ptau_co[:-1][mask])) / dl[mask]
1578
- # TODO: remove also term due to weak focusing
1571
+ hx, hy, kappa0_x, kappa0_y = _compute_trajectory_curvatures(twiss_res)
1579
1572
  hh = np.sqrt(hx**2 + hy**2)
1580
1573
 
1581
- mass0 = line.particle_ref.mass0
1582
- q0 = line.particle_ref.q0
1583
- gamma0 = line.particle_ref._xobject.gamma0[0]
1584
- beta0 = line.particle_ref._xobject.beta0[0]
1574
+ ptau_co = twiss_res['ptau']
1575
+ dl = twiss_res['length'] * (twiss_res['radiation_flag'] > 0)
1585
1576
 
1586
- gamma = gamma0 * (1 + beta0 * ptau_co)[:-1]
1577
+ pco = twiss_res['particle_on_co']
1578
+ mass0 = pco.mass0
1579
+ q0 = pco.q0
1580
+ gamma0 = pco._xobject.gamma0[0]
1581
+ beta0 = pco._xobject.beta0[0]
1582
+
1583
+ gamma = gamma0 * (1 + beta0 * ptau_co)
1587
1584
 
1588
1585
  mass0_kg = mass0 / clight**2 * qe
1589
1586
  q_coul = q0 * qe
@@ -1599,6 +1596,8 @@ def _extract_sr_distribution_properties(line, px_co, py_co, ptau_co):
1599
1596
 
1600
1597
  res = {
1601
1598
  'B_T': B_T,
1599
+ 'hx': hx, 'hy': hy,
1600
+ 'h0x': kappa0_x, 'h0y': kappa0_y,
1602
1601
  'E_crit_J': E_crit_J, 'n_dot': n_dot,
1603
1602
  'E_sq_ave_J': E_sq_ave_J, 'E_ave_J': E_ave_J,
1604
1603
  'n_dot_delta_kick_sq_ave': n_dot_delta_kick_sq_ave,
@@ -1607,19 +1606,25 @@ def _extract_sr_distribution_properties(line, px_co, py_co, ptau_co):
1607
1606
 
1608
1607
  return res
1609
1608
 
1610
- def _compute_equilibrium_emittance_kick_as_co(kin_px_co, kin_py_co, ptau_co, W_matrix,
1611
- line, radiation_method,
1612
- damping_constants_turns):
1609
+ def _compute_equilibrium_emittance_kick_as_co(twiss_res,
1610
+ damping_constants_turns,
1611
+ radiation_method):
1613
1612
 
1614
1613
  assert radiation_method == 'kick_as_co'
1615
1614
 
1616
- sr_distrib_properties = _extract_sr_distribution_properties(
1617
- line, kin_px_co, kin_py_co, ptau_co)
1618
- beta0 = line.particle_ref._xobject.beta0[0]
1619
- gamma0 = line.particle_ref._xobject.gamma0[0]
1615
+ sr_distrib_properties = _extract_sr_distribution_properties(twiss_res)
1616
+
1617
+ pco = twiss_res['particle_on_co']
1618
+ beta0 = pco._xobject.beta0[0]
1619
+ gamma0 = pco._xobject.gamma0[0]
1620
+
1621
+ kin_px_co = twiss_res['kin_px']
1622
+ kin_py_co = twiss_res['kin_py']
1623
+ ptau_co = twiss_res['ptau']
1624
+ W_matrix = twiss_res['W_matrix']
1620
1625
 
1621
- n_dot_delta_kick_sq_ave = sr_distrib_properties['n_dot_delta_kick_sq_ave']
1622
- dl = sr_distrib_properties['dl_radiation']
1626
+ n_dot_delta_kick_sq_ave = sr_distrib_properties['n_dot_delta_kick_sq_ave'][:-1]
1627
+ dl = sr_distrib_properties['dl_radiation'][:-1]
1623
1628
 
1624
1629
  px_left = kin_px_co[:-1]
1625
1630
  px_right = kin_px_co[1:]
@@ -1717,14 +1722,17 @@ def _compute_equilibrium_emittance_kick_as_co(kin_px_co, kin_py_co, ptau_co, W_m
1717
1722
 
1718
1723
  return res
1719
1724
 
1720
- def _compute_equilibrium_emittance_full(kin_px_co, kin_py_co, ptau_co, R_matrix_ebe,
1721
- line, radiation_method):
1725
+ def _compute_equilibrium_emittance_full(twiss_res, R_matrix_ebe,
1726
+ radiation_method):
1722
1727
 
1723
- sr_distrib_properties = _extract_sr_distribution_properties(
1724
- line, kin_px_co, kin_py_co, ptau_co)
1728
+ kin_px_co = twiss_res['kin_px']
1729
+ kin_py_co = twiss_res['kin_py']
1730
+ ptau_co = twiss_res['ptau']
1725
1731
 
1726
- n_dot_delta_kick_sq_ave = sr_distrib_properties['n_dot_delta_kick_sq_ave']
1727
- dl = sr_distrib_properties['dl_radiation']
1732
+ sr_distrib_properties = _extract_sr_distribution_properties(twiss_res)
1733
+
1734
+ n_dot_delta_kick_sq_ave = sr_distrib_properties['n_dot_delta_kick_sq_ave'][:-1]
1735
+ dl = sr_distrib_properties['dl_radiation'][:-1]
1728
1736
 
1729
1737
  assert radiation_method == 'full'
1730
1738
 
@@ -1819,8 +1827,8 @@ def _compute_equilibrium_emittance_full(kin_px_co, kin_py_co, ptau_co, R_matrix_
1819
1827
  eq_gemitt_y = EE_norm[2, 3]/(1 - np.abs(lam_eig[1])**2)
1820
1828
  eq_gemitt_zeta = EE_norm[4, 5]/(1 - np.abs(lam_eig[2])**2)
1821
1829
 
1822
- beta0 = line.particle_ref._xobject.beta0[0]
1823
- gamma0 = line.particle_ref._xobject.gamma0[0]
1830
+ beta0 = twiss_res.particle_on_co._xobject.beta0[0]
1831
+ gamma0 = twiss_res.particle_on_co._xobject.gamma0[0]
1824
1832
 
1825
1833
  eq_nemitt_x = float(eq_gemitt_x * (beta0 * gamma0))
1826
1834
  eq_nemitt_y = float(eq_gemitt_y * (beta0 * gamma0))
@@ -1835,8 +1843,7 @@ def _compute_equilibrium_emittance_full(kin_px_co, kin_py_co, ptau_co, R_matrix_
1835
1843
 
1836
1844
  Sigma = RR_ebe @ Sigma_at_start @ np.transpose(RR_ebe, axes=(0,2,1))
1837
1845
 
1838
- eq_sigma_tab = _build_sigma_table(Sigma=Sigma, s=None,
1839
- name=np.array(tuple(line._element_names_unique) + ('_end_point',)))
1846
+ eq_sigma_tab = _build_sigma_table(Sigma=Sigma, s=None, name=twiss_res['name'],)
1840
1847
 
1841
1848
  res = {
1842
1849
  'eq_gemitt_x': eq_gemitt_x,
@@ -1848,6 +1855,10 @@ def _compute_equilibrium_emittance_full(kin_px_co, kin_py_co, ptau_co, R_matrix_
1848
1855
  'eq_beam_covariance_matrix': eq_sigma_tab,
1849
1856
  'dl_radiation': dl,
1850
1857
  'n_dot_delta_kick_sq_ave': n_dot_delta_kick_sq_ave,
1858
+ 'hx_rad': sr_distrib_properties['hx'],
1859
+ 'hy_rad': sr_distrib_properties['hy'],
1860
+ 'h0x_rad': sr_distrib_properties['h0x'],
1861
+ 'h0y_rad': sr_distrib_properties['h0y'],
1851
1862
  }
1852
1863
 
1853
1864
  return res
@@ -3829,7 +3840,7 @@ class TwissTable(Table):
3829
3840
  if not hasattr(self,"_action"):
3830
3841
  lattice=False
3831
3842
 
3832
- if lattice and 'length' not in self.keys():
3843
+ if lattice and 'k2l' not in self.keys():
3833
3844
  self.add_strengths()
3834
3845
 
3835
3846
  if mask is not None:
@@ -3880,10 +3891,6 @@ class TwissTable(Table):
3880
3891
 
3881
3892
  def _compute_radiation_integrals(self, add_to_tw=False):
3882
3893
 
3883
- angle_rad = self['angle_rad']
3884
- rot_s_rad = self['rot_s_rad']
3885
- x = self['x']
3886
- y = self['y']
3887
3894
  kin_px = self['kin_px']
3888
3895
  kin_py = self['kin_py']
3889
3896
  delta = self['delta']
@@ -3907,44 +3914,15 @@ class TwissTable(Table):
3907
3914
  dxprime = dpx * (1 - delta) - kin_px
3908
3915
  dyprime = dpy * (1 - delta) - kin_py
3909
3916
 
3910
- # Curvature of the reference trajectory
3911
- mask = length != 0
3912
- kappa0_x = 0 * angle_rad
3913
- kappa0_y = 0 * angle_rad
3914
- kappa0_x[mask] = angle_rad[mask] * np.cos(rot_s_rad[mask]) / length[mask]
3915
- kappa0_y[mask] = angle_rad[mask] * np.sin(rot_s_rad[mask]) / length[mask]
3917
+ kappa_x, kappa_y, kappa0_x, kappa0_y = _compute_trajectory_curvatures(self)
3918
+ kappa = np.sqrt(kappa_x**2 + kappa_y**2)
3916
3919
  kappa0 = np.sqrt(kappa0_x**2 + kappa0_y**2)
3917
3920
 
3918
- # Field index
3919
- k1 = 0 * angle_rad
3921
+ # quadrupole gradient
3922
+ mask = length != 0
3923
+ k1 = 0 * length
3920
3924
  k1[mask] = self.k1l[mask] / length[mask]
3921
3925
 
3922
- # Compute x', y', x'', y''
3923
- ps = np.sqrt((1 + delta)**2 - kin_px**2 - kin_py**2)
3924
- xp = kin_px / ps
3925
- yp = kin_py / ps
3926
- xp_ele = xp * 0
3927
- yp_ele = yp * 0
3928
- xp_ele[:-1] = (xp[:-1] + xp[1:]) / 2
3929
- yp_ele[:-1] = (yp[:-1] + yp[1:]) / 2
3930
-
3931
- mask_length = length != 0
3932
- xpp_ele = xp_ele * 0
3933
- ypp_ele = yp_ele * 0
3934
- xpp_ele[mask_length] = np.diff(xp, append=0)[mask_length] / length[mask_length]
3935
- ypp_ele[mask_length] = np.diff(yp, append=0)[mask_length] / length[mask_length]
3936
-
3937
- # Curvature of the particle trajectory
3938
- hhh = 1 + kappa0_x * x + kappa0_y * y
3939
- hprime = kappa0_x * xp_ele + kappa0_y * yp_ele
3940
- mask1 = xpp_ele**2 + hhh**2 != 0
3941
- mask2 = xpp_ele**2 + hhh**2 != 0
3942
- kappa_x = (-(hhh * (xpp_ele - hhh * kappa0_x) - 2 * hprime * xp_ele)[mask1]
3943
- / (xp_ele**2 + hhh**2)[mask1]**(3/2))
3944
- kappa_y = (-(hhh * (ypp_ele - hhh * kappa0_y) - 2 * hprime * yp_ele)[mask2]
3945
- / (yp_ele**2 + hhh**2)[mask2]**(3/2))
3946
- kappa = np.sqrt(kappa_x**2 + kappa_y**2)
3947
-
3948
3926
  # Curly H
3949
3927
  Hx_rad = gamx * dx**2 + 2*alfx * dx * dxprime + betx * dxprime**2
3950
3928
  Hy_rad = gamy * dy**2 + 2*alfy * dy * dyprime + bety * dyprime**2
@@ -3988,17 +3966,20 @@ class TwissTable(Table):
3988
3966
  damping_constant_zeta_s = r0/3 * gamma0**3 * clight/self.circumference * (2*i2 + i4)
3989
3967
 
3990
3968
  # Velocity direction (for spin)
3969
+ ps = np.sqrt((1 + delta)**2 - kin_px**2 - kin_py**2)
3970
+ xp = kin_px / ps
3971
+ yp = kin_py / ps
3991
3972
  tempv = np.sqrt(xp**2 + yp**2 + 1)
3992
3973
  iv_x = xp / tempv
3993
3974
  iv_y = yp / tempv
3994
3975
  iv_z = 1 / tempv
3995
3976
 
3996
3977
  cols = {
3997
- 'rad_int_hx': Hx_rad,
3998
- 'rad_int_hy': Hy_rad,
3978
+ 'rad_int_curly_hx': Hx_rad,
3979
+ 'rad_int_curly_hy': Hy_rad,
3999
3980
  'rad_int_i1x_integrand': i1x_integrand,
4000
3981
  'rad_int_i1y_integrand': i1y_integrand,
4001
- 'rad_int_i2_integrand': i2_integrand,
3982
+ 'rad_int_l2_integrand': i2_integrand,
4002
3983
  'rad_int_i3_integrand': i3_integrand,
4003
3984
  'rad_int_i4_integrand': i4_integrand,
4004
3985
  'rad_int_i4x_integrand': i4x_integrand,
@@ -4597,6 +4578,10 @@ def _compute_spin_polarization(tw, line, method):
4597
4578
 
4598
4579
  RR[6:, 6:] = A
4599
4580
 
4581
+ # For the spin tune I take the eigenvalue with the largest imaginary part
4582
+ # (there are the eigenvalues, one is 1.0 + 0j, the others are complex conjugates)
4583
+ spin_tune_fractional = np.max(np.angle(np.linalg.eigvals(A))) / (2 * np.pi)
4584
+
4600
4585
  # Detect no RF
4601
4586
  if np.abs(RR[5, 4]) < 1e-12:
4602
4587
  assert method == '4d'
@@ -4782,6 +4767,7 @@ def _compute_spin_polarization(tw, line, method):
4782
4767
  }
4783
4768
 
4784
4769
  other_data = {
4770
+ 'spin_tune_fractional': spin_tune_fractional,
4785
4771
  'spin_polarization_eq': pol_eq,
4786
4772
  'spin_t_pol_buildup_s': t_pol_buildup_s,
4787
4773
  'spin_polarization_inf_no_depol': pol_inf,
@@ -4807,3 +4793,48 @@ def _compute_spin_polarization(tw, line, method):
4807
4793
 
4808
4794
  for nn in other_data:
4809
4795
  tw._data[nn] = other_data[nn]
4796
+
4797
+
4798
+ def _compute_trajectory_curvatures(twiss_res):
4799
+
4800
+ angle_rad = twiss_res['angle_rad']
4801
+ rot_s_rad = twiss_res['rot_s_rad']
4802
+ x = twiss_res['x']
4803
+ y = twiss_res['y']
4804
+ kin_px = twiss_res['kin_px']
4805
+ kin_py = twiss_res['kin_py']
4806
+ delta = twiss_res['delta']
4807
+ length = twiss_res['length']
4808
+
4809
+ # Curvature of the reference trajectory
4810
+ mask = length != 0
4811
+ kappa0_x = 0 * angle_rad
4812
+ kappa0_y = 0 * angle_rad
4813
+ kappa0_x[mask] = angle_rad[mask] * np.cos(rot_s_rad[mask]) / length[mask]
4814
+ kappa0_y[mask] = angle_rad[mask] * np.sin(rot_s_rad[mask]) / length[mask]
4815
+
4816
+ # Compute x', y', x'', y''
4817
+ ps = np.sqrt((1 + delta)**2 - kin_px**2 - kin_py**2)
4818
+ xp = kin_px / ps
4819
+ yp = kin_py / ps
4820
+ xp_ele = xp * 0
4821
+ yp_ele = yp * 0
4822
+ xp_ele[:-1] = (xp[:-1] + xp[1:]) / 2
4823
+ yp_ele[:-1] = (yp[:-1] + yp[1:]) / 2
4824
+
4825
+ mask_length = length != 0
4826
+ xpp_ele = xp_ele * 0
4827
+ ypp_ele = yp_ele * 0
4828
+ xpp_ele[mask_length] = np.diff(xp, append=0)[mask_length] / length[mask_length]
4829
+ ypp_ele[mask_length] = np.diff(yp, append=0)[mask_length] / length[mask_length]
4830
+
4831
+ # Curvature of the particle trajectory
4832
+ hhh = 1 + kappa0_x * x + kappa0_y * y
4833
+ hprime = kappa0_x * xp_ele + kappa0_y * yp_ele
4834
+ mask = hhh**2 != 0
4835
+ kappa_x = (-(hhh * (xpp_ele - hhh * kappa0_x) - 2 * hprime * xp_ele)[mask]
4836
+ / (xp_ele**2 + hhh**2)[mask]**(3/2))
4837
+ kappa_y = (-(hhh * (ypp_ele - hhh * kappa0_y) - 2 * hprime * yp_ele)[mask]
4838
+ / (yp_ele**2 + hhh**2)[mask]**(3/2))
4839
+
4840
+ return kappa_x, kappa_y, kappa0_x, kappa0_y
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: xtrack
3
- Version: 0.84.3
3
+ Version: 0.84.5
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.84.3'
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