xtrack 0.70.3__tar.gz → 0.71.0__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 (262) hide show
  1. {xtrack-0.70.3/xtrack.egg-info → xtrack-0.71.0}/PKG-INFO +1 -1
  2. {xtrack-0.70.3 → xtrack-0.71.0}/tests/test_madnginterface.py +4 -4
  3. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/__init__.py +1 -0
  4. xtrack-0.71.0/xtrack/_version.py +1 -0
  5. xtrack-0.70.3/xtrack/json_utils.py → xtrack-0.71.0/xtrack/json.py +2 -2
  6. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/line.py +4 -4
  7. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/linear_normal_form.py +14 -3
  8. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/mad_parser/loader.py +7 -4
  9. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/match.py +20 -1
  10. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/multiline/multiline.py +52 -5
  11. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/twissplot.py +25 -18
  12. {xtrack-0.70.3 → xtrack-0.71.0/xtrack.egg-info}/PKG-INFO +1 -1
  13. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack.egg-info/SOURCES.txt +1 -1
  14. xtrack-0.70.3/xtrack/_version.py +0 -1
  15. {xtrack-0.70.3 → xtrack-0.71.0}/LICENSE +0 -0
  16. {xtrack-0.70.3 → xtrack-0.71.0}/MANIFEST.in +0 -0
  17. {xtrack-0.70.3 → xtrack-0.71.0}/README.md +0 -0
  18. {xtrack-0.70.3 → xtrack-0.71.0}/ducktrack/__init__.py +0 -0
  19. {xtrack-0.70.3 → xtrack-0.71.0}/ducktrack/base_classes.py +0 -0
  20. {xtrack-0.70.3 → xtrack-0.71.0}/ducktrack/be_beamfields/BB6D.py +0 -0
  21. {xtrack-0.70.3 → xtrack-0.71.0}/ducktrack/be_beamfields/BB6Ddata.py +0 -0
  22. {xtrack-0.70.3 → xtrack-0.71.0}/ducktrack/be_beamfields/__init__.py +0 -0
  23. {xtrack-0.70.3 → xtrack-0.71.0}/ducktrack/be_beamfields/beambeam.py +0 -0
  24. {xtrack-0.70.3 → xtrack-0.71.0}/ducktrack/be_beamfields/boost.py +0 -0
  25. {xtrack-0.70.3 → xtrack-0.71.0}/ducktrack/be_beamfields/gaussian_fields.py +0 -0
  26. {xtrack-0.70.3 → xtrack-0.71.0}/ducktrack/be_beamfields/propagate_sigma_matrix.py +0 -0
  27. {xtrack-0.70.3 → xtrack-0.71.0}/ducktrack/be_beamfields/qgauss.py +0 -0
  28. {xtrack-0.70.3 → xtrack-0.71.0}/ducktrack/be_beamfields/slicing.py +0 -0
  29. {xtrack-0.70.3 → xtrack-0.71.0}/ducktrack/be_beamfields/spacecharge.py +0 -0
  30. {xtrack-0.70.3 → xtrack-0.71.0}/ducktrack/elements.py +0 -0
  31. {xtrack-0.70.3 → xtrack-0.71.0}/ducktrack/line.py +0 -0
  32. {xtrack-0.70.3 → xtrack-0.71.0}/ducktrack/mathlibs.py +0 -0
  33. {xtrack-0.70.3 → xtrack-0.71.0}/ducktrack/particles.py +0 -0
  34. {xtrack-0.70.3 → xtrack-0.71.0}/ducktrack/temp_pyparticles.py +0 -0
  35. {xtrack-0.70.3 → xtrack-0.71.0}/pyproject.toml +0 -0
  36. {xtrack-0.70.3 → xtrack-0.71.0}/setup.cfg +0 -0
  37. {xtrack-0.70.3 → xtrack-0.71.0}/setup.py +0 -0
  38. {xtrack-0.70.3 → xtrack-0.71.0}/tests/test_acceleration.py +0 -0
  39. {xtrack-0.70.3 → xtrack-0.71.0}/tests/test_amplitude_detuning.py +0 -0
  40. {xtrack-0.70.3 → xtrack-0.71.0}/tests/test_aperture_turn_ele_and_monitor.py +0 -0
  41. {xtrack-0.70.3 → xtrack-0.71.0}/tests/test_apertures.py +0 -0
  42. {xtrack-0.70.3 → xtrack-0.71.0}/tests/test_attr_replicas_and_slices.py +0 -0
  43. {xtrack-0.70.3 → xtrack-0.71.0}/tests/test_cavity_absolute_time.py +0 -0
  44. {xtrack-0.70.3 → xtrack-0.71.0}/tests/test_chromatic_functions_vs_madx.py +0 -0
  45. {xtrack-0.70.3 → xtrack-0.71.0}/tests/test_coasting.py +0 -0
  46. {xtrack-0.70.3 → xtrack-0.71.0}/tests/test_collective_tracker.py +0 -0
  47. {xtrack-0.70.3 → xtrack-0.71.0}/tests/test_collimation.py +0 -0
  48. {xtrack-0.70.3 → xtrack-0.71.0}/tests/test_element_characterization_functions.py +0 -0
  49. {xtrack-0.70.3 → xtrack-0.71.0}/tests/test_element_internal_record.py +0 -0
  50. {xtrack-0.70.3 → xtrack-0.71.0}/tests/test_elements.py +0 -0
  51. {xtrack-0.70.3 → xtrack-0.71.0}/tests/test_elements_classflags.py +0 -0
  52. {xtrack-0.70.3 → xtrack-0.71.0}/tests/test_elements_thick.py +0 -0
  53. {xtrack-0.70.3 → xtrack-0.71.0}/tests/test_environment.py +0 -0
  54. {xtrack-0.70.3 → xtrack-0.71.0}/tests/test_fcc_ee_solenoid_correction.py +0 -0
  55. {xtrack-0.70.3 → xtrack-0.71.0}/tests/test_fcc_ee_solenoid_correction_new_optimize_api.py +0 -0
  56. {xtrack-0.70.3 → xtrack-0.71.0}/tests/test_footprint.py +0 -0
  57. {xtrack-0.70.3 → xtrack-0.71.0}/tests/test_freeze_longitudinal.py +0 -0
  58. {xtrack-0.70.3 → xtrack-0.71.0}/tests/test_full_rings.py +0 -0
  59. {xtrack-0.70.3 → xtrack-0.71.0}/tests/test_h6_sps_beamline.py +0 -0
  60. {xtrack-0.70.3 → xtrack-0.71.0}/tests/test_hvkick.py +0 -0
  61. {xtrack-0.70.3 → xtrack-0.71.0}/tests/test_ions.py +0 -0
  62. {xtrack-0.70.3 → xtrack-0.71.0}/tests/test_lhc_match_phase_15.py +0 -0
  63. {xtrack-0.70.3 → xtrack-0.71.0}/tests/test_line.py +0 -0
  64. {xtrack-0.70.3 → xtrack-0.71.0}/tests/test_lumi.py +0 -0
  65. {xtrack-0.70.3 → xtrack-0.71.0}/tests/test_mad_writer.py +0 -0
  66. {xtrack-0.70.3 → xtrack-0.71.0}/tests/test_madloader.py +0 -0
  67. {xtrack-0.70.3 → xtrack-0.71.0}/tests/test_match_and_track_from_element.py +0 -0
  68. {xtrack-0.70.3 → xtrack-0.71.0}/tests/test_match_coupling_knob.py +0 -0
  69. {xtrack-0.70.3 → xtrack-0.71.0}/tests/test_match_nested.py +0 -0
  70. {xtrack-0.70.3 → xtrack-0.71.0}/tests/test_match_optics_and_ip_knob.py +0 -0
  71. {xtrack-0.70.3 → xtrack-0.71.0}/tests/test_match_optics_and_ip_knob_new_optimize_api.py +0 -0
  72. {xtrack-0.70.3 → xtrack-0.71.0}/tests/test_match_orbit_bump.py +0 -0
  73. {xtrack-0.70.3 → xtrack-0.71.0}/tests/test_match_tune_chroma_cminus.py +0 -0
  74. {xtrack-0.70.3 → xtrack-0.71.0}/tests/test_monitor.py +0 -0
  75. {xtrack-0.70.3 → xtrack-0.71.0}/tests/test_multiline.py +0 -0
  76. {xtrack-0.70.3 → xtrack-0.71.0}/tests/test_multisetter.py +0 -0
  77. {xtrack-0.70.3 → xtrack-0.71.0}/tests/test_multispecies.py +0 -0
  78. {xtrack-0.70.3 → xtrack-0.71.0}/tests/test_new_madloader.py +0 -0
  79. {xtrack-0.70.3 → xtrack-0.71.0}/tests/test_particles_api.py +0 -0
  80. {xtrack-0.70.3 → xtrack-0.71.0}/tests/test_periodic_symmetric_twiss_and_match.py +0 -0
  81. {xtrack-0.70.3 → xtrack-0.71.0}/tests/test_pipeline.py +0 -0
  82. {xtrack-0.70.3 → xtrack-0.71.0}/tests/test_prebuild_kernels.py +0 -0
  83. {xtrack-0.70.3 → xtrack-0.71.0}/tests/test_ps_against_ptc.py +0 -0
  84. {xtrack-0.70.3 → xtrack-0.71.0}/tests/test_ps_multiturn_twiss.py +0 -0
  85. {xtrack-0.70.3 → xtrack-0.71.0}/tests/test_psb_chicane.py +0 -0
  86. {xtrack-0.70.3 → xtrack-0.71.0}/tests/test_pyht_interface.py +0 -0
  87. {xtrack-0.70.3 → xtrack-0.71.0}/tests/test_radial_steering.py +0 -0
  88. {xtrack-0.70.3 → xtrack-0.71.0}/tests/test_radiation.py +0 -0
  89. {xtrack-0.70.3 → xtrack-0.71.0}/tests/test_radiation_equilibrium_emittances.py +0 -0
  90. {xtrack-0.70.3 → xtrack-0.71.0}/tests/test_random_gen.py +0 -0
  91. {xtrack-0.70.3 → xtrack-0.71.0}/tests/test_random_gen_exp.py +0 -0
  92. {xtrack-0.70.3 → xtrack-0.71.0}/tests/test_random_gen_gauss.py +0 -0
  93. {xtrack-0.70.3 → xtrack-0.71.0}/tests/test_random_gen_ruth.py +0 -0
  94. {xtrack-0.70.3 → xtrack-0.71.0}/tests/test_rbend_rbarc.py +0 -0
  95. {xtrack-0.70.3 → xtrack-0.71.0}/tests/test_rf_track.py +0 -0
  96. {xtrack-0.70.3 → xtrack-0.71.0}/tests/test_rotation_signs.py +0 -0
  97. {xtrack-0.70.3 → xtrack-0.71.0}/tests/test_second_order_taylor_map.py +0 -0
  98. {xtrack-0.70.3 → xtrack-0.71.0}/tests/test_seeds.py +0 -0
  99. {xtrack-0.70.3 → xtrack-0.71.0}/tests/test_slice_and_insert_with_replicas.py +0 -0
  100. {xtrack-0.70.3 → xtrack-0.71.0}/tests/test_slice_elements.py +0 -0
  101. {xtrack-0.70.3 → xtrack-0.71.0}/tests/test_slicing.py +0 -0
  102. {xtrack-0.70.3 → xtrack-0.71.0}/tests/test_solenoid_bz_map_vs_boris.py +0 -0
  103. {xtrack-0.70.3 → xtrack-0.71.0}/tests/test_spacecharge_in_ring.py +0 -0
  104. {xtrack-0.70.3 → xtrack-0.71.0}/tests/test_sps_thick.py +0 -0
  105. {xtrack-0.70.3 → xtrack-0.71.0}/tests/test_survey.py +0 -0
  106. {xtrack-0.70.3 → xtrack-0.71.0}/tests/test_tapering.py +0 -0
  107. {xtrack-0.70.3 → xtrack-0.71.0}/tests/test_thick_lhc.py +0 -0
  108. {xtrack-0.70.3 → xtrack-0.71.0}/tests/test_tilt_shifts.py +0 -0
  109. {xtrack-0.70.3 → xtrack-0.71.0}/tests/test_tracker.py +0 -0
  110. {xtrack-0.70.3 → xtrack-0.71.0}/tests/test_trajectory_correcton.py +0 -0
  111. {xtrack-0.70.3 → xtrack-0.71.0}/tests/test_twiss.py +0 -0
  112. {xtrack-0.70.3 → xtrack-0.71.0}/tests/test_twiss_vs_madx_psb.py +0 -0
  113. {xtrack-0.70.3 → xtrack-0.71.0}/tests/test_vs_madx.py +0 -0
  114. {xtrack-0.70.3 → xtrack-0.71.0}/tests/test_xmask_orbit_correction.py +0 -0
  115. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/_temp/__init__.py +0 -0
  116. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/_temp/boris_and_solenoid_map/__init__.py +0 -0
  117. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/_temp/boris_and_solenoid_map/boris.h +0 -0
  118. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/_temp/boris_and_solenoid_map/solenoid_field.py +0 -0
  119. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/_temp/lhc_match/__init__.py +0 -0
  120. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/_temp/lhc_match/gen_madx_optics_file.py +0 -0
  121. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/_temp/lhc_match/lhc_match.py +0 -0
  122. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/_temp/lhc_match/var_limits.py +0 -0
  123. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/base_element.py +0 -0
  124. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/beam_elements/__init__.py +0 -0
  125. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/beam_elements/apertures.py +0 -0
  126. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/beam_elements/apertures_src/limitellipse.h +0 -0
  127. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/beam_elements/apertures_src/limitpolygon.h +0 -0
  128. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/beam_elements/apertures_src/limitracetrack.h +0 -0
  129. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/beam_elements/apertures_src/limitrect.h +0 -0
  130. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/beam_elements/apertures_src/limitrectellipse.h +0 -0
  131. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/beam_elements/apertures_src/longitudinallimitrect.h +0 -0
  132. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/beam_elements/beam_interaction.py +0 -0
  133. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/beam_elements/elements.py +0 -0
  134. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/beam_elements/elements_src/bend.h +0 -0
  135. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/beam_elements/elements_src/cavity.h +0 -0
  136. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/beam_elements/elements_src/dipole_fringe.h +0 -0
  137. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/beam_elements/elements_src/dipoleedge.h +0 -0
  138. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/beam_elements/elements_src/drift.h +0 -0
  139. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/beam_elements/elements_src/drift_elem.h +0 -0
  140. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/beam_elements/elements_src/drift_slice.h +0 -0
  141. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/beam_elements/elements_src/drift_slice_bend.h +0 -0
  142. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/beam_elements/elements_src/drift_slice_octupole.h +0 -0
  143. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/beam_elements/elements_src/drift_slice_quadrupole.h +0 -0
  144. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/beam_elements/elements_src/drift_slice_sextupole.h +0 -0
  145. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/beam_elements/elements_src/elens.h +0 -0
  146. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/beam_elements/elements_src/exciter.h +0 -0
  147. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/beam_elements/elements_src/firstordertaylormap.h +0 -0
  148. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/beam_elements/elements_src/linesegmentmap.h +0 -0
  149. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/beam_elements/elements_src/multipole.h +0 -0
  150. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/beam_elements/elements_src/nonlinearlens.h +0 -0
  151. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/beam_elements/elements_src/octupole.h +0 -0
  152. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/beam_elements/elements_src/quadrupole.h +0 -0
  153. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/beam_elements/elements_src/referenceenergyincrease.h +0 -0
  154. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/beam_elements/elements_src/rfmultipole.h +0 -0
  155. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/beam_elements/elements_src/second_order_taylor_map.h +0 -0
  156. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/beam_elements/elements_src/sextupole.h +0 -0
  157. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/beam_elements/elements_src/simplethinbend.h +0 -0
  158. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/beam_elements/elements_src/simplethinquadrupole.h +0 -0
  159. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/beam_elements/elements_src/solenoid.h +0 -0
  160. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/beam_elements/elements_src/srotation.h +0 -0
  161. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/beam_elements/elements_src/thick_slice_bend.h +0 -0
  162. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/beam_elements/elements_src/thick_slice_drift.h +0 -0
  163. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/beam_elements/elements_src/thick_slice_octupole.h +0 -0
  164. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/beam_elements/elements_src/thick_slice_quadrupole.h +0 -0
  165. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/beam_elements/elements_src/thick_slice_sextupole.h +0 -0
  166. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/beam_elements/elements_src/thick_slice_solenoid.h +0 -0
  167. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/beam_elements/elements_src/thin_slice_bend.h +0 -0
  168. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/beam_elements/elements_src/thin_slice_bend_entry.h +0 -0
  169. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/beam_elements/elements_src/thin_slice_bend_exit.h +0 -0
  170. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/beam_elements/elements_src/thin_slice_octupole.h +0 -0
  171. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/beam_elements/elements_src/thin_slice_quadrupole.h +0 -0
  172. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/beam_elements/elements_src/thin_slice_sextupole.h +0 -0
  173. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/beam_elements/elements_src/track_bend.h +0 -0
  174. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/beam_elements/elements_src/track_dipole_edge_linear.h +0 -0
  175. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/beam_elements/elements_src/track_dipole_edge_nonlinear.h +0 -0
  176. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/beam_elements/elements_src/track_dipole_fringe.h +0 -0
  177. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/beam_elements/elements_src/track_mult_fringe.h +0 -0
  178. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/beam_elements/elements_src/track_multipolar_components.h +0 -0
  179. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/beam_elements/elements_src/track_multipole.h +0 -0
  180. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/beam_elements/elements_src/track_quadrupole.h +0 -0
  181. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/beam_elements/elements_src/track_solenoid.h +0 -0
  182. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/beam_elements/elements_src/track_srotation.h +0 -0
  183. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/beam_elements/elements_src/track_thick_bend.h +0 -0
  184. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/beam_elements/elements_src/track_thick_cfd.h +0 -0
  185. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/beam_elements/elements_src/track_wedge.h +0 -0
  186. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/beam_elements/elements_src/track_xrotation.h +0 -0
  187. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/beam_elements/elements_src/track_yrotation.h +0 -0
  188. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/beam_elements/elements_src/wedge.h +0 -0
  189. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/beam_elements/elements_src/wire.h +0 -0
  190. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/beam_elements/elements_src/xrotation.h +0 -0
  191. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/beam_elements/elements_src/xyshift.h +0 -0
  192. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/beam_elements/elements_src/yrotation.h +0 -0
  193. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/beam_elements/elements_src/zetashift.h +0 -0
  194. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/beam_elements/exciter.py +0 -0
  195. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/beam_elements/rft_element.py +0 -0
  196. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/beam_elements/slice_elements.py +0 -0
  197. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/beam_elements/slice_elements_thick.py +0 -0
  198. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/environment.py +0 -0
  199. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/footprint.py +0 -0
  200. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/general.py +0 -0
  201. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/headers/atomicadd.h +0 -0
  202. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/headers/checks.h +0 -0
  203. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/headers/constants.h +0 -0
  204. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/headers/particle_states.h +0 -0
  205. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/headers/synrad_spectrum.h +0 -0
  206. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/internal_record.py +0 -0
  207. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/loss_location_refinement/__init__.py +0 -0
  208. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/loss_location_refinement/loss_location_refinement.py +0 -0
  209. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/lumi.py +0 -0
  210. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/mad_loader.py +0 -0
  211. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/mad_parser/__init__.py +0 -0
  212. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/mad_parser/env_writer.py +0 -0
  213. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/mad_parser/madx.lark +0 -0
  214. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/mad_parser/parse.py +0 -0
  215. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/mad_writer.py +0 -0
  216. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/madng_interface.py +0 -0
  217. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/monitors/__init__.py +0 -0
  218. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/monitors/beam_position_monitor.h +0 -0
  219. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/monitors/beam_position_monitor.py +0 -0
  220. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/monitors/beam_profile_monitor.h +0 -0
  221. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/monitors/beam_profile_monitor.py +0 -0
  222. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/monitors/beam_size_monitor.h +0 -0
  223. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/monitors/beam_size_monitor.py +0 -0
  224. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/monitors/last_turns_monitor.h +0 -0
  225. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/monitors/last_turns_monitor.py +0 -0
  226. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/monitors/particles_monitor.h +0 -0
  227. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/monitors/particles_monitor.py +0 -0
  228. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/multiline/__init__.py +0 -0
  229. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/multiline/shared_knobs.py +0 -0
  230. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/multisetter/__init__.py +0 -0
  231. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/multisetter/multisetter.py +0 -0
  232. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/particles/__init__.py +0 -0
  233. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/particles/constants.py +0 -0
  234. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/particles/particles.py +0 -0
  235. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/particles/rng_src/base_rng.h +0 -0
  236. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/particles/rng_src/particles_rng.h +0 -0
  237. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/pipeline/__init__.py +0 -0
  238. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/pipeline/core.py +0 -0
  239. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/pipeline/manager.py +0 -0
  240. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/pipeline/multitracker.py +0 -0
  241. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/progress_indicator.py +0 -0
  242. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/random/__init__.py +0 -0
  243. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/random/random_generators.py +0 -0
  244. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/random/random_src/exponential.h +0 -0
  245. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/random/random_src/exponential_integral_Ei.h +0 -0
  246. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/random/random_src/normal.h +0 -0
  247. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/random/random_src/rutherford.h +0 -0
  248. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/random/random_src/uniform.h +0 -0
  249. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/random/random_src/uniform_accurate.h +0 -0
  250. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/slicing.py +0 -0
  251. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/survey.py +0 -0
  252. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/synctime.py +0 -0
  253. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/tapering.py +0 -0
  254. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/targets.py +0 -0
  255. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/tracker.py +0 -0
  256. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/tracker_data.py +0 -0
  257. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/tracker_src/tracker.h +0 -0
  258. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/trajectory_correction.py +0 -0
  259. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack/twiss.py +0 -0
  260. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack.egg-info/dependency_links.txt +0 -0
  261. {xtrack-0.70.3 → xtrack-0.71.0}/xtrack.egg-info/requires.txt +0 -0
  262. {xtrack-0.70.3 → xtrack-0.71.0}/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.70.3
