xtrack 0.89.2__tar.gz → 0.89.3__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 (344) hide show
  1. {xtrack-0.89.2/xtrack.egg-info → xtrack-0.89.3}/PKG-INFO +1 -1
  2. {xtrack-0.89.2 → xtrack-0.89.3}/tests/test_load.py +23 -0
  3. xtrack-0.89.3/xtrack/_version.py +1 -0
  4. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/elements.py +5 -5
  5. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/elements_src/dipoleedge.h +4 -5
  6. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/elements_src/drift.h +2 -2
  7. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/elements_src/drift_exact.h +2 -2
  8. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/elements_src/drift_exact_slice.h +6 -5
  9. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/elements_src/drift_slice.h +6 -6
  10. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/elements_src/drift_slice_bend.h +7 -6
  11. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/elements_src/drift_slice_cavity.h +7 -6
  12. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/elements_src/drift_slice_crab_cavity.h +7 -6
  13. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/elements_src/drift_slice_multipole.h +7 -6
  14. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/elements_src/drift_slice_octupole.h +7 -6
  15. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/elements_src/drift_slice_quadrupole.h +7 -6
  16. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/elements_src/drift_slice_rbend.h +7 -6
  17. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/elements_src/drift_slice_sextupole.h +7 -6
  18. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/elements_src/drift_slice_uniform_solenoid.h +7 -6
  19. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/elements_src/elens.h +2 -2
  20. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/elements_src/exciter.h +8 -7
  21. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/elements_src/legacy_solenoid.h +2 -2
  22. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/elements_src/magnet_edge.h +6 -5
  23. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/elements_src/misalignment.h +0 -4
  24. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/elements_src/referenceenergyincrease.h +2 -2
  25. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/elements_src/simplethinbend.h +2 -2
  26. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/elements_src/simplethinquadrupole.h +2 -2
  27. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/elements_src/srotation.h +2 -2
  28. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/elements_src/track_legacy_solenoid_radiation.h +3 -3
  29. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/elements_src/track_magnet.h +16 -14
  30. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/elements_src/track_magnet.template.h +16 -14
  31. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/elements_src/track_magnet_radiation.h +3 -3
  32. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/elements_src/track_mult_fringe.h +2 -2
  33. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/elements_src/track_rf.h +10 -7
  34. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/elements_src/track_rf.template.h +10 -7
  35. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/elements_src/variable_solenoid.h +2 -2
  36. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/elements_src/xrotation.h +2 -2
  37. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/elements_src/xyshift.h +2 -2
  38. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/elements_src/yrotation.h +2 -2
  39. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/elements_src/zetashift.h +2 -2
  40. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/general.py +6 -2
  41. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/loss_location_refinement/loss_location_refinement.py +3 -1
  42. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/monitors/particles_monitor.h +3 -4
  43. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/tracker.py +24 -24
  44. {xtrack-0.89.2 → xtrack-0.89.3/xtrack.egg-info}/PKG-INFO +1 -1
  45. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack.egg-info/SOURCES.txt +0 -1
  46. xtrack-0.89.2/xtrack/_version.py +0 -1
  47. xtrack-0.89.2/xtrack/beam_elements/elements_src/track_cavity.h +0 -66
  48. {xtrack-0.89.2 → xtrack-0.89.3}/LICENSE +0 -0
  49. {xtrack-0.89.2 → xtrack-0.89.3}/MANIFEST.in +0 -0
  50. {xtrack-0.89.2 → xtrack-0.89.3}/README.md +0 -0
  51. {xtrack-0.89.2 → xtrack-0.89.3}/ducktrack/__init__.py +0 -0
  52. {xtrack-0.89.2 → xtrack-0.89.3}/ducktrack/base_classes.py +0 -0
  53. {xtrack-0.89.2 → xtrack-0.89.3}/ducktrack/be_beamfields/BB6D.py +0 -0
  54. {xtrack-0.89.2 → xtrack-0.89.3}/ducktrack/be_beamfields/BB6Ddata.py +0 -0
  55. {xtrack-0.89.2 → xtrack-0.89.3}/ducktrack/be_beamfields/__init__.py +0 -0
  56. {xtrack-0.89.2 → xtrack-0.89.3}/ducktrack/be_beamfields/beambeam.py +0 -0
  57. {xtrack-0.89.2 → xtrack-0.89.3}/ducktrack/be_beamfields/boost.py +0 -0
  58. {xtrack-0.89.2 → xtrack-0.89.3}/ducktrack/be_beamfields/gaussian_fields.py +0 -0
  59. {xtrack-0.89.2 → xtrack-0.89.3}/ducktrack/be_beamfields/propagate_sigma_matrix.py +0 -0
  60. {xtrack-0.89.2 → xtrack-0.89.3}/ducktrack/be_beamfields/qgauss.py +0 -0
  61. {xtrack-0.89.2 → xtrack-0.89.3}/ducktrack/be_beamfields/slicing.py +0 -0
  62. {xtrack-0.89.2 → xtrack-0.89.3}/ducktrack/be_beamfields/spacecharge.py +0 -0
  63. {xtrack-0.89.2 → xtrack-0.89.3}/ducktrack/elements.py +0 -0
  64. {xtrack-0.89.2 → xtrack-0.89.3}/ducktrack/line.py +0 -0
  65. {xtrack-0.89.2 → xtrack-0.89.3}/ducktrack/mathlibs.py +0 -0
  66. {xtrack-0.89.2 → xtrack-0.89.3}/ducktrack/particles.py +0 -0
  67. {xtrack-0.89.2 → xtrack-0.89.3}/ducktrack/temp_pyparticles.py +0 -0
  68. {xtrack-0.89.2 → xtrack-0.89.3}/pyproject.toml +0 -0
  69. {xtrack-0.89.2 → xtrack-0.89.3}/setup.cfg +0 -0
  70. {xtrack-0.89.2 → xtrack-0.89.3}/setup.py +0 -0
  71. {xtrack-0.89.2 → xtrack-0.89.3}/tests/test_acceleration.py +0 -0
  72. {xtrack-0.89.2 → xtrack-0.89.3}/tests/test_amplitude_detuning.py +0 -0
  73. {xtrack-0.89.2 → xtrack-0.89.3}/tests/test_aperture_table.py +0 -0
  74. {xtrack-0.89.2 → xtrack-0.89.3}/tests/test_aperture_turn_ele_and_monitor.py +0 -0
  75. {xtrack-0.89.2 → xtrack-0.89.3}/tests/test_apertures.py +0 -0
  76. {xtrack-0.89.2 → xtrack-0.89.3}/tests/test_attr_replicas_and_slices.py +0 -0
  77. {xtrack-0.89.2 → xtrack-0.89.3}/tests/test_bucket_with_ref_energy_change.py +0 -0
  78. {xtrack-0.89.2 → xtrack-0.89.3}/tests/test_cavity_absolute_time.py +0 -0
  79. {xtrack-0.89.2 → xtrack-0.89.3}/tests/test_chromatic_functions_vs_madx.py +0 -0
  80. {xtrack-0.89.2 → xtrack-0.89.3}/tests/test_coasting.py +0 -0
  81. {xtrack-0.89.2 → xtrack-0.89.3}/tests/test_collective_tracker.py +0 -0
  82. {xtrack-0.89.2 → xtrack-0.89.3}/tests/test_collimation.py +0 -0
  83. {xtrack-0.89.2 → xtrack-0.89.3}/tests/test_coupling_edwards_teng.py +0 -0
  84. {xtrack-0.89.2 → xtrack-0.89.3}/tests/test_electron_cooler.py +0 -0
  85. {xtrack-0.89.2 → xtrack-0.89.3}/tests/test_element_characterization_functions.py +0 -0
  86. {xtrack-0.89.2 → xtrack-0.89.3}/tests/test_element_internal_record.py +0 -0
  87. {xtrack-0.89.2 → xtrack-0.89.3}/tests/test_elements.py +0 -0
  88. {xtrack-0.89.2 → xtrack-0.89.3}/tests/test_elements_classflags.py +0 -0
  89. {xtrack-0.89.2 → xtrack-0.89.3}/tests/test_elements_thick.py +0 -0
  90. {xtrack-0.89.2 → xtrack-0.89.3}/tests/test_environment.py +0 -0
  91. {xtrack-0.89.2 → xtrack-0.89.3}/tests/test_fcc_ee_solenoid_correction.py +0 -0
  92. {xtrack-0.89.2 → xtrack-0.89.3}/tests/test_fcc_ee_solenoid_correction_new_optimize_api.py +0 -0
  93. {xtrack-0.89.2 → xtrack-0.89.3}/tests/test_footprint.py +0 -0
  94. {xtrack-0.89.2 → xtrack-0.89.3}/tests/test_freeze_longitudinal.py +0 -0
  95. {xtrack-0.89.2 → xtrack-0.89.3}/tests/test_full_rings.py +0 -0
  96. {xtrack-0.89.2 → xtrack-0.89.3}/tests/test_h6_sps_beamline.py +0 -0
  97. {xtrack-0.89.2 → xtrack-0.89.3}/tests/test_hvkick.py +0 -0
  98. {xtrack-0.89.2 → xtrack-0.89.3}/tests/test_ions.py +0 -0
  99. {xtrack-0.89.2 → xtrack-0.89.3}/tests/test_legacy_multiline_to_env.py +0 -0
  100. {xtrack-0.89.2 → xtrack-0.89.3}/tests/test_lhc_env.py +0 -0
  101. {xtrack-0.89.2 → xtrack-0.89.3}/tests/test_lhc_match_phase_15.py +0 -0
  102. {xtrack-0.89.2 → xtrack-0.89.3}/tests/test_line.py +0 -0
  103. {xtrack-0.89.2 → xtrack-0.89.3}/tests/test_load_vars.py +0 -0
  104. {xtrack-0.89.2 → xtrack-0.89.3}/tests/test_lumi.py +0 -0
  105. {xtrack-0.89.2 → xtrack-0.89.3}/tests/test_mad_writer.py +0 -0
  106. {xtrack-0.89.2 → xtrack-0.89.3}/tests/test_madloader.py +0 -0
  107. {xtrack-0.89.2 → xtrack-0.89.3}/tests/test_madnginterface.py +0 -0
  108. {xtrack-0.89.2 → xtrack-0.89.3}/tests/test_magnet.py +0 -0
  109. {xtrack-0.89.2 → xtrack-0.89.3}/tests/test_match_and_track_from_element.py +0 -0
  110. {xtrack-0.89.2 → xtrack-0.89.3}/tests/test_match_coupling_knob.py +0 -0
  111. {xtrack-0.89.2 → xtrack-0.89.3}/tests/test_match_nested.py +0 -0
  112. {xtrack-0.89.2 → xtrack-0.89.3}/tests/test_match_optics_and_ip_knob.py +0 -0
  113. {xtrack-0.89.2 → xtrack-0.89.3}/tests/test_match_optics_and_ip_knob_new_optimize_api.py +0 -0
  114. {xtrack-0.89.2 → xtrack-0.89.3}/tests/test_match_orbit_bump.py +0 -0
  115. {xtrack-0.89.2 → xtrack-0.89.3}/tests/test_match_tune_chroma_cminus.py +0 -0
  116. {xtrack-0.89.2 → xtrack-0.89.3}/tests/test_misalign.py +0 -0
  117. {xtrack-0.89.2 → xtrack-0.89.3}/tests/test_monitor.py +0 -0
  118. {xtrack-0.89.2 → xtrack-0.89.3}/tests/test_multi_bunch_gauss.py +0 -0
  119. {xtrack-0.89.2 → xtrack-0.89.3}/tests/test_multiline.py +0 -0
  120. {xtrack-0.89.2 → xtrack-0.89.3}/tests/test_multisetter.py +0 -0
  121. {xtrack-0.89.2 → xtrack-0.89.3}/tests/test_multispecies.py +0 -0
  122. {xtrack-0.89.2 → xtrack-0.89.3}/tests/test_native_madloader.py +0 -0
  123. {xtrack-0.89.2 → xtrack-0.89.3}/tests/test_optimize_for_tracking.py +0 -0
  124. {xtrack-0.89.2 → xtrack-0.89.3}/tests/test_particles.py +0 -0
  125. {xtrack-0.89.2 → xtrack-0.89.3}/tests/test_particles_basics.py +0 -0
  126. {xtrack-0.89.2 → xtrack-0.89.3}/tests/test_particles_pdg.py +0 -0
  127. {xtrack-0.89.2 → xtrack-0.89.3}/tests/test_pipeline.py +0 -0
  128. {xtrack-0.89.2 → xtrack-0.89.3}/tests/test_prebuild_kernels.py +0 -0
  129. {xtrack-0.89.2 → xtrack-0.89.3}/tests/test_ps_against_ptc.py +0 -0
  130. {xtrack-0.89.2 → xtrack-0.89.3}/tests/test_ps_multiturn_twiss.py +0 -0
  131. {xtrack-0.89.2 → xtrack-0.89.3}/tests/test_psb_chicane.py +0 -0
  132. {xtrack-0.89.2 → xtrack-0.89.3}/tests/test_pyht_interface.py +0 -0
  133. {xtrack-0.89.2 → xtrack-0.89.3}/tests/test_quadrupole_fringe_ptc.py +0 -0
  134. {xtrack-0.89.2 → xtrack-0.89.3}/tests/test_quadrupole_wedge.py +0 -0
  135. {xtrack-0.89.2 → xtrack-0.89.3}/tests/test_radial_steering.py +0 -0
  136. {xtrack-0.89.2 → xtrack-0.89.3}/tests/test_radiation.py +0 -0
  137. {xtrack-0.89.2 → xtrack-0.89.3}/tests/test_radiation_equilibrium_emittances.py +0 -0
  138. {xtrack-0.89.2 → xtrack-0.89.3}/tests/test_radiation_equilibrium_emittances_thick.py +0 -0
  139. {xtrack-0.89.2 → xtrack-0.89.3}/tests/test_radiation_integrals.py +0 -0
  140. {xtrack-0.89.2 → xtrack-0.89.3}/tests/test_random_gen.py +0 -0
  141. {xtrack-0.89.2 → xtrack-0.89.3}/tests/test_random_gen_exp.py +0 -0
  142. {xtrack-0.89.2 → xtrack-0.89.3}/tests/test_random_gen_gauss.py +0 -0
  143. {xtrack-0.89.2 → xtrack-0.89.3}/tests/test_random_gen_ruth.py +0 -0
  144. {xtrack-0.89.2 → xtrack-0.89.3}/tests/test_rbend_rbarc.py +0 -0
  145. {xtrack-0.89.2 → xtrack-0.89.3}/tests/test_rbend_straight_body.py +0 -0
  146. {xtrack-0.89.2 → xtrack-0.89.3}/tests/test_rf_track.py +0 -0
  147. {xtrack-0.89.2 → xtrack-0.89.3}/tests/test_rotation_signs.py +0 -0
  148. {xtrack-0.89.2 → xtrack-0.89.3}/tests/test_second_order_taylor_map.py +0 -0
  149. {xtrack-0.89.2 → xtrack-0.89.3}/tests/test_seeds.py +0 -0
  150. {xtrack-0.89.2 → xtrack-0.89.3}/tests/test_slice_and_insert_with_replicas.py +0 -0
  151. {xtrack-0.89.2 → xtrack-0.89.3}/tests/test_slice_elements.py +0 -0
  152. {xtrack-0.89.2 → xtrack-0.89.3}/tests/test_slicing.py +0 -0
  153. {xtrack-0.89.2 → xtrack-0.89.3}/tests/test_solenoid_bz_map_vs_boris.py +0 -0
  154. {xtrack-0.89.2 → xtrack-0.89.3}/tests/test_solenoid_bz_map_vs_boris_legacy.py +0 -0
  155. {xtrack-0.89.2 → xtrack-0.89.3}/tests/test_spacecharge_in_ring.py +0 -0
  156. {xtrack-0.89.2 → xtrack-0.89.3}/tests/test_spin.py +0 -0
  157. {xtrack-0.89.2 → xtrack-0.89.3}/tests/test_sps_thick.py +0 -0
  158. {xtrack-0.89.2 → xtrack-0.89.3}/tests/test_survey.py +0 -0
  159. {xtrack-0.89.2 → xtrack-0.89.3}/tests/test_tapering.py +0 -0
  160. {xtrack-0.89.2 → xtrack-0.89.3}/tests/test_thick_kickers_rf_crab.py +0 -0
  161. {xtrack-0.89.2 → xtrack-0.89.3}/tests/test_thick_lhc.py +0 -0
  162. {xtrack-0.89.2 → xtrack-0.89.3}/tests/test_tilt_shifts.py +0 -0
  163. {xtrack-0.89.2 → xtrack-0.89.3}/tests/test_tracker.py +0 -0
  164. {xtrack-0.89.2 → xtrack-0.89.3}/tests/test_trajectory_correcton.py +0 -0
  165. {xtrack-0.89.2 → xtrack-0.89.3}/tests/test_twiss.py +0 -0
  166. {xtrack-0.89.2 → xtrack-0.89.3}/tests/test_twiss_vs_madx_psb.py +0 -0
  167. {xtrack-0.89.2 → xtrack-0.89.3}/tests/test_vs_madx.py +0 -0
  168. {xtrack-0.89.2 → xtrack-0.89.3}/tests/test_xmask_orbit_correction.py +0 -0
  169. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/__init__.py +0 -0
  170. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/_temp/__init__.py +0 -0
  171. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/_temp/boris_and_solenoid_map/__init__.py +0 -0
  172. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/_temp/boris_and_solenoid_map/boris.h +0 -0
  173. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/_temp/boris_and_solenoid_map/solenoid_field.py +0 -0
  174. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/_temp/lhc_match/__init__.py +0 -0
  175. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/_temp/lhc_match/gen_madx_optics_file.py +0 -0
  176. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/_temp/lhc_match/lhc_match.py +0 -0
  177. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/_temp/lhc_match/var_limits.py +0 -0
  178. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/aperture_meas.py +0 -0
  179. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/base_element.py +0 -0
  180. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/__init__.py +0 -0
  181. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/apertures.py +0 -0
  182. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/apertures_src/limitellipse.h +0 -0
  183. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/apertures_src/limitpolygon.h +0 -0
  184. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/apertures_src/limitracetrack.h +0 -0
  185. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/apertures_src/limitrect.h +0 -0
  186. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/apertures_src/limitrectellipse.h +0 -0
  187. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/apertures_src/longitudinallimitrect.h +0 -0
  188. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/beam_interaction.py +0 -0
  189. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/elements_src/bend.h +0 -0
  190. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/elements_src/cavity.h +0 -0
  191. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/elements_src/crab_cavity.h +0 -0
  192. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/elements_src/default_magnet_config.h +0 -0
  193. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/elements_src/dipole_fringe.h +0 -0
  194. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/elements_src/electroncooler.h +0 -0
  195. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/elements_src/firstordertaylormap.h +0 -0
  196. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/elements_src/linesegmentmap.h +0 -0
  197. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/elements_src/magnet.h +0 -0
  198. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/elements_src/magnet_drift.h +0 -0
  199. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/elements_src/magnet_kick.h +0 -0
  200. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/elements_src/marker.h +0 -0
  201. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/elements_src/multipole.h +0 -0
  202. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/elements_src/multipoleedge.h +0 -0
  203. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/elements_src/nonlinearlens.h +0 -0
  204. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/elements_src/octupole.h +0 -0
  205. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/elements_src/quadrupole.h +0 -0
  206. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/elements_src/rbend.h +0 -0
  207. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/elements_src/rfmultipole.h +0 -0
  208. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/elements_src/second_order_taylor_map.h +0 -0
  209. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/elements_src/sextupole.h +0 -0
  210. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/elements_src/slnd.h +0 -0
  211. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/elements_src/temprf.h +0 -0
  212. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/elements_src/thick_slice_bend.h +0 -0
  213. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/elements_src/thick_slice_cavity.h +0 -0
  214. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/elements_src/thick_slice_crab_cavity.h +0 -0
  215. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/elements_src/thick_slice_multipole.h +0 -0
  216. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/elements_src/thick_slice_octupole.h +0 -0
  217. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/elements_src/thick_slice_quadrupole.h +0 -0
  218. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/elements_src/thick_slice_rbend.h +0 -0
  219. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/elements_src/thick_slice_sextupole.h +0 -0
  220. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/elements_src/thick_slice_uniform_solenoid.h +0 -0
  221. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/elements_src/thin_slice_bend.h +0 -0
  222. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/elements_src/thin_slice_bend_entry.h +0 -0
  223. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/elements_src/thin_slice_bend_exit.h +0 -0
  224. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/elements_src/thin_slice_cavity.h +0 -0
  225. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/elements_src/thin_slice_crab_cavity.h +0 -0
  226. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/elements_src/thin_slice_multipole.h +0 -0
  227. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/elements_src/thin_slice_octupole.h +0 -0
  228. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/elements_src/thin_slice_octupole_entry.h +0 -0
  229. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/elements_src/thin_slice_octupole_exit.h +0 -0
  230. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/elements_src/thin_slice_quadrupole.h +0 -0
  231. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/elements_src/thin_slice_quadrupole_entry.h +0 -0
  232. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/elements_src/thin_slice_quadrupole_exit.h +0 -0
  233. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/elements_src/thin_slice_rbend.h +0 -0
  234. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/elements_src/thin_slice_rbend_entry.h +0 -0
  235. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/elements_src/thin_slice_rbend_exit.h +0 -0
  236. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/elements_src/thin_slice_sextupole.h +0 -0
  237. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/elements_src/thin_slice_sextupole_entry.h +0 -0
  238. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/elements_src/thin_slice_sextupole_exit.h +0 -0
  239. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/elements_src/thin_slice_uniform_solenoid_entry.h +0 -0
  240. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/elements_src/thin_slice_uniform_solenoid_exit.h +0 -0
  241. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/elements_src/track_dipole_edge_linear.h +0 -0
  242. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/elements_src/track_dipole_edge_nonlinear.h +0 -0
  243. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/elements_src/track_dipole_fringe.h +0 -0
  244. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/elements_src/track_drift.h +0 -0
  245. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/elements_src/track_legacy_solenoid.h +0 -0
  246. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/elements_src/track_legacy_solenoid_multipolar_components.h +0 -0
  247. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/elements_src/track_magnet_configure.h +0 -0
  248. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/elements_src/track_magnet_drift.h +0 -0
  249. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/elements_src/track_magnet_edge.h +0 -0
  250. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/elements_src/track_magnet_kick.h +0 -0
  251. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/elements_src/track_misalignments.h +0 -0
  252. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/elements_src/track_srotation.h +0 -0
  253. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/elements_src/track_thick_bend.h +0 -0
  254. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/elements_src/track_thick_cfd.h +0 -0
  255. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/elements_src/track_wedge.h +0 -0
  256. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/elements_src/track_xrotation.h +0 -0
  257. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/elements_src/track_xyshift.h +0 -0
  258. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/elements_src/track_yrotation.h +0 -0
  259. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/elements_src/wedge.h +0 -0
  260. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/elements_src/wire.h +0 -0
  261. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/exciter.py +0 -0
  262. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/rft_element.py +0 -0
  263. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/slice_base.py +0 -0
  264. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/slice_elements_drift.py +0 -0
  265. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/slice_elements_edge.py +0 -0
  266. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/slice_elements_thick.py +0 -0
  267. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/beam_elements/slice_elements_thin.py +0 -0
  268. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/environment.py +0 -0
  269. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/footprint.py +0 -0
  270. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/headers/atomicadd.h +0 -0
  271. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/headers/checks.h +0 -0
  272. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/headers/constants.h +0 -0
  273. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/headers/particle_states.h +0 -0
  274. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/headers/synrad_spectrum.h +0 -0
  275. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/headers/track.h +0 -0
  276. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/internal_record.py +0 -0
  277. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/json.py +0 -0
  278. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/line.py +0 -0
  279. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/linear_normal_form.py +0 -0
  280. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/load.py +0 -0
  281. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/loss_location_refinement/__init__.py +0 -0
  282. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/lumi.py +0 -0
  283. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/mad_loader.py +0 -0
  284. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/mad_parser/__init__.py +0 -0
  285. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/mad_parser/loader.py +0 -0
  286. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/mad_parser/madx.lark +0 -0
  287. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/mad_parser/parse.py +0 -0
  288. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/mad_writer.py +0 -0
  289. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/madng_interface.py +0 -0
  290. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/match.py +0 -0
  291. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/monitors/__init__.py +0 -0
  292. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/monitors/beam_position_monitor.h +0 -0
  293. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/monitors/beam_position_monitor.py +0 -0
  294. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/monitors/beam_profile_monitor.h +0 -0
  295. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/monitors/beam_profile_monitor.py +0 -0
  296. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/monitors/beam_size_monitor.h +0 -0
  297. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/monitors/beam_size_monitor.py +0 -0
  298. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/monitors/last_turns_monitor.h +0 -0
  299. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/monitors/last_turns_monitor.py +0 -0
  300. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/monitors/particles_monitor.py +0 -0
  301. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/multiline.py +0 -0
  302. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/multiline_legacy/__init__.py +0 -0
  303. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/multiline_legacy/multiline_legacy.py +0 -0
  304. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/multiline_legacy/shared_knobs.py +0 -0
  305. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/multisetter/__init__.py +0 -0
  306. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/multisetter/multisetter.py +0 -0
  307. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/particles/__init__.py +0 -0
  308. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/particles/constants.py +0 -0
  309. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/particles/masses.py +0 -0
  310. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/particles/particles.py +0 -0
  311. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/particles/pdg.py +0 -0
  312. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/particles/rng_src/base_rng.h +0 -0
  313. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/particles/rng_src/particles_rng.h +0 -0
  314. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/pipeline/__init__.py +0 -0
  315. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/pipeline/core.py +0 -0
  316. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/pipeline/manager.py +0 -0
  317. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/pipeline/multitracker.py +0 -0
  318. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/progress_indicator.py +0 -0
  319. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/random/__init__.py +0 -0
  320. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/random/random_generators.py +0 -0
  321. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/random/random_src/exponential.h +0 -0
  322. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/random/random_src/exponential_integral_Ei.h +0 -0
  323. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/random/random_src/normal.h +0 -0
  324. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/random/random_src/rutherford.h +0 -0
  325. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/random/random_src/uniform.h +0 -0
  326. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/random/random_src/uniform_accurate.h +0 -0
  327. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/slicing.py +0 -0
  328. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/survey.py +0 -0
  329. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/svgutils/__init__.py +0 -0
  330. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/svgutils/parser.py +0 -0
  331. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/svgutils/path.py +0 -0
  332. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/svgutils/svgutils.py +0 -0
  333. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/synctime.py +0 -0
  334. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/tapering.py +0 -0
  335. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/targets.py +0 -0
  336. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/track_flags.py +0 -0
  337. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/tracker_data.py +0 -0
  338. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/tracker_src/tracker.h +0 -0
  339. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/trajectory_correction.py +0 -0
  340. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/twiss.py +0 -0
  341. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack/twissplot.py +0 -0
  342. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack.egg-info/dependency_links.txt +0 -0
  343. {xtrack-0.89.2 → xtrack-0.89.3}/xtrack.egg-info/requires.txt +0 -0
  344. {xtrack-0.89.2 → xtrack-0.89.3}/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.89.2