3
+ Version: 0.71.0
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
@@ -7,9 +7,9 @@ import numpy as np
7
7
  test_data_folder = pathlib.Path(
8
8
  __file__).parent.joinpath('../test_data').absolute()
9
9
 
10
- @pytest.mark.xfail(strict=False) # sometimes madng fails to start the process (to be investigated)
10
+ # @pytest.mark.xfail(strict=False) # sometimes madng fails to start the process (to be investigated)
11
11
  def test_madng_twiss():
12
- rdts = ["f4000", "f3100", "f2020", "f1120", 'f1001']
12
+ rdts = ["f4000", "f3100", "f2020", "f1120"]
13
13
 
14
14
  line = xt.Line.from_json(test_data_folder /
15
15
  'hllhc15_thick/lhc_thick_with_knobs.json')
@@ -46,7 +46,7 @@ def test_madng_twiss():
46
46
  assert np.abs(tw_rdt.f2020).max() > 0
47
47
  assert np.abs(tw_rdt.f1120).max() > 0
48
48
 
49
- @pytest.mark.xfail(strict=False) # sometimes madng fails to start the process (to be investigated)
49
+ # @pytest.mark.xfail(strict=False) # sometimes madng fails to start the process (to be investigated)
50
50
  def test_madng_interface_with_multipole_errors_and_misalignments():
51
51
  line = xt.Line.from_json(test_data_folder /
52
52
  'hllhc15_thick/lhc_thick_with_knobs.json')
@@ -56,7 +56,7 @@ def test_madng_interface_with_multipole_errors_and_misalignments():
56
56
 
57
57
  # Introduce misalignments on all quadrupoles
58
58
  tt = line.get_table()
59
- tt_quad = tt.rows['mq\..*']
59
+ tt_quad = tt.rows[r'mq\..*']
60
60
  rgen = np.random.RandomState(1) # fix seed for random number generator
61
61
  # (to have reproducible results)
62
62
  shift_x = rgen.randn(len(tt_quad)) * 0.01e-3 # 0.01 mm rms shift on all quads
@@ -45,6 +45,7 @@ from .slicing import Strategy, Uniform, Teapot
45
45
  from .loss_location_refinement import _skip_in_loss_location_refinement
46
46
  from .trajectory_correction import TrajectoryCorrection
47
47
  from .mad_parser.loader import load_madx_lattice
48
+ from . import json
48
49
 
49
50
  from xdeps import Table, FunctionPieceWiseLinear
50
51
 
@@ -0,0 +1 @@
1
+ __version__ = '0.71.0'
@@ -5,7 +5,7 @@ import gzip
5
5
  from xobjects import JEncoder