3
+ Version: 0.89.3
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
@@ -6,6 +6,7 @@ import pytest
6
6
  import xtrack as xt
7
7
  import json
8
8
  import textwrap
9
+ import gzip
9
10
 
10
11
 
11
12
  @pytest.fixture
@@ -125,6 +126,28 @@ def test_load_http(input_fixture, format, suffix, with_format, tmpdir, request,
125
126
  quad = loaded_entity['quad']
126
127
  assert quad.length == 1.0 and quad.k1 == 0.5
127
128
 
129
+ @pytest.mark.parametrize(
130
+ 'input_fixture,format,suffix', [
131
+ ('json_line', 'json', 'json'),
132
+ ('json_environment', 'json', 'json'),
133
+ ]
134
+ )
135
+ @pytest.mark.parametrize('with_format', [True, False])
136
+ def test_load_http_gz(input_fixture, format, suffix, with_format, tmpdir, request, requests_mock):
137
+ input_data = request.getfixturevalue(input_fixture)
138
+ compressed_data=gzip.compress(input_data.encode("utf-8"))
139
+
140
+ url = f'http://example.com/test_input.{suffix}.gz'
141
+ requests_mock.get(url, content=compressed_data)
142
+
143
+ kwargs = {'file': url}
144
+ if with_format:
145
+ kwargs['format'] = format
146
+ loaded_entity = xt.load(**kwargs)
147
+
148
+ quad = loaded_entity['quad']
149
+ assert quad.length == 1.0 and quad.k1 == 0.5
150
+
128
151
 
129
152
  def test_load_single_element():
130
153
  string = json.dumps({
@@ -0,0 +1 @@
1
+ __version__ = '0.89.3'
@@ -140,13 +140,13 @@ class _HasModelRF:
140
140
  """
141
141
 
142
142
  @property
143
- def rf_model(self):
144
- return _INDEX_TO_MODEL_RF[self._rf_model]
143
+ def model(self):
144
+ return _INDEX_TO_MODEL_RF[self._model]
145
145
 
146
- @rf_model.setter
147
- def rf_model(self, value):
146
+ @model.setter
147
+ def model(self, value):
148
148
  try:
149
- self._rf_model = _MODEL_TO_INDEX_RF[value]
149
+ self._model = _MODEL_TO_INDEX_RF[value]
150
150
  except KeyError:
151
151
  raise ValueError(f'Invalid RF model: {value}')
152
152
 
@@ -34,10 +34,10 @@ void DipoleEdge_track_local_particle(DipoleEdgeData el, LocalParticle* part0){
34
34
  r43 = r43 * (1 + delta_taper);
35
35
  }
36
36
 
37
- #ifdef XSUITE_BACKTRACK
37
+ if (LocalParticle_check_track_flag(part0, XS_FLAG_BACKTRACK)){
38
38
  r21 = -r21;
39
39
  r43 = -r43;
40
- #endif
40
+ }
41
41
 
42
42
  START_PER_PARTICLE_BLOCK(part0, part);
43
43
  if (LocalParticle_check_track_flag(part0, XS_FLAG_SR_TAPER)){
@@ -52,12 +52,12 @@ void DipoleEdge_track_local_particle(DipoleEdgeData el, LocalParticle* part0){
52
52
  }
53
53
  else if (model == 1){
54
54
 
55
- #ifdef XSUITE_BACKTRACK
55
+ if (LocalParticle_check_track_flag(part0, XS_FLAG_BACKTRACK)){
56
56
  START_PER_PARTICLE_BLOCK(part0, part);
57
57
  LocalParticle_kill_particle(part, -32);
58
58
  END_PER_PARTICLE_BLOCK;
59
59
  return;
60
- #else
60
+ }
61
61
 
62
62
  double const e1 = DipoleEdgeData_get_e1(el);
63
63
  double const fint = DipoleEdgeData_get_fint(el);
@@ -69,7 +69,6 @@ void DipoleEdge_track_local_particle(DipoleEdgeData el, LocalParticle* part0){
69
69
  DipoleEdgeNonLinear_single_particle(part, k, e1, fint, hgap, side);
70
70
  END_PER_PARTICLE_BLOCK;
71
71
 
72
- #endif
73
72
  }
74
73
 
75
74
  }
@@ -14,9 +14,9 @@ GPUFUN
14
14
  void Drift_track_local_particle(DriftData el, LocalParticle* part0){
15
15
 
16
16
  double length = DriftData_get_length(el);
17
- #ifdef XSUITE_BACKTRACK
17
+ if (LocalParticle_check_track_flag(part0, XS_FLAG_BACKTRACK)) {
18
18
  length = -length;
19
- #endif
19
+ }
20
20
 
21
21
  START_PER_PARTICLE_BLOCK(part0, part);
22
22
  Drift_single_particle(part, length);
@@ -14,9 +14,9 @@ GPUFUN
14
14
  void DriftExact_track_local_particle(DriftExactData el, LocalParticle* part0){
15
15
 
16
16
  double length = DriftExactData_get_length(el);
17
- #ifdef XSUITE_BACKTRACK
17
+ if (LocalParticle_check_track_flag(part0, XS_FLAG_BACKTRACK)) {
18
18
  length = -length;
19
- #endif
19
+ }
20
20
 
21
21
  START_PER_PARTICLE_BLOCK(part0, part);
22
22
  Drift_single_particle_exact(part, length);
@@ -18,11 +18,12 @@ void DriftExactSlice_track_local_particle(
18
18
 
19
19
  double weight = DriftExactSliceData_get_weight(el);
20
20
 
21
- #ifndef XSUITE_BACKTRACK
22
- double const length = weight * DriftExactSliceData_get__parent_length(el); // m
23
- #else
24
- double const length = -weight * DriftExactSliceData_get__parent_length(el); // m
25
- #endif
21
+ double length;
22
+ if (LocalParticle_check_track_flag(part0, XS_FLAG_BACKTRACK)) {
23
+ length = -weight * DriftExactSliceData_get__parent_length(el); // m
24
+ } else {
25
+ length = weight * DriftExactSliceData_get__parent_length(el); // m
26
+ }
26
27
 
27
28
  START_PER_PARTICLE_BLOCK(part0, part);
28
29
  Drift_single_particle_exact(part, length);
@@ -17,12 +17,12 @@ void DriftSlice_track_local_particle(
17
17
  ) {
18
18
 
19
19
  double weight = DriftSliceData_get_weight(el);
20
-
21
- #ifndef XSUITE_BACKTRACK
22
- double const length = weight * DriftSliceData_get__parent_length(el); // m
23
- #else
24
- double const length = -weight * DriftSliceData_get__parent_length(el); // m
25
- #endif
20
+ double length;
21
+ if (LocalParticle_check_track_flag(part0, XS_FLAG_BACKTRACK)) {
22
+ length = -weight * DriftSliceData_get__parent_length(el); // m
23
+ } else {
24
+ length = weight * DriftSliceData_get__parent_length(el); // m
25
+ }
26
26
 
27
27
  START_PER_PARTICLE_BLOCK(part0, part);
28
28
  Drift_single_particle(part, length);
@@ -21,12 +21,13 @@
21
21
  ) {
22
22
 
23
23
  double weight = DriftSliceBendData_get_weight(el);
24
-
25
- #ifndef XSUITE_BACKTRACK
26
- double const length = weight * DriftSliceBendData_get__parent_length(el); // m
27
- #else
28
- double const length = -weight * DriftSliceBendData_get__parent_length(el); // m
29
- #endif
24
+ double length;
25
+ if (LocalParticle_check_track_flag(part0, XS_FLAG_BACKTRACK)) {
26
+ length = -weight * DriftSliceBendData_get__parent_length(el); // m
27
+ }
28
+ else {
29
+ length = weight * DriftSliceBendData_get__parent_length(el); // m
30
+ }
30
31
 
31
32
  START_PER_PARTICLE_BLOCK(part0, part);
32
33
  Drift_single_particle(part, length);
@@ -21,12 +21,13 @@
21
21
  ) {
22
22
 
23
23
  double weight = DriftSliceCavityData_get_weight(el);
24
-
25
- #ifndef XSUITE_BACKTRACK
26
- double const length = weight * DriftSliceCavityData_get__parent_length(el); // m
27
- #else
28
- double const length = -weight * DriftSliceCavityData_get__parent_length(el); // m
29
- #endif
24
+ double length;
25
+ if (LocalParticle_check_track_flag(part0, XS_FLAG_BACKTRACK)) {
26
+ length = -weight * DriftSliceCavityData_get__parent_length(el); // m
27
+ }
28
+ else {
29
+ length = weight * DriftSliceCavityData_get__parent_length(el); // m
30
+ }
30
31
 
31
32
  START_PER_PARTICLE_BLOCK(part0, part);
32
33
  Drift_single_particle(part, length);
@@ -21,12 +21,13 @@
21
21
  ) {
22
22
 
23
23
  double weight = DriftSliceCrabCavityData_get_weight(el);
24
-
25
- #ifndef XSUITE_BACKTRACK
26
- double const length = weight * DriftSliceCrabCavityData_get__parent_length(el); // m
27
- #else
28
- double const length = -weight * DriftSliceCrabCavityData_get__parent_length(el); // m
29
- #endif
24
+ double length;
25
+ if (LocalParticle_check_track_flag(part0, XS_FLAG_BACKTRACK)) {
26
+ length = -weight * DriftSliceCrabCavityData_get__parent_length(el); // m
27
+ }
28
+ else {
29
+ length = weight * DriftSliceCrabCavityData_get__parent_length(el); // m
30
+ }
30
31
 
31
32
  START_PER_PARTICLE_BLOCK(part0, part);
32
33
  Drift_single_particle(part, length);
@@ -21,12 +21,13 @@
21
21
  ) {
22
22
 
23
23
  double weight = DriftSliceMultipoleData_get_weight(el);
24
-
25
- #ifndef XSUITE_BACKTRACK
26
- double const length = weight * DriftSliceMultipoleData_get__parent_length(el); // m
27
- #else
28
- double const length = -weight * DriftSliceMultipoleData_get__parent_length(el); // m
29
- #endif
24
+ double length;
25
+ if (LocalParticle_check_track_flag(part0, XS_FLAG_BACKTRACK)) {
26
+ length = -weight * DriftSliceMultipoleData_get__parent_length(el); // m
27
+ }
28
+ else {
29
+ length = weight * DriftSliceMultipoleData_get__parent_length(el); // m
30
+ }
30
31
 
31
32
  START_PER_PARTICLE_BLOCK(part0, part);
32
33
  Drift_single_particle(part, length);
@@ -21,12 +21,13 @@
21
21
  ) {
22
22
 
23
23
  double weight = DriftSliceOctupoleData_get_weight(el);
24
-
25
- #ifndef XSUITE_BACKTRACK
26
- double const length = weight * DriftSliceOctupoleData_get__parent_length(el); // m
27
- #else
28
- double const length = -weight * DriftSliceOctupoleData_get__parent_length(el); // m
29
- #endif
24
+ double length;
25
+ if (LocalParticle_check_track_flag(part0, XS_FLAG_BACKTRACK)) {
26
+ length = -weight * DriftSliceOctupoleData_get__parent_length(el); // m
27
+ }
28
+ else {
29
+ length = weight * DriftSliceOctupoleData_get__parent_length(el); // m
30
+ }
30
31
 
31
32
  START_PER_PARTICLE_BLOCK(part0, part);
32
33
  Drift_single_particle(part, length);
@@ -21,12 +21,13 @@
21
21
  ) {
22
22
 
23
23
  double weight = DriftSliceQuadrupoleData_get_weight(el);
24
-
25
- #ifndef XSUITE_BACKTRACK
26
- double const length = weight * DriftSliceQuadrupoleData_get__parent_length(el); // m
27
- #else
28
- double const length = -weight * DriftSliceQuadrupoleData_get__parent_length(el); // m
29
- #endif
24
+ double length;
25
+ if (LocalParticle_check_track_flag(part0, XS_FLAG_BACKTRACK)) {
26
+ length = -weight * DriftSliceQuadrupoleData_get__parent_length(el); // m
27
+ }
28
+ else {
29
+ length = weight * DriftSliceQuadrupoleData_get__parent_length(el); // m
30
+ }
30
31
 
31
32
  START_PER_PARTICLE_BLOCK(part0, part);
32
33
  Drift_single_particle(part, length);
@@ -21,12 +21,13 @@
21
21
  ) {
22
22
 
23
23
  double weight = DriftSliceRBendData_get_weight(el);
24
-
25
- #ifndef XSUITE_BACKTRACK
26
- double const length = weight * DriftSliceRBendData_get__parent_length(el); // m
27
- #else
28
- double const length = -weight * DriftSliceRBendData_get__parent_length(el); // m
29
- #endif
24
+ double length;
25
+ if (LocalParticle_check_track_flag(part0, XS_FLAG_BACKTRACK)) {
26
+ length = -weight * DriftSliceRBendData_get__parent_length(el); // m
27
+ }
28
+ else {
29
+ length = weight * DriftSliceRBendData_get__parent_length(el); // m
30
+ }
30
31
 
31
32
  START_PER_PARTICLE_BLOCK(part0, part);
32
33
  Drift_single_particle(part, length);
@@ -21,12 +21,13 @@
21
21
  ) {
22
22
 
23
23
  double weight = DriftSliceSextupoleData_get_weight(el);
24
-
25
- #ifndef XSUITE_BACKTRACK
26
- double const length = weight * DriftSliceSextupoleData_get__parent_length(el); // m
27
- #else
28
- double const length = -weight * DriftSliceSextupoleData_get__parent_length(el); // m
29
- #endif
24
+ double length;
25
+ if (LocalParticle_check_track_flag(part0, XS_FLAG_BACKTRACK)) {
26
+ length = -weight * DriftSliceSextupoleData_get__parent_length(el); // m
27
+ }
28
+ else {
29
+ length = weight * DriftSliceSextupoleData_get__parent_length(el); // m
30
+ }
30
31
 
31
32
  START_PER_PARTICLE_BLOCK(part0, part);
32
33
  Drift_single_particle(part, length);
@@ -21,12 +21,13 @@
21
21
  ) {
22
22
 
23
23
  double weight = DriftSliceUniformSolenoidData_get_weight(el);
24
-
25
- #ifndef XSUITE_BACKTRACK
26
- double const length = weight * DriftSliceUniformSolenoidData_get__parent_length(el); // m
27
- #else
28
- double const length = -weight * DriftSliceUniformSolenoidData_get__parent_length(el); // m
29
- #endif
24
+ double length;
25
+ if (LocalParticle_check_track_flag(part0, XS_FLAG_BACKTRACK)) {
26
+ length = -weight * DriftSliceUniformSolenoidData_get__parent_length(el); // m
27
+ }
28
+ else {
29
+ length = weight * DriftSliceUniformSolenoidData_get__parent_length(el); // m
30
+ }
30
31
 
31
32
  START_PER_PARTICLE_BLOCK(part0, part);
32
33
  Drift_single_particle(part, length);
@@ -13,9 +13,9 @@ void Elens_track_local_particle(ElensData el, LocalParticle* part0){
13
13
 
14
14
  double elens_length = ElensData_get_elens_length(el);
15
15
 
16
- #ifdef XSUITE_BACKTRACK
16
+ if (LocalParticle_check_track_flag(part0, XS_FLAG_BACKTRACK)) {
17
17
  elens_length = -elens_length;
18
- #endif
18
+ }
19
19
 
20
20
  double const inner_radius = ElensData_get_inner_radius(el);
21
21
  double const outer_radius = ElensData_get_outer_radius(el);
@@ -25,11 +25,12 @@ void Exciter_track_local_particle(ExciterData el, LocalParticle* part0){
25
25
  double const frev = ExciterData_get_frev(el);
26
26
  int64_t const start_turn = ExciterData_get_start_turn(el);
27
27
 
28
- #ifdef XSUITE_BACKTRACK
29
- #define XTRACK_EXCITER_SIGN (-1)
30
- #else
31
- #define XTRACK_EXCITER_SIGN (+1)
32
- #endif
28
+ double excit_sign;
29
+ if (LocalParticle_check_track_flag(part0, XS_FLAG_BACKTRACK)) {
30
+ excit_sign = -1;
31
+ } else {
32
+ excit_sign = 1;
33
+ }
33
34
 
34
35
  START_PER_PARTICLE_BLOCK(part0, part);
35
36
  // zeta is the absolute path length deviation from the reference particle: zeta = (s - beta0*c*t)
@@ -60,8 +61,8 @@ void Exciter_track_local_particle(ExciterData el, LocalParticle* part0){
60
61
  factorial *= kk;
61
62
  }
62
63
 
63
- dpx += XTRACK_EXCITER_SIGN * (knl[kk] * zre - ksl[kk] * zim) / factorial;
64
- dpy += XTRACK_EXCITER_SIGN * (knl[kk] * zim + ksl[kk] * zre) / factorial;
64
+ dpx += excit_sign * (knl[kk] * zre - ksl[kk] * zim) / factorial;
65
+ dpy += excit_sign * (knl[kk] * zim + ksl[kk] * zre) / factorial;
65
66
 
66
67
  double const zret = zre * x - zim * y;
67
68
  zim = zim * x + zre * y;
@@ -24,10 +24,10 @@ void Solenoid_track_local_particle(SolenoidData el, LocalParticle* part0) {
24
24
  int64_t radiation_flag = SolenoidData_get_radiation_flag(el);
25
25
  double factor_knl_ksl = 1;
26
26
 
27
- #ifdef XSUITE_BACKTRACK
27
+ if (LocalParticle_check_track_flag(part0, XS_FLAG_BACKTRACK)) {
28
28
  length = -length;
29
29
  factor_knl_ksl = -1;
30
- #endif
30
+ }
31
31
 
32
32
  #ifndef XTRACK_SOLENOID_NO_SYNRAD
33
33
  double dp_record_entry = 0.;
@@ -27,11 +27,12 @@ void MagnetEdge_track_local_particle(MagnetEdgeData el, LocalParticle* part0)
27
27
  const double face_angle_feed_down = MagnetEdgeData_get_face_angle_feed_down(el);
28
28
  const double fringe_integral = MagnetEdgeData_get_fringe_integral(el);
29
29
 
30
- #ifdef XSUITE_BACKTRACK
31
- const double factor_for_backtrack = -1;
32
- #else
33
- const double factor_for_backtrack = 1;
34
- #endif
30
+ double factor_for_backtrack;
31
+ if (LocalParticle_check_track_flag(part0, XS_FLAG_BACKTRACK)) {
32
+ factor_for_backtrack = -1;
33
+ } else {
34
+ factor_for_backtrack = 1;
35
+ }
35
36
 
36
37
  track_magnet_edge_particles(
37
38
  part0,
@@ -24,10 +24,6 @@ void Misalignment_track_local_particle(MisalignmentData el, LocalParticle* part0
24
24
  const double tilt = MisalignmentData_get_tilt(el);
25
25
  const double is_exit = MisalignmentData_get_is_exit(el);
26
26
 
27
- #ifdef XSUITE_BACKTRACK
28
- voltage = -voltage;
29
- #endif
30
-
31
27
  if (!is_exit) {
32
28
  if (NONZERO(angle)) {
33
29
  track_misalignment_entry_curved(part0, dx, dy, ds, theta, phi, psi, anchor, length, angle, tilt);
@@ -15,9 +15,9 @@ void ReferenceEnergyIncrease_track_local_particle(ReferenceEnergyIncreaseData el
15
15
 
16
16
  double Delta_p0c = ReferenceEnergyIncreaseData_get_Delta_p0c(el);
17
17
 
18
- #ifdef XSUITE_BACKTRACK
18
+ if (LocalParticle_check_track_flag(part0, XS_FLAG_BACKTRACK)) {
19
19
  Delta_p0c = -Delta_p0c;
20
- #endif
20
+ }
21
21
 
22
22
  START_PER_PARTICLE_BLOCK(part0, part);
23
23
  LocalParticle_update_p0c(part, LocalParticle_get_p0c(part) + Delta_p0c);
@@ -17,11 +17,11 @@ void SimpleThinBend_track_local_particle(SimpleThinBendData el, LocalParticle* p
17
17
  double hxl = SimpleThinBendData_get_hxl(el);
18
18
  double length = SimpleThinBendData_get_length(el); // m
19
19
 
20
- #ifdef XSUITE_BACKTRACK
20
+ if (LocalParticle_check_track_flag(part0, XS_FLAG_BACKTRACK)) {
21
21
  knl0 = -knl0;
22
22
  hxl = -hxl;
23
23
  length = -length;
24
- #endif
24
+ }
25
25
 
26
26
  START_PER_PARTICLE_BLOCK(part0, part);
27
27
  double const chi = LocalParticle_get_chi(part);
@@ -14,9 +14,9 @@ void SimpleThinQuadrupole_track_local_particle(SimpleThinQuadrupoleData el, Loca
14
14
 
15
15
  double knl1 = SimpleThinQuadrupoleData_get_knl(el, 1);
16
16
 
17
- #ifdef XSUITE_BACKTRACK
17
+ if (LocalParticle_check_track_flag(part0, XS_FLAG_BACKTRACK)) {
18
18
  knl1 = -knl1;
19
- #endif
19
+ }
20
20
 
21
21
  START_PER_PARTICLE_BLOCK(part0, part);
22
22
  double const x = LocalParticle_get_x(part);
@@ -16,9 +16,9 @@ void SRotation_track_local_particle(SRotationData el, LocalParticle* part0){
16
16
  double sin_z = SRotationData_get_sin_z(el);
17
17
  double cos_z = SRotationData_get_cos_z(el);
18
18
 
19
- #ifdef XSUITE_BACKTRACK
19
+ if (LocalParticle_check_track_flag(part0, XS_FLAG_BACKTRACK)) {
20
20
  sin_z = -sin_z;
21
- #endif
21
+ }
22
22
 
23
23
  START_PER_PARTICLE_BLOCK(part0, part);
24
24
  SRotation_single_particle(part, sin_z, cos_z);
@@ -115,9 +115,9 @@ void legacy_solenoid_apply_radiation_single_particle(
115
115
 
116
116
  if ((spin_flag != 0) && (spin_x_0 != 0. || spin_y_0 != 0. || spin_z_0 != 0.)){
117
117
 
118
- #ifdef XSUITE_BACKTRACK
118
+ if (LocalParticle_check_track_flag(part, XS_FLAG_BACKTRACK)) {
119
119
  LocalParticle_set_state(part, -33);
120
- #else
120
+ } else {
121
121
  double const Bz_T = ks * brho0;
122
122
 
123
123
  double const kin_px_mean = (old_px + new_ax);
@@ -209,7 +209,7 @@ void legacy_solenoid_apply_radiation_single_particle(
209
209
  LocalParticle_set_spin_y(part, spin_y_3);
210
210
  LocalParticle_set_spin_z(part, spin_z_3);
211
211
  }
212
- #endif
212
+ }
213
213
  }
214
214
 
215
215
  // Synchrotron radiation
@@ -368,13 +368,15 @@ void track_magnet_particles(
368
368
  edge_exit_angle_fdown += rbend_half_angle;
369
369
  }
370
370
 
371
+ double core_length, core_length_curved,factor_knl_ksl_body,
372
+ factor_knl_ksl_edge,factor_backtrack_edge;
371
373
  // Backtracking
372
- #ifdef XSUITE_BACKTRACK
373
- const double core_length = -length * weight;
374
- const double core_length_curved = -length_curved * weight;
375
- double factor_knl_ksl_body = -factor_knl_ksl * weight;
376
- double factor_knl_ksl_edge = factor_knl_ksl; // Edge has a specific factor for backtracking
377
- const double factor_backtrack_edge = -1.;
374
+ if (LocalParticle_check_track_flag(part0, XS_FLAG_BACKTRACK)) {
375
+ core_length = -length * weight;
376
+ core_length_curved = -length_curved * weight;
377
+ factor_knl_ksl_body = -factor_knl_ksl * weight;
378
+ factor_knl_ksl_edge = factor_knl_ksl; // Edge has a specific factor for backtracking
379
+ factor_backtrack_edge = -1.;
378
380
  hxl = -hxl;
379
381
  VSWAP(edge_entry_active, edge_exit_active);
380
382
  VSWAP(edge_entry_model, edge_exit_model);
@@ -384,14 +386,14 @@ void track_magnet_particles(
384
386
  VSWAP(edge_entry_hgap, edge_exit_hgap);
385
387
  rbend_half_angle = -rbend_half_angle;
386
388
  sin_rbha = -sin_rbha;
387
-
388
- #else
389
- const double core_length = length * weight;
390
- const double core_length_curved = length_curved * weight;
391
- double factor_knl_ksl_body = factor_knl_ksl * weight;
392
- double factor_knl_ksl_edge = factor_knl_ksl;
393
- const double factor_backtrack_edge = 1.;
394
- #endif
389
+ }
390
+ else {
391
+ core_length = length * weight;
392
+ core_length_curved = length_curved * weight;
393
+ factor_knl_ksl_body = factor_knl_ksl * weight;
394
+ factor_knl_ksl_edge = factor_knl_ksl;
395
+ factor_backtrack_edge = 1.;
396
+ }
395
397
 
396
398
  #ifndef XTRACK_MULTIPOLE_NO_SYNRAD
397
399
  if (radiation_flag == 10){ // from parent
@@ -287,13 +287,15 @@ void track_magnet_particles(
287
287
  edge_exit_angle_fdown += rbend_half_angle;
288
288
  }
289
289
 
290
+ double core_length, core_length_curved,factor_knl_ksl_body,
291
+ factor_knl_ksl_edge,factor_backtrack_edge;
290
292
  // Backtracking
291
- #ifdef XSUITE_BACKTRACK
292
- const double core_length = -length * weight;
293
- const double core_length_curved = -length_curved * weight;
294
- double factor_knl_ksl_body = -factor_knl_ksl * weight;
295
- double factor_knl_ksl_edge = factor_knl_ksl; // Edge has a specific factor for backtracking
296
- const double factor_backtrack_edge = -1.;
293
+ if (LocalParticle_check_track_flag(part0, XS_FLAG_BACKTRACK)) {
294
+ core_length = -length * weight;
295
+ core_length_curved = -length_curved * weight;
296
+ factor_knl_ksl_body = -factor_knl_ksl * weight;
297
+ factor_knl_ksl_edge = factor_knl_ksl; // Edge has a specific factor for backtracking
298
+ factor_backtrack_edge = -1.;
297
299
  hxl = -hxl;
298
300
  VSWAP(edge_entry_active, edge_exit_active);
299
301
  VSWAP(edge_entry_model, edge_exit_model);
@@ -303,14 +305,14 @@ void track_magnet_particles(
303
305
  VSWAP(edge_entry_hgap, edge_exit_hgap);
304
306
  rbend_half_angle = -rbend_half_angle;
305
307
  sin_rbha = -sin_rbha;
306
-
307
- #else
308
- const double core_length = length * weight;
309
- const double core_length_curved = length_curved * weight;
310
- double factor_knl_ksl_body = factor_knl_ksl * weight;
311
- double factor_knl_ksl_edge = factor_knl_ksl;
312
- const double factor_backtrack_edge = 1.;
313
- #endif
308
+ }
309
+ else {
310
+ core_length = length * weight;
311
+ core_length_curved = length_curved * weight;
312
+ factor_knl_ksl_body = factor_knl_ksl * weight;
313
+ factor_knl_ksl_edge = factor_knl_ksl;
314
+ factor_backtrack_edge = 1.;
315
+ }
314
316
 
315
317
  #ifndef XTRACK_MULTIPOLE_NO_SYNRAD
316
318
  if (radiation_flag == 10){ // from parent
@@ -110,9 +110,9 @@ void magnet_spin(
110
110
 
111
111
  if (spin_x_0 != 0. || spin_y_0 != 0. || spin_z_0 != 0.){
112
112
 
113
- #ifdef XSUITE_BACKTRACK
113
+ if (LocalParticle_check_track_flag(part, XS_FLAG_BACKTRACK)) {
114
114
  LocalParticle_set_state(part, -33);
115
- #else
115
+ } else {
116
116
 
117
117
  double const ptau = LocalParticle_get_ptau(part);
118
118
  double const delta = LocalParticle_get_delta(part);
@@ -220,7 +220,7 @@ void magnet_spin(
220
220
  LocalParticle_set_spin_y(part, spin_y_3);
221
221
  LocalParticle_set_spin_z(part, spin_z_3);
222
222
  }
223
- #endif
223
+ }
224
224
  }
225
225
  }
226
226