6
6
 
7
7
 
8
- def to_json(data, file, indent):
8
+ def dump(data, file, indent=1):
9
9
  if isinstance(file, io.IOBase):
10
10
  fh, close = file, False
11
11
  elif (isinstance(file, str) and file.endswith(".gz")) or (
@@ -21,7 +21,7 @@ def to_json(data, file, indent):
21
21
  fh.close()
22
22
 
23
23
 
24
- def from_json(file):
24
+ def load(file):
25
25
  if isinstance(file, io.IOBase):
26
26
  fh, close = file, False
27
27
  elif (isinstance(file, str) and file.endswith(".gz")) or (
@@ -19,7 +19,7 @@ import numpy as np
19
19
  from scipy.constants import c as clight
20
20
 
21
21
  from . import linear_normal_form as lnf
22
- from . import json_utils
22
+ from . import json as json_utils
23
23
 
24
24
  import xobjects as xo
25
25
  import xtrack as xt
@@ -272,7 +272,7 @@ class Line:
272
272
 
273
273
  """
274
274
 
275
- dct = json_utils.from_json(file)
275
+ dct = json_utils.load(file)
276
276
 
277
277
  if 'line' in dct.keys():
278
278
  dct_line = dct['line']
@@ -649,7 +649,7 @@ class Line:
649
649
 
650
650
  '''
651
651
 
652
- json_utils.to_json(self.to_dict(**kwargs), file, indent=indent)
652
+ json_utils.dump(self.to_dict(**kwargs), file, indent=indent)
653
653
 
654
654
  def _to_table_dict(self):
655
655
 
@@ -3632,7 +3632,7 @@ class Line:
3632
3632
  else:
3633
3633
  raise KeyError(f'Element or variable {key} not found')
3634
3634
 
3635
- def info(self, key, limit=12):
3635
+ def info(self, key, limit=30):
3636
3636
  """
3637
3637
  Get information about an element or a variable.
3638
3638
  """
@@ -182,9 +182,20 @@ def compute_linear_normal_form(M, symplectify=False, only_4d_block=False,
182
182
  b2 = v0[:,modes[1]].imag
183
183
  b3 = v0[:,modes[2]].imag
184
184
 
185
- n1 = 1./np.sqrt(np.matmul(np.matmul(a1, S), b1))
186
- n2 = 1./np.sqrt(np.matmul(np.matmul(a2, S), b2))
187
- n3 = 1./np.sqrt(np.matmul(np.matmul(a3, S), b3))
185
+ n1_inv_sq = np.matmul(np.matmul(a1, S), b1)
186
+ n2_inv_sq = np.matmul(np.matmul(a2, S), b2)
187
+ n3_inv_sq = np.matmul(np.matmul(a3, S), b3)
188
+
189
+ if not n1_inv_sq > 0:
190
+ raise ValueError('Invalid n1')
191
+ if not n2_inv_sq > 0:
192
+ raise ValueError('Invalid n2')
193
+ if not n3_inv_sq > 0:
194
+ raise ValueError('Invalid n3')
195
+
196
+ n1 = 1./np.sqrt(n1_inv_sq)
197
+ n2 = 1./np.sqrt(n2_inv_sq)
198
+ n3 = 1./np.sqrt(n3_inv_sq)
188
199
 
189
200
  a1 *= n1
190
201
  a2 *= n2
@@ -292,13 +292,16 @@ class MadxLoader:
292
292
  if (extras := el_params.pop('extra', None)):
293
293
  _warn(f'Ignoring extra parameters {extras} for element `{name}`!')
294
294
 
295
- if isinstance(self.env[name], BeamElement) and not self.env[name].isthick and length:
295
+
296
+ if (isinstance(self.env[name], BeamElement) and not self.env[name].isthick
297
+ and length and not isinstance(self.env[name], xt.Marker)):
296
298
  drift_name = f'drift_{name}'
297
299
  self.env.new(drift_name, 'Drift', length=f'({length}) / 2')
298
300
  name = builder.new_line([drift_name, name, drift_name])
299
301
  builder.place(name, **el_params)
300
302
  else:
301
- if isinstance(self.env[parent], BeamElement) and not self.env[parent].isthick and length:
303
+ if (isinstance(self.env[parent], BeamElement) and not self.env[parent].isthick
304
+ and length and not isinstance(self.env[parent], xt.Marker)):
302
305
  drift_name = f'{name}_drift'
303
306
  self.env.new(drift_name, 'Drift', length=f'({length}) / 2')
304
307
  at, from_ = el_params.pop('at', None), el_params.pop('from_', None)
@@ -635,8 +638,8 @@ class MadxLoader:
635
638
 
636
639
  return element_name
637
640
 
638
- def load_madx_lattice(file):
639
- loader = MadxLoader()
641
+ def load_madx_lattice(file, reverse_lines=None):
642
+ loader = MadxLoader(reverse_lines=reverse_lines)
640
643
  loader.load_file(file)
641
644
  env = loader.env
642
645
  return env
@@ -630,6 +630,8 @@ class TargetRmatrix(TargetSet):
630
630
  if value is not None:
631
631
  raise NotImplementedError
632
632
 
633
+ tag = kwargs.pop('tag', None)
634
+
633
635
  r_elems = {
634
636
  'r11': r11, 'r12': r12, 'r13': r13, 'r14': r14, 'r15': r15, 'r16': r16,
635
637
  'r21': r21, 'r22': r22, 'r23': r23, 'r24': r24, 'r25': r25, 'r26': r26,
@@ -650,8 +652,13 @@ class TargetRmatrix(TargetSet):
650
652
  if kk[2] in ['2', '4']:
651
653
  thistol *= 1e+2
652
654
  if vv is not None:
655
+ if tag is not None:
656
+ this_tag = tag
657
+ else:
658
+ this_tag = kk
653
659
  self.targets.append(TargetRmatrixTerm(kk, vv, start=start, end=end,
654
- tol=thistol, **kwargs))
660
+ tol=thistol, tag=this_tag,
661
+ **kwargs))
655
662
 
656
663
 
657
664
  def match_line(line, vary, targets, solve=True, assert_within_tol=True,
@@ -684,6 +691,16 @@ class Action(xd.Action):
684
691
 
685
692
  _target_class = Target
686
693
 
694
+ def __init__(self, callable, **kwargs):
695
+ self.callable = callable
696
+ self.kwargs = kwargs
697
+
698
+ def run(self, allow_failure=False):
699
+ return self.callable(**self.kwargs)
700
+
701
+ def __call__(self, **kwargs):
702
+ return self.run(**kwargs)
703
+
687
704
  class ActionTwiss(xd.Action):
688
705
 
689
706
  def __init__(self, line, allow_twiss_failure=False,
@@ -898,6 +915,7 @@ class OptimizeLine(xd.Optimize):
898
915
  name=name)
899
916
  self.line = line
900
917
  self.action_twiss = action_twiss
918
+ self.default_tol = default_tol
901
919
 
902
920
  def clone(self, add_targets=None, add_vary=None,
903
921
  remove_targets=None, remove_vary=None,
@@ -941,6 +959,7 @@ class OptimizeLine(xd.Optimize):
941
959
  line = self.line,
942
960
  vary=vary,
943
961
  targets=targets,
962
+ default_tol=self.default_tol,
944
963
  restore_if_fail=self.restore_if_fail,
945
964
  verbose=self._err.verbose,
946
965
  assert_within_tol=self.assert_within_tol,
@@ -2,9 +2,10 @@ import pandas as pd
2
2
  import numpy as np
3
3
  from copy import deepcopy
4
4
 
5
- from .. import json_utils
5
+ from .. import json as json_utils
6
6
  from .shared_knobs import VarSharing
7
7
  from ..match import match_knob_line
8
+ import xdeps as xd
8
9
  import xobjects as xo
9
10
  import xtrack as xt
10
11
 
@@ -138,7 +139,7 @@ class Multiline:
138
139
  **kwargs: dict
139
140
  Additional keyword arguments are passed to the `Line.to_dict` method.
140
141
  '''
141
- json_utils.to_json(self.to_dict(**kwargs), file, indent=indent)
142
+ json_utils.dump(self.to_dict(**kwargs), file, indent=indent)
142
143
 
143
144
 
144
145
  @classmethod
@@ -158,7 +159,7 @@ class Multiline:
158
159
  new_multiline: Multiline
159
160
  The multiline object.
160
161
  '''
161
- return cls.from_dict(json_utils.from_json(file), **kwargs)
162
+ return cls.from_dict(json_utils.load(file), **kwargs)
162
163
 
163
164
  @classmethod
164
165
  def from_madx(cls, filename=None, madx=None, stdout=None, return_lines=False, **kwargs):
@@ -365,8 +366,25 @@ class Multiline:
365
366
 
366
367
  return opt
367
368
 
368
- def __getitem__(self, key):
369
- return self.lines[key]
369
+ def __getitem__(self, key: str):
370
+ if key in self.vars:
371
+ return self.vv[key]
372
+
373
+ if key in self.lines:
374
+ return self.lines[key]
375
+
376
+ raise KeyError(f'Name {key} not found')
377
+
378
+ def __setitem__(self, key: str, value):
379
+ if key in self.lines:
380
+ raise ValueError(
381
+ 'Cannot create a var `{key}` using __setitem__, as there is '
382
+ 'already a line of that name in this multiline.')
383
+
384
+ if not np.isscalar(value) and not xd.refs.is_ref(value):
385
+ raise ValueError('Only scalars or references are allowed')
386
+
387
+ self.vars[key] = value
370
388
 
371
389
  def __dir__(self):
372
390
  return list(self.lines.keys()) + object.__dir__(self)
@@ -379,6 +397,34 @@ class Multiline:
379
397
  else:
380
398
  raise AttributeError(f"Multiline object has no attribute `{key}`.")
381
399
 
400
+ def set(self, key, value):
401
+ self.__setitem__(key, value)
402
+
403
+ def get(self, key):
404
+ return self.__getitem__(key)
405
+
406
+ def info(self, key, limit=12):
407
+ self.vars[key]._info(limit=limit)
408
+
409
+ eval = xt.Line.eval
410
+ get_expr = xt.Line.get_expr
411
+ new_expr = xt.Line.new_expr
412
+
413
+ @property
414
+ def _xdeps_eval(self):
415
+ try:
416
+ eva_obj = self._xdeps_eval_obj
417
+ except AttributeError:
418
+ eva_obj = xd.madxutils.MadxEval(variables=self._xdeps_vref,
419
+ functions=self.functions,
420
+ elements={})
421
+ self._xdeps_eval_obj = eva_obj
422
+
423
+ return eva_obj
424
+
425
+ def ref_manager(self):
426
+ return self._var_sharing.manager
427
+
382
428
  @property
383
429
  def vars(self):
384
430
  return self._multiline_vars
@@ -592,6 +638,7 @@ class Multiline:
592
638
  filling_pattern_acw=filling_pattern_acw,
593
639
  i_bunch_cw=i_bunch_cw, i_bunch_acw=i_bunch_acw)
594
640
 
641
+
595
642
  class MultiTwiss(dict):
596
643
 
597
644
  def __init__(self):
@@ -330,24 +330,31 @@ class TwissPlot(object):
330
330
  lattice_lo=None,
331
331
  lattice_hi=None,
332
332
  ):
333
- lo, hi = self.left.get_ylim()
334
- if left_lo is None:
335
- left_lo = lo
336
- if left_hi is None:
337
- left_hi = hi
338
- self.left.set_ylim(left_lo, left_hi)
339
- lo, hi = self.right.get_ylim()
340
- if right_lo is None:
341
- right_lo = lo
342
- if right_hi is None:
343
- right_hi = hi
344
- self.right.set_ylim(right_lo, right_hi)
345
- lo, hi = self.lattice.get_ylim()
346
- if lattice_lo is None:
347
- lattice_lo = lo
348
- if lattice_hi is None:
349
- lattice_hi = hi
350
- self.lattice.set_ylim(lattice_lo, lattice_hi)
333
+ if self.left is not None:
334
+ lo, hi = self.left.get_ylim()
335
+ if left_lo is None:
336
+ left_lo = lo
337
+ if left_hi is None:
338
+ left_hi = hi
339
+ self.left.set_ylim(left_lo, left_hi)
340
+ if self.right is not None:
341
+ lo, hi = self.right.get_ylim()
342
+ if right_lo is None:
343
+ right_lo = lo
344
+ if right_hi is None:
345
+ right_hi = hi
346
+ self.right.set_ylim(right_lo, right_hi)
347
+ if self.lattice is not None:
348
+ lo, hi = self.lattice.get_ylim()
349
+ if lattice_lo is None:
350
+ lattice_lo = lo
351
+ if lattice_hi is None:
352
+ lattice_hi = hi
353
+ self.lattice.set_ylim(lattice_lo, lattice_hi)
354
+ return self
355
+
356
+ def xlim(self, lo=None, hi=None):
357
+ self.ax.set_xlim(lo, hi)
351
358
  return self
352
359
 
353
360
  def set_s_label(self, regexp="ip.*"):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: xtrack
3
- Version: 0.70.3
3
+ Version: 0.71.0
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
@@ -105,7 +105,7 @@ xtrack/environment.py
105
105
  xtrack/footprint.py
106
106
  xtrack/general.py
107
107
  xtrack/internal_record.py
108
- xtrack/json_utils.py
108
+ xtrack/json.py
109
109
  xtrack/line.py
110
110
  xtrack/linear_normal_form.py
111
111
  xtrack/lumi.py
@@ -1 +0,0 @@
1
- __version__ = '0.70.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
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