xtrack 0.98.2__tar.gz → 0.98.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (372) hide show
  1. {xtrack-0.98.2/xtrack.egg-info → xtrack-0.98.4}/PKG-INFO +1 -1
  2. {xtrack-0.98.2 → xtrack-0.98.4}/tests/test_environment.py +147 -0
  3. {xtrack-0.98.2 → xtrack-0.98.4}/tests/test_mad_writer.py +21 -0
  4. {xtrack-0.98.2 → xtrack-0.98.4}/tests/test_twiss.py +8 -8
  5. xtrack-0.98.4/xtrack/_version.py +1 -0
  6. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/builder.py +9 -0
  7. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/environment.py +0 -1
  8. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/line.py +7 -7
  9. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/mad_writer.py +2 -1
  10. {xtrack-0.98.2 → xtrack-0.98.4/xtrack.egg-info}/PKG-INFO +1 -1
  11. xtrack-0.98.2/xtrack/_version.py +0 -1
  12. {xtrack-0.98.2 → xtrack-0.98.4}/LICENSE +0 -0
  13. {xtrack-0.98.2 → xtrack-0.98.4}/MANIFEST.in +0 -0
  14. {xtrack-0.98.2 → xtrack-0.98.4}/README.md +0 -0
  15. {xtrack-0.98.2 → xtrack-0.98.4}/ducktrack/__init__.py +0 -0
  16. {xtrack-0.98.2 → xtrack-0.98.4}/ducktrack/base_classes.py +0 -0
  17. {xtrack-0.98.2 → xtrack-0.98.4}/ducktrack/be_beamfields/BB6D.py +0 -0
  18. {xtrack-0.98.2 → xtrack-0.98.4}/ducktrack/be_beamfields/BB6Ddata.py +0 -0
  19. {xtrack-0.98.2 → xtrack-0.98.4}/ducktrack/be_beamfields/__init__.py +0 -0
  20. {xtrack-0.98.2 → xtrack-0.98.4}/ducktrack/be_beamfields/beambeam.py +0 -0
  21. {xtrack-0.98.2 → xtrack-0.98.4}/ducktrack/be_beamfields/boost.py +0 -0
  22. {xtrack-0.98.2 → xtrack-0.98.4}/ducktrack/be_beamfields/gaussian_fields.py +0 -0
  23. {xtrack-0.98.2 → xtrack-0.98.4}/ducktrack/be_beamfields/propagate_sigma_matrix.py +0 -0
  24. {xtrack-0.98.2 → xtrack-0.98.4}/ducktrack/be_beamfields/qgauss.py +0 -0
  25. {xtrack-0.98.2 → xtrack-0.98.4}/ducktrack/be_beamfields/slicing.py +0 -0
  26. {xtrack-0.98.2 → xtrack-0.98.4}/ducktrack/be_beamfields/spacecharge.py +0 -0
  27. {xtrack-0.98.2 → xtrack-0.98.4}/ducktrack/elements.py +0 -0
  28. {xtrack-0.98.2 → xtrack-0.98.4}/ducktrack/line.py +0 -0
  29. {xtrack-0.98.2 → xtrack-0.98.4}/ducktrack/mathlibs.py +0 -0
  30. {xtrack-0.98.2 → xtrack-0.98.4}/ducktrack/particles.py +0 -0
  31. {xtrack-0.98.2 → xtrack-0.98.4}/ducktrack/temp_pyparticles.py +0 -0
  32. {xtrack-0.98.2 → xtrack-0.98.4}/pyproject.toml +0 -0
  33. {xtrack-0.98.2 → xtrack-0.98.4}/setup.cfg +0 -0
  34. {xtrack-0.98.2 → xtrack-0.98.4}/setup.py +0 -0
  35. {xtrack-0.98.2 → xtrack-0.98.4}/tests/test_acceleration.py +0 -0
  36. {xtrack-0.98.2 → xtrack-0.98.4}/tests/test_acdipole.py +0 -0
  37. {xtrack-0.98.2 → xtrack-0.98.4}/tests/test_acdipole_twiss.py +0 -0
  38. {xtrack-0.98.2 → xtrack-0.98.4}/tests/test_amplitude_detuning.py +0 -0
  39. {xtrack-0.98.2 → xtrack-0.98.4}/tests/test_aperture_polygon.py +0 -0
  40. {xtrack-0.98.2 → xtrack-0.98.4}/tests/test_aperture_table.py +0 -0
  41. {xtrack-0.98.2 → xtrack-0.98.4}/tests/test_aperture_turn_ele_and_monitor.py +0 -0
  42. {xtrack-0.98.2 → xtrack-0.98.4}/tests/test_apertures.py +0 -0
  43. {xtrack-0.98.2 → xtrack-0.98.4}/tests/test_attr_replicas_and_slices.py +0 -0
  44. {xtrack-0.98.2 → xtrack-0.98.4}/tests/test_boris_spatial.py +0 -0
  45. {xtrack-0.98.2 → xtrack-0.98.4}/tests/test_bucket_with_ref_energy_change.py +0 -0
  46. {xtrack-0.98.2 → xtrack-0.98.4}/tests/test_cavity_absolute_time.py +0 -0
  47. {xtrack-0.98.2 → xtrack-0.98.4}/tests/test_chromatic_functions_vs_madx.py +0 -0
  48. {xtrack-0.98.2 → xtrack-0.98.4}/tests/test_coasting.py +0 -0
  49. {xtrack-0.98.2 → xtrack-0.98.4}/tests/test_collective_tracker.py +0 -0
  50. {xtrack-0.98.2 → xtrack-0.98.4}/tests/test_collimation.py +0 -0
  51. {xtrack-0.98.2 → xtrack-0.98.4}/tests/test_coupling_edwards_teng.py +0 -0
  52. {xtrack-0.98.2 → xtrack-0.98.4}/tests/test_electron_cooler.py +0 -0
  53. {xtrack-0.98.2 → xtrack-0.98.4}/tests/test_element_characterization_functions.py +0 -0
  54. {xtrack-0.98.2 → xtrack-0.98.4}/tests/test_element_internal_record.py +0 -0
  55. {xtrack-0.98.2 → xtrack-0.98.4}/tests/test_elements.py +0 -0
  56. {xtrack-0.98.2 → xtrack-0.98.4}/tests/test_elements_classflags.py +0 -0
  57. {xtrack-0.98.2 → xtrack-0.98.4}/tests/test_elements_thick.py +0 -0
  58. {xtrack-0.98.2 → xtrack-0.98.4}/tests/test_fcc_ee_solenoid_correction.py +0 -0
  59. {xtrack-0.98.2 → xtrack-0.98.4}/tests/test_fcc_ee_solenoid_correction_new_optimize_api.py +0 -0
  60. {xtrack-0.98.2 → xtrack-0.98.4}/tests/test_footprint.py +0 -0
  61. {xtrack-0.98.2 → xtrack-0.98.4}/tests/test_freeze_longitudinal.py +0 -0
  62. {xtrack-0.98.2 → xtrack-0.98.4}/tests/test_full_rings.py +0 -0
  63. {xtrack-0.98.2 → xtrack-0.98.4}/tests/test_h6_sps_beamline.py +0 -0
  64. {xtrack-0.98.2 → xtrack-0.98.4}/tests/test_hvkick.py +0 -0
  65. {xtrack-0.98.2 → xtrack-0.98.4}/tests/test_ions.py +0 -0
  66. {xtrack-0.98.2 → xtrack-0.98.4}/tests/test_json.py +0 -0
  67. {xtrack-0.98.2 → xtrack-0.98.4}/tests/test_lhc_env.py +0 -0
  68. {xtrack-0.98.2 → xtrack-0.98.4}/tests/test_lhc_match_phase_15.py +0 -0
  69. {xtrack-0.98.2 → xtrack-0.98.4}/tests/test_line.py +0 -0
  70. {xtrack-0.98.2 → xtrack-0.98.4}/tests/test_load.py +0 -0
  71. {xtrack-0.98.2 → xtrack-0.98.4}/tests/test_load_vars.py +0 -0
  72. {xtrack-0.98.2 → xtrack-0.98.4}/tests/test_lumi.py +0 -0
  73. {xtrack-0.98.2 → xtrack-0.98.4}/tests/test_madloader.py +0 -0
  74. {xtrack-0.98.2 → xtrack-0.98.4}/tests/test_madnginterface.py +0 -0
  75. {xtrack-0.98.2 → xtrack-0.98.4}/tests/test_magnet.py +0 -0
  76. {xtrack-0.98.2 → xtrack-0.98.4}/tests/test_match_and_track_from_element.py +0 -0
  77. {xtrack-0.98.2 → xtrack-0.98.4}/tests/test_match_coupling_knob.py +0 -0
  78. {xtrack-0.98.2 → xtrack-0.98.4}/tests/test_match_nested.py +0 -0
  79. {xtrack-0.98.2 → xtrack-0.98.4}/tests/test_match_optics_and_ip_knob.py +0 -0
  80. {xtrack-0.98.2 → xtrack-0.98.4}/tests/test_match_optics_and_ip_knob_new_optimize_api.py +0 -0
  81. {xtrack-0.98.2 → xtrack-0.98.4}/tests/test_match_orbit_bump.py +0 -0
  82. {xtrack-0.98.2 → xtrack-0.98.4}/tests/test_match_tune_chroma_cminus.py +0 -0
  83. {xtrack-0.98.2 → xtrack-0.98.4}/tests/test_misalign.py +0 -0
  84. {xtrack-0.98.2 → xtrack-0.98.4}/tests/test_monitor.py +0 -0
  85. {xtrack-0.98.2 → xtrack-0.98.4}/tests/test_multi_bunch_gauss.py +0 -0
  86. {xtrack-0.98.2 → xtrack-0.98.4}/tests/test_multiline.py +0 -0
  87. {xtrack-0.98.2 → xtrack-0.98.4}/tests/test_multisetter.py +0 -0
  88. {xtrack-0.98.2 → xtrack-0.98.4}/tests/test_multispecies.py +0 -0
  89. {xtrack-0.98.2 → xtrack-0.98.4}/tests/test_native_madloader.py +0 -0
  90. {xtrack-0.98.2 → xtrack-0.98.4}/tests/test_native_madloader_lhc.py +0 -0
  91. {xtrack-0.98.2 → xtrack-0.98.4}/tests/test_native_madloader_lhc_thin.py +0 -0
  92. {xtrack-0.98.2 → xtrack-0.98.4}/tests/test_native_madloader_ps.py +0 -0
  93. {xtrack-0.98.2 → xtrack-0.98.4}/tests/test_native_madloader_sps.py +0 -0
  94. {xtrack-0.98.2 → xtrack-0.98.4}/tests/test_native_madloader_ti2.py +0 -0
  95. {xtrack-0.98.2 → xtrack-0.98.4}/tests/test_optimize_for_tracking.py +0 -0
  96. {xtrack-0.98.2 → xtrack-0.98.4}/tests/test_particles.py +0 -0
  97. {xtrack-0.98.2 → xtrack-0.98.4}/tests/test_particles_basics.py +0 -0
  98. {xtrack-0.98.2 → xtrack-0.98.4}/tests/test_particles_pdg.py +0 -0
  99. {xtrack-0.98.2 → xtrack-0.98.4}/tests/test_pipeline.py +0 -0
  100. {xtrack-0.98.2 → xtrack-0.98.4}/tests/test_prebuild_kernels.py +0 -0
  101. {xtrack-0.98.2 → xtrack-0.98.4}/tests/test_ps_against_ptc.py +0 -0
  102. {xtrack-0.98.2 → xtrack-0.98.4}/tests/test_ps_multiturn_twiss.py +0 -0
  103. {xtrack-0.98.2 → xtrack-0.98.4}/tests/test_psb_chicane.py +0 -0
  104. {xtrack-0.98.2 → xtrack-0.98.4}/tests/test_pyht_interface.py +0 -0
  105. {xtrack-0.98.2 → xtrack-0.98.4}/tests/test_quadrupole_fringe_ptc.py +0 -0
  106. {xtrack-0.98.2 → xtrack-0.98.4}/tests/test_quadrupole_wedge.py +0 -0
  107. {xtrack-0.98.2 → xtrack-0.98.4}/tests/test_radial_steering.py +0 -0
  108. {xtrack-0.98.2 → xtrack-0.98.4}/tests/test_radiation.py +0 -0
  109. {xtrack-0.98.2 → xtrack-0.98.4}/tests/test_radiation_equilibrium_emittances.py +0 -0
  110. {xtrack-0.98.2 → xtrack-0.98.4}/tests/test_radiation_equilibrium_emittances_thick.py +0 -0
  111. {xtrack-0.98.2 → xtrack-0.98.4}/tests/test_radiation_integrals.py +0 -0
  112. {xtrack-0.98.2 → xtrack-0.98.4}/tests/test_random_gen.py +0 -0
  113. {xtrack-0.98.2 → xtrack-0.98.4}/tests/test_random_gen_exp.py +0 -0
  114. {xtrack-0.98.2 → xtrack-0.98.4}/tests/test_random_gen_gauss.py +0 -0
  115. {xtrack-0.98.2 → xtrack-0.98.4}/tests/test_random_gen_ruth.py +0 -0
  116. {xtrack-0.98.2 → xtrack-0.98.4}/tests/test_rbend_straight_body.py +0 -0
  117. {xtrack-0.98.2 → xtrack-0.98.4}/tests/test_rf_track.py +0 -0
  118. {xtrack-0.98.2 → xtrack-0.98.4}/tests/test_rotation_signs.py +0 -0
  119. {xtrack-0.98.2 → xtrack-0.98.4}/tests/test_second_order_taylor_map.py +0 -0
  120. {xtrack-0.98.2 → xtrack-0.98.4}/tests/test_seeds.py +0 -0
  121. {xtrack-0.98.2 → xtrack-0.98.4}/tests/test_slice_and_insert_with_replicas.py +0 -0
  122. {xtrack-0.98.2 → xtrack-0.98.4}/tests/test_slice_elements.py +0 -0
  123. {xtrack-0.98.2 → xtrack-0.98.4}/tests/test_slicing.py +0 -0
  124. {xtrack-0.98.2 → xtrack-0.98.4}/tests/test_solenoid_bz_map_vs_boris.py +0 -0
  125. {xtrack-0.98.2 → xtrack-0.98.4}/tests/test_solenoid_bz_map_vs_boris_legacy.py +0 -0
  126. {xtrack-0.98.2 → xtrack-0.98.4}/tests/test_spacecharge_in_ring.py +0 -0
  127. {xtrack-0.98.2 → xtrack-0.98.4}/tests/test_spin.py +0 -0
  128. {xtrack-0.98.2 → xtrack-0.98.4}/tests/test_sps_thick_cpymad_loader.py +0 -0
  129. {xtrack-0.98.2 → xtrack-0.98.4}/tests/test_sps_thick_native_loader.py +0 -0
  130. {xtrack-0.98.2 → xtrack-0.98.4}/tests/test_survey.py +0 -0
  131. {xtrack-0.98.2 → xtrack-0.98.4}/tests/test_tapering.py +0 -0
  132. {xtrack-0.98.2 → xtrack-0.98.4}/tests/test_thick_kickers_rf_crab.py +0 -0
  133. {xtrack-0.98.2 → xtrack-0.98.4}/tests/test_thick_lhc.py +0 -0
  134. {xtrack-0.98.2 → xtrack-0.98.4}/tests/test_tilt_shifts.py +0 -0
  135. {xtrack-0.98.2 → xtrack-0.98.4}/tests/test_tracker.py +0 -0
  136. {xtrack-0.98.2 → xtrack-0.98.4}/tests/test_trajectory_correcton.py +0 -0
  137. {xtrack-0.98.2 → xtrack-0.98.4}/tests/test_twiss_to_file.py +0 -0
  138. {xtrack-0.98.2 → xtrack-0.98.4}/tests/test_twiss_vs_madx_psb.py +0 -0
  139. {xtrack-0.98.2 → xtrack-0.98.4}/tests/test_vs_madx.py +0 -0
  140. {xtrack-0.98.2 → xtrack-0.98.4}/tests/test_xmask_orbit_correction.py +0 -0
  141. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/__init__.py +0 -0
  142. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/_temp/__init__.py +0 -0
  143. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/_temp/boris_and_solenoid_map/__init__.py +0 -0
  144. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/_temp/boris_and_solenoid_map/boris.h +0 -0
  145. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/_temp/boris_and_solenoid_map/solenoid_field.py +0 -0
  146. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/_temp/lhc_match/__init__.py +0 -0
  147. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/_temp/lhc_match/gen_madx_optics_file.py +0 -0
  148. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/_temp/lhc_match/lhc_match.py +0 -0
  149. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/_temp/lhc_match/var_limits.py +0 -0
  150. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/_temp/python_lattice_writer/__init__.py +0 -0
  151. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/_temp/python_lattice_writer/lattice_py_generation.py +0 -0
  152. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/aperture_meas.py +0 -0
  153. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/base_element.py +0 -0
  154. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/__init__.py +0 -0
  155. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/acdipole.py +0 -0
  156. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/apertures.py +0 -0
  157. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/apertures_src/limitellipse.h +0 -0
  158. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/apertures_src/limitpolygon.h +0 -0
  159. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/apertures_src/limitracetrack.h +0 -0
  160. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/apertures_src/limitrect.h +0 -0
  161. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/apertures_src/limitrectellipse.h +0 -0
  162. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/apertures_src/longitudinallimitrect.h +0 -0
  163. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/beam_interaction.py +0 -0
  164. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/elements.py +0 -0
  165. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/elements_src/_generate_slice_elements_c_code.py +0 -0
  166. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/elements_src/_include_integrator.py +0 -0
  167. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/elements_src/acdipole.h +0 -0
  168. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/elements_src/bend.h +0 -0
  169. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/elements_src/cavity.h +0 -0
  170. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/elements_src/crab_cavity.h +0 -0
  171. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/elements_src/default_magnet_config.h +0 -0
  172. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/elements_src/dipole_fringe.h +0 -0
  173. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/elements_src/dipoleedge.h +0 -0
  174. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/elements_src/drift.h +0 -0
  175. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/elements_src/drift_exact.h +0 -0
  176. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/elements_src/drift_exact_slice.h +0 -0
  177. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/elements_src/drift_slice.h +0 -0
  178. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/elements_src/drift_slice_bend.h +0 -0
  179. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/elements_src/drift_slice_cavity.h +0 -0
  180. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/elements_src/drift_slice_crab_cavity.h +0 -0
  181. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/elements_src/drift_slice_multipole.h +0 -0
  182. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/elements_src/drift_slice_octupole.h +0 -0
  183. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/elements_src/drift_slice_quadrupole.h +0 -0
  184. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/elements_src/drift_slice_rbend.h +0 -0
  185. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/elements_src/drift_slice_sextupole.h +0 -0
  186. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/elements_src/drift_slice_uniform_solenoid.h +0 -0
  187. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/elements_src/electroncooler.h +0 -0
  188. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/elements_src/elens.h +0 -0
  189. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/elements_src/exciter.h +0 -0
  190. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/elements_src/firstordertaylormap.h +0 -0
  191. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/elements_src/legacy_solenoid.h +0 -0
  192. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/elements_src/linesegmentmap.h +0 -0
  193. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/elements_src/magnet.h +0 -0
  194. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/elements_src/magnet_drift.h +0 -0
  195. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/elements_src/magnet_edge.h +0 -0
  196. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/elements_src/magnet_kick.h +0 -0
  197. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/elements_src/marker.h +0 -0
  198. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/elements_src/misalignment.h +0 -0
  199. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/elements_src/multipole.h +0 -0
  200. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/elements_src/multipoleedge.h +0 -0
  201. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/elements_src/nonlinearlens.h +0 -0
  202. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/elements_src/octupole.h +0 -0
  203. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/elements_src/quadrupole.h +0 -0
  204. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/elements_src/rbend.h +0 -0
  205. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/elements_src/referenceenergyincrease.h +0 -0
  206. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/elements_src/rfmultipole.h +0 -0
  207. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/elements_src/second_order_taylor_map.h +0 -0
  208. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/elements_src/sextupole.h +0 -0
  209. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/elements_src/simplethinbend.h +0 -0
  210. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/elements_src/simplethinquadrupole.h +0 -0
  211. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/elements_src/slnd.h +0 -0
  212. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/elements_src/srotation.h +0 -0
  213. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/elements_src/temprf.h +0 -0
  214. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/elements_src/thick_slice_bend.h +0 -0
  215. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/elements_src/thick_slice_cavity.h +0 -0
  216. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/elements_src/thick_slice_crab_cavity.h +0 -0
  217. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/elements_src/thick_slice_multipole.h +0 -0
  218. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/elements_src/thick_slice_octupole.h +0 -0
  219. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/elements_src/thick_slice_quadrupole.h +0 -0
  220. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/elements_src/thick_slice_rbend.h +0 -0
  221. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/elements_src/thick_slice_sextupole.h +0 -0
  222. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/elements_src/thick_slice_uniform_solenoid.h +0 -0
  223. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/elements_src/thin_slice_bend.h +0 -0
  224. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/elements_src/thin_slice_bend_entry.h +0 -0
  225. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/elements_src/thin_slice_bend_exit.h +0 -0
  226. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/elements_src/thin_slice_cavity.h +0 -0
  227. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/elements_src/thin_slice_crab_cavity.h +0 -0
  228. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/elements_src/thin_slice_multipole.h +0 -0
  229. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/elements_src/thin_slice_octupole.h +0 -0
  230. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/elements_src/thin_slice_octupole_entry.h +0 -0
  231. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/elements_src/thin_slice_octupole_exit.h +0 -0
  232. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/elements_src/thin_slice_quadrupole.h +0 -0
  233. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/elements_src/thin_slice_quadrupole_entry.h +0 -0
  234. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/elements_src/thin_slice_quadrupole_exit.h +0 -0
  235. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/elements_src/thin_slice_rbend.h +0 -0
  236. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/elements_src/thin_slice_rbend_entry.h +0 -0
  237. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/elements_src/thin_slice_rbend_exit.h +0 -0
  238. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/elements_src/thin_slice_sextupole.h +0 -0
  239. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/elements_src/thin_slice_sextupole_entry.h +0 -0
  240. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/elements_src/thin_slice_sextupole_exit.h +0 -0
  241. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/elements_src/thin_slice_uniform_solenoid_entry.h +0 -0
  242. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/elements_src/thin_slice_uniform_solenoid_exit.h +0 -0
  243. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/elements_src/track_acdipole.h +0 -0
  244. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/elements_src/track_dipole_edge_linear.h +0 -0
  245. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/elements_src/track_dipole_edge_nonlinear.h +0 -0
  246. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/elements_src/track_dipole_fringe.h +0 -0
  247. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/elements_src/track_drift.h +0 -0
  248. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/elements_src/track_legacy_solenoid.h +0 -0
  249. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/elements_src/track_legacy_solenoid_multipolar_components.h +0 -0
  250. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/elements_src/track_legacy_solenoid_radiation.h +0 -0
  251. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/elements_src/track_magnet.h +0 -0
  252. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/elements_src/track_magnet.template.h +0 -0
  253. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/elements_src/track_magnet_configure.h +0 -0
  254. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/elements_src/track_magnet_drift.h +0 -0
  255. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/elements_src/track_magnet_edge.h +0 -0
  256. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/elements_src/track_magnet_kick.h +0 -0
  257. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/elements_src/track_magnet_radiation.h +0 -0
  258. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/elements_src/track_misalignments.h +0 -0
  259. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/elements_src/track_mult_fringe.h +0 -0
  260. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/elements_src/track_rf.h +0 -0
  261. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/elements_src/track_rf.template.h +0 -0
  262. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/elements_src/track_srotation.h +0 -0
  263. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/elements_src/track_thick_bend.h +0 -0
  264. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/elements_src/track_thick_cfd.h +0 -0
  265. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/elements_src/track_wedge.h +0 -0
  266. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/elements_src/track_xrotation.h +0 -0
  267. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/elements_src/track_xyshift.h +0 -0
  268. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/elements_src/track_yrotation.h +0 -0
  269. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/elements_src/variable_solenoid.h +0 -0
  270. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/elements_src/wedge.h +0 -0
  271. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/elements_src/wire.h +0 -0
  272. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/elements_src/xrotation.h +0 -0
  273. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/elements_src/xyshift.h +0 -0
  274. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/elements_src/yrotation.h +0 -0
  275. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/elements_src/zetashift.h +0 -0
  276. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/exciter.py +0 -0
  277. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/rft_element.py +0 -0
  278. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/slice_base.py +0 -0
  279. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/slice_elements_drift.py +0 -0
  280. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/slice_elements_edge.py +0 -0
  281. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/slice_elements_thick.py +0 -0
  282. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/beam_elements/slice_elements_thin.py +0 -0
  283. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/boris.py +0 -0
  284. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/footprint.py +0 -0
  285. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/functions.py +0 -0
  286. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/general.py +0 -0
  287. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/headers/atomicadd.h +0 -0
  288. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/headers/checks.h +0 -0
  289. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/headers/constants.h +0 -0
  290. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/headers/particle_states.h +0 -0
  291. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/headers/synrad_spectrum.h +0 -0
  292. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/headers/track.h +0 -0
  293. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/headers/track_local_particle_with_transformations.h +0 -0
  294. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/internal_record.py +0 -0
  295. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/json.py +0 -0
  296. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/linear_normal_form.py +0 -0
  297. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/load.py +0 -0
  298. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/loss_location_refinement/__init__.py +0 -0
  299. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/loss_location_refinement/loss_location_refinement.py +0 -0
  300. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/lumi.py +0 -0
  301. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/mad_loader.py +0 -0
  302. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/mad_parser/__init__.py +0 -0
  303. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/mad_parser/loader.py +0 -0
  304. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/mad_parser/madx.lark +0 -0
  305. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/mad_parser/parse.py +0 -0
  306. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/madng_interface.py +0 -0
  307. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/match.py +0 -0
  308. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/monitors/__init__.py +0 -0
  309. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/monitors/beam_position_monitor.h +0 -0
  310. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/monitors/beam_position_monitor.py +0 -0
  311. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/monitors/beam_profile_monitor.h +0 -0
  312. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/monitors/beam_profile_monitor.py +0 -0
  313. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/monitors/beam_size_monitor.h +0 -0
  314. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/monitors/beam_size_monitor.py +0 -0
  315. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/monitors/last_turns_monitor.h +0 -0
  316. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/monitors/last_turns_monitor.py +0 -0
  317. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/monitors/particles_monitor.h +0 -0
  318. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/monitors/particles_monitor.py +0 -0
  319. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/multiline.py +0 -0
  320. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/multiline_legacy/__init__.py +0 -0
  321. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/multiline_legacy/multiline_legacy.py +0 -0
  322. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/multiline_legacy/shared_knobs.py +0 -0
  323. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/multisetter/__init__.py +0 -0
  324. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/multisetter/multisetter.h +0 -0
  325. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/multisetter/multisetter.py +0 -0
  326. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/particles/__init__.py +0 -0
  327. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/particles/constants.py +0 -0
  328. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/particles/local_particle_custom_api.h +0 -0
  329. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/particles/masses.py +0 -0
  330. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/particles/particles.py +0 -0
  331. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/particles/pdg.py +0 -0
  332. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/particles/rng_src/base_rng.h +0 -0
  333. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/particles/rng_src/particles_rng.h +0 -0
  334. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/pipeline/__init__.py +0 -0
  335. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/pipeline/core.py +0 -0
  336. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/pipeline/manager.py +0 -0
  337. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/pipeline/multitracker.py +0 -0
  338. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/prebuilt_kernel_definitions/__init__.py +0 -0
  339. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/prebuilt_kernel_definitions/element_inits.py +0 -0
  340. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/prebuilt_kernel_definitions/element_types.py +0 -0
  341. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/progress_indicator.py +0 -0
  342. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/random/__init__.py +0 -0
  343. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/random/random_generators.py +0 -0
  344. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/random/random_src/exponential.h +0 -0
  345. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/random/random_src/exponential_integral_Ei.h +0 -0
  346. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/random/random_src/normal.h +0 -0
  347. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/random/random_src/rutherford.h +0 -0
  348. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/random/random_src/uniform.h +0 -0
  349. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/random/random_src/uniform_accurate.h +0 -0
  350. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/slicing.py +0 -0
  351. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/survey.py +0 -0
  352. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/svgutils/__init__.py +0 -0
  353. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/svgutils/parser.py +0 -0
  354. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/svgutils/path.py +0 -0
  355. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/svgutils/svgutils.py +0 -0
  356. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/synctime.py +0 -0
  357. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/table.py +0 -0
  358. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/tapering.py +0 -0
  359. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/targets.py +0 -0
  360. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/track_flags.py +0 -0
  361. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/tracker.py +0 -0
  362. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/tracker_data.py +0 -0
  363. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/tracker_src/tracker.h +0 -0
  364. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/trajectory_correction.py +0 -0
  365. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/twiss.py +0 -0
  366. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/twissplot.py +0 -0
  367. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack/view.py +0 -0
  368. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack.egg-info/SOURCES.txt +0 -0
  369. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack.egg-info/dependency_links.txt +0 -0
  370. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack.egg-info/entry_points.txt +0 -0
  371. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack.egg-info/requires.txt +0 -0
  372. {xtrack-0.98.2 → xtrack-0.98.4}/xtrack.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: xtrack
3
- Version: 0.98.2
3
+ Version: 0.98.4
4
4
  Summary: Tracking library for particle accelerators
5
5
  Author: G. Iadarola et al.
6
6
  License-Expression: Apache-2.0
@@ -2003,6 +2003,50 @@ def test_copy_element_from_other_env():
2003
2003
  assert env2['quad/env2'].knl[0] == 0
2004
2004
  assert env2['quad/env2'].knl[1] == 8
2005
2005
 
2006
+ def test_import_line_matrix_attribute():
2007
+
2008
+ apert = xt.LongitudinalLimitRect(
2009
+ min_zeta = -1e-3,
2010
+ max_zeta = 1e-3,
2011
+ min_pzeta = -1e-3,
2012
+ max_pzeta = 1e-3)
2013
+ tmap = xt.FirstOrderTaylorMap(
2014
+ length=0,
2015
+ m0=[ 2.3e-3, 3.07e-04, 0, 0,
2016
+ -2.06e-5, 0],
2017
+ m1=[[ 1, -6.1e-5, 0,
2018
+ 0, 0, -2.3e-3],
2019
+ [ 5.2e-7, 9.9e-1, 0,
2020
+ 0, 0, 1.0e-7],
2021
+ [ 0, 0, 1,
2022
+ 2.0e-5, 0, 0],
2023
+ [ 0, 0, 0,
2024
+ 1, 0, 0],
2025
+ [-1.0e-7, -2.3e-3, 0,
2026
+ 0, 1, 4.1e-5],
2027
+ [ 0, 0, 0,
2028
+ 0, 0, 1]]
2029
+ )
2030
+ line = xt.Line(
2031
+ elements=[apert, tmap],
2032
+ element_names=['apert', 'taylor_map']
2033
+ )
2034
+
2035
+ line['a'] = 10
2036
+ line['taylor_map'].m1[2, 1]= 'a'
2037
+
2038
+ assert line['taylor_map'].m1[2, 1] == 10
2039
+ line['a'] = 15
2040
+ assert line['taylor_map'].m1[2, 1] == 15
2041
+
2042
+ env = xt.Environment()
2043
+ env.import_line(line, suffix_for_common_elements='', line_name='line_env')
2044
+ assert env['a'] == 15
2045
+ assert env['taylor_map'].m1[2, 1] == 15
2046
+
2047
+ env['a'] = 20
2048
+ assert env['taylor_map'].m1[2, 1] == 20
2049
+
2006
2050
 
2007
2051
  def test_insert_repeated_elements():
2008
2052
 
@@ -4192,3 +4236,106 @@ def test_rename_var():
4192
4236
  assert str(env.ref['cc']._expr) == "(2.0 * vars['aa'])"
4193
4237
  assert str(env.ref['mb'].angle._expr) == "(vars['cc'] * 0.001)"
4194
4238
  assert str(env.ref['mb'].knl[1]._expr) == "(3.0 * vars['cc'])"
4239
+
4240
+ def test_parametric_line_update():
4241
+
4242
+ env = xt.Environment()
4243
+ env.particle_ref = xt.Particles(kinetic_energy0=2.86e9, mass0 = xt.ELECTRON_MASS_EV)
4244
+
4245
+ env['l_cell'] = 5.00 # cell length is 5 m
4246
+ env['l_bend'] = 1.50 # length of bend (along arc using sector bends)
4247
+ env['l_quad'] = 0.40 # length of quads
4248
+ env['l_drift'] = '(l_cell - 2*l_bend - 2*l_quad)/4.' # remaining length for drifts
4249
+ print( f"Initial value of env['l_drift'] ={env['l_drift']:6.3f}" )
4250
+
4251
+ env['alfB'] = np.pi/20 # 20 cells each with two bends in 100 m ring
4252
+ env['kQf'] = 0.7
4253
+ env['kQd'] = -0.7
4254
+
4255
+ # Definition of elements and two ways to define a FODO cell
4256
+ env.new('drift', xt.Drift, length='l_drift')
4257
+ env.new('mb', xt.Bend, length='l_bend', angle='alfB', k0_from_h=True,
4258
+ edge_entry_angle='alfB/2', edge_exit_angle='alfB/2') # shoild be kind of RBend
4259
+
4260
+ env.new('mQf', xt.Quadrupole, length='l_quad', k1='kQf')
4261
+ env.new('mQd', xt.Quadrupole, length='l_quad', k1='kQd')
4262
+
4263
+ cell_line = env.new_line( components =[ # analogeous to MAD LINE
4264
+ env.place('mQf'), env.place('drift'), env.place('mb'), env.place('drift'),
4265
+ env.place('mQd'), env.place('drift'), env.place('mb'), env.place('drift'),
4266
+ ])
4267
+
4268
+ cell_sequ1 = env.new_line( length='l_cell', components =[ # analogeous to MAD Sequence
4269
+ env.place('mQf', at='0*l_drift + 0.5*l_quad + 0.0*l_bend'),
4270
+ env.place('mb', at='1*l_drift + 1.0*l_quad + 0.5*l_bend'),
4271
+ env.place('mQd', at='2*l_drift + 1.5*l_quad + 1.0*l_bend'),
4272
+ env.place('mb', at='3*l_drift + 2.0*l_quad + 1.5*l_bend'),
4273
+ ])
4274
+
4275
+ cell_sequ2 = env.new_line( length='l_cell', components =[ # analogeous to MAD Sequence
4276
+ env.place('mQf', at='0*(l_cell - 2*l_bend - 2*l_quad)/4. + 0.5*l_quad + 0.0*l_bend'),
4277
+ env.place('mb', at='1*(l_cell - 2*l_bend - 2*l_quad)/4. + 1.0*l_quad + 0.5*l_bend'),
4278
+ env.place('mQd', at='2*(l_cell - 2*l_bend - 2*l_quad)/4. + 1.5*l_quad + 1.0*l_bend'),
4279
+ env.place('mb', at='3*(l_cell - 2*l_bend - 2*l_quad)/4. + 2.0*l_quad + 1.5*l_bend'),
4280
+ ])
4281
+
4282
+ t_cell_line = cell_line.get_table()
4283
+ t_cell_sequ1 = cell_sequ1.get_table()
4284
+ t_cell_sequ2 = cell_sequ2.get_table()
4285
+ for tt in [t_cell_line, t_cell_sequ1, t_cell_sequ2]:
4286
+ xo.assert_allclose(tt.s, [0. , 0.4, 0.7, 2.2, 2.5, 2.9, 3.2, 4.7, 5. ],
4287
+ atol=1e-14)
4288
+
4289
+ env['l_quad'] = 0.30
4290
+ cell_sequ1.regenerate_from_composer()
4291
+ cell_sequ2.regenerate_from_composer()
4292
+ t_cell_line = cell_line.get_table()
4293
+ t_cell_sequ1 = cell_sequ1.get_table()
4294
+ t_cell_sequ2 = cell_sequ2.get_table()
4295
+ for tt in [t_cell_line, t_cell_sequ1, t_cell_sequ2]:
4296
+ xo.assert_allclose(tt.s, [0. , 0.3 , 0.65, 2.15, 2.5 , 2.8 , 3.15, 4.65, 5.],
4297
+ atol=1e-14)
4298
+
4299
+ # back to original
4300
+ env['l_quad'] = 0.40
4301
+ cell_sequ1.regenerate_from_composer()
4302
+ cell_sequ2.regenerate_from_composer()
4303
+ t_cell_line = cell_line.get_table()
4304
+ t_cell_sequ1 = cell_sequ1.get_table()
4305
+ t_cell_sequ2 = cell_sequ2.get_table()
4306
+ for tt in [t_cell_line, t_cell_sequ1, t_cell_sequ2]:
4307
+ xo.assert_allclose(tt.s, [0. , 0.4, 0.7, 2.2, 2.5, 2.9, 3.2, 4.7, 5. ],
4308
+ atol=1e-14)
4309
+
4310
+ # increased cell length
4311
+ env['l_cell'] = 5.50
4312
+ cell_sequ1.regenerate_from_composer()
4313
+ cell_sequ2.regenerate_from_composer()
4314
+ t_cell_line = cell_line.get_table()
4315
+ t_cell_sequ1 = cell_sequ1.get_table()
4316
+ t_cell_sequ2 = cell_sequ2.get_table()
4317
+ for tt in [t_cell_line, t_cell_sequ1, t_cell_sequ2]:
4318
+ xo.assert_allclose(tt.s,
4319
+ [0. , 0.4 , 0.825, 2.325, 2.75 , 3.15 , 3.575, 5.075, 5.5 ],
4320
+ atol=1e-14)
4321
+
4322
+ def test_str_in_composer_to_dict_from_dict():
4323
+ env = xt.Environment()
4324
+
4325
+ line = env.new_line(components=[
4326
+ env.new('q1', 'Quadrupole', length=1.0, at=2),
4327
+ 'q1',
4328
+ 'q1']
4329
+ )
4330
+ assert isinstance(line.composer.components[0], xt.Place)
4331
+ assert line.composer.components[0].name == 'q1'
4332
+ assert line.composer.components[0].at == 2
4333
+ assert line.composer.components[1] == 'q1'
4334
+ assert line.composer.components[2] == 'q1'
4335
+
4336
+ line2 = xt.Line.from_dict(line.to_dict())
4337
+ assert isinstance(line2.composer.components[0], xt.Place)
4338
+ assert line2.composer.components[0].name == 'q1'
4339
+ assert line2.composer.components[0].at == 2
4340
+ assert line2.composer.components[1] == 'q1'
4341
+ assert line2.composer.components[2] == 'q1'
@@ -69,3 +69,24 @@ def test_mad_writer(case):
69
69
 
70
70
  xo.assert_allclose(tw2.qs, tw.qs, rtol=1e-4, atol=0)
71
71
  xo.assert_allclose(tw2.ddqx, tw.ddqx, rtol=1e-3, atol=0)
72
+
73
+ def test_mad_writer_bend():
74
+ env = xt.Environment()
75
+ line = env.new_line(components=[
76
+ env.new('b0', 'Bend', length=1.0, angle=0.1,),
77
+ env.new('b1', 'Bend', length=1.0, angle=0.1, k0=0.01),
78
+ env.new('b2', 'RBend', length_straight=1.0, angle=0.1,),
79
+ env.new('b3', 'RBend', length_straight=1.0, angle=0.1, k0=0.01),
80
+ ])
81
+
82
+ mad_src = line.to_madx_sequence('seq')
83
+
84
+ env2 = xt.load(string=mad_src, format='madx')
85
+ line2 = env2.lines['seq']
86
+
87
+ for nn in ['b0', 'b1', 'b2', 'b3']:
88
+ el1 = line[nn]
89
+ el2 = line2[nn]
90
+ assert el1.length == el2.length
91
+ assert el1.angle == el2.angle
92
+ assert el1.k0 == el2.k0
@@ -675,10 +675,10 @@ def test_twiss_range(test_context, cycle_to, line_name, check, init_at_edge, col
675
675
 
676
676
  line = collider[line_name]
677
677
 
678
- if isinstance(test_context, xo.ContextCpu) and (
678
+ if isinstance(test_context, xo.ContextCpu) and line._context is not None and (
679
679
  test_context.omp_num_threads != line._context.omp_num_threads):
680
680
  buffer = test_context.new_buffer()
681
- elif isinstance(test_context, line._context.__class__):
681
+ elif line._context is not None and isinstance(test_context, line._context.__class__):
682
682
  buffer = line._buffer
683
683
  else:
684
684
  buffer = test_context.new_buffer()
@@ -1783,10 +1783,10 @@ def test_twiss_range_start_end(test_context, line_name, section, collider_for_te
1783
1783
  if collider.lhcb2.element_names[0] != 'ip3':
1784
1784
  collider.lhcb2.cycle('ip3', inplace=True)
1785
1785
 
1786
- if isinstance(test_context, xo.ContextCpu) and (
1786
+ if isinstance(test_context, xo.ContextCpu) and line._context is not None and (
1787
1787
  test_context.omp_num_threads != line._context.omp_num_threads):
1788
1788
  buffer = test_context.new_buffer()
1789
- elif isinstance(test_context, line._context.__class__):
1789
+ elif line._context is not None and isinstance(test_context, line._context.__class__):
1790
1790
  buffer = line._buffer
1791
1791
  else:
1792
1792
  buffer = test_context.new_buffer()
@@ -1836,10 +1836,10 @@ def test_arbitrary_start(test_context, collider_for_test_twiss_range):
1836
1836
  assert line.twiss_default['method'] == '4d'
1837
1837
  assert line.twiss_default['reverse']
1838
1838
 
1839
- if isinstance(test_context, xo.ContextCpu) and (
1839
+ if isinstance(test_context, xo.ContextCpu) and line._context is not None and (
1840
1840
  test_context.omp_num_threads != line._context.omp_num_threads):
1841
1841
  buffer = test_context.new_buffer()
1842
- elif isinstance(test_context, line._context.__class__):
1842
+ elif line._context is not None and isinstance(test_context, line._context.__class__):
1843
1843
  buffer = line._buffer
1844
1844
  else:
1845
1845
  buffer = test_context.new_buffer()
@@ -1882,10 +1882,10 @@ def test_part_from_full_periodic(test_context, collider_for_test_twiss_range):
1882
1882
  assert line.twiss_default['method'] == '4d'
1883
1883
  assert line.twiss_default['reverse']
1884
1884
 
1885
- if isinstance(test_context, xo.ContextCpu) and (
1885
+ if isinstance(test_context, xo.ContextCpu) and line._context is not None and (
1886
1886
  test_context.omp_num_threads != line._context.omp_num_threads):
1887
1887
  buffer = test_context.new_buffer()
1888
- elif isinstance(test_context, line._context.__class__):
1888
+ elif line._context is not None and isinstance(test_context, line._context.__class__):
1889
1889
  buffer = line._buffer
1890
1890
  else:
1891
1891
  buffer = test_context.new_buffer()
@@ -0,0 +1 @@
1
+ __version__ = '0.98.4'
@@ -154,6 +154,11 @@ class Builder:
154
154
  formatter = xd.refs.CompactFormatter(scope=None)
155
155
 
156
156
  for cc in self.components:
157
+
158
+ if isinstance(cc, str):
159
+ dct['components'].append(cc)
160
+ continue
161
+
157
162
  if not isinstance(cc, xt.Place):
158
163
  raise NotImplementedError('Only Place components are implemented for now')
159
164
 
@@ -211,6 +216,10 @@ class Builder:
211
216
  out = cls(env=env)
212
217
  components = dct.pop('components')
213
218
  for cc in components:
219
+ if isinstance(cc, str):
220
+ out.components.append(cc)
221
+ continue
222
+
214
223
  if isinstance(cc['name'], dict):
215
224
  assert cc['name']['__class__'] == 'Line'
216
225
  name = xt.Line.from_dict(cc['name'], _env=env)
@@ -428,7 +428,6 @@ class Environment:
428
428
 
429
429
  if not compose:
430
430
  out.end_compose()
431
- out.composer = None
432
431
 
433
432
  self._lines_weakrefs.add(out) # Weak references
434
433
 
@@ -57,7 +57,7 @@ from .general import _print
57
57
 
58
58
  log = logging.getLogger(__name__)
59
59
 
60
- _ALLOWED_ELEMENT_TYPES_IN_NEW = [
60
+ _ALLOWED_ELEMENT_TYPES_IN_NEW = [
61
61
  xt.Drift, xt.DriftExact,
62
62
  xt.Magnet, xt.Replica, xt.Marker,
63
63
  xt.Bend, xt.RBend, xt.Quadrupole, xt.Sextupole, xt.Octupole, xt.Multipole,
@@ -65,7 +65,7 @@ _ALLOWED_ELEMENT_TYPES_IN_NEW = [
65
65
  xt.Cavity, xt.RFMultipole, xt.CrabCavity, xt.ReferenceEnergyIncrease,
66
66
  xt.XYShift, xt.XRotation, xt.YRotation, xt.SRotation, xt.ZetaShift,
67
67
  xt.LimitRacetrack, xt.LimitRectEllipse, xt.LimitRect, xt.LimitEllipse,
68
- xt.LimitPolygon, xt.DipoleEdge]
68
+ xt.LimitPolygon, xt.DipoleEdge, xt.LongitudinalLimitRect, xt.FirstOrderTaylorMap]
69
69
 
70
70
  _ALLOWED_ELEMENT_TYPES_DICT = {
71
71
  cc.__name__: cc for cc in _ALLOWED_ELEMENT_TYPES_IN_NEW}
@@ -3764,7 +3764,8 @@ class Line:
3764
3764
  newline = Line(elements=[], element_names=[])
3765
3765
 
3766
3766
  for ee, nn in zip(self._elements, self.element_names):
3767
- if isinstance(ee, Multipole) and nn not in keep:
3767
+ if (isinstance(ee, Multipole) and nn not in keep and
3768
+ not(ee.isthick and ee.length != 0)):
3768
3769
  ctx2np = ee._context.nparray_from_context_array
3769
3770
  aux = ([ee.hxl]
3770
3771
  + list(ctx2np(ee.knl)) + list(ctx2np(ee.ksl)))
@@ -4539,8 +4540,7 @@ class Line:
4539
4540
  @property
4540
4541
  def _context(self):
4541
4542
  if not self._has_valid_tracker():
4542
- raise RuntimeError(
4543
- '`Line._context` can only be called after `Line.build_tracker`')
4543
+ return None
4544
4544
  return self.tracker._context
4545
4545
 
4546
4546
  @property
@@ -5203,7 +5203,7 @@ def _deserialize_element(el, class_dict, _buffer):
5203
5203
  return eltype.from_dict(eldct)
5204
5204
 
5205
5205
  def _is_simple_quadrupole(el):
5206
- if not isinstance(el, Multipole):
5206
+ if not isinstance(el, Multipole) or el.isthick:
5207
5207
  return False
5208
5208
  return (el.radiation_flag == 0
5209
5209
  and (el.order == 1 or len(el.knl) == 2 or not any(el.knl[2:]))
@@ -5214,7 +5214,7 @@ def _is_simple_quadrupole(el):
5214
5214
  and np.abs(el.rot_s_rad) < 1e-12)
5215
5215
 
5216
5216
  def _is_simple_dipole(el):
5217
- if not isinstance(el, Multipole):
5217
+ if not isinstance(el, Multipole) or el.isthick:
5218
5218
  return False
5219
5219
  return (el.radiation_flag == 0
5220
5220
  and (el.order == 0 or len(el.knl) == 1 or not any(el.knl[1:]))
@@ -391,7 +391,8 @@ def bend_to_mad_str(eref, bend_type='sbend', mad_type=MadType.MADX, substituted_
391
391
  else:
392
392
  raise ValueError(f"bend_type {bend_type} not recognized")
393
393
  tokens.append(mad_assignment('angle', _ge(eref.h) * _ge(eref.length) * weight, mad_type, substituted_vars=substituted_vars))
394
- tokens.append(mad_assignment('k0', _ge(eref.k0), mad_type, substituted_vars=substituted_vars))
394
+ if not eref.k0_from_h._value:
395
+ tokens.append(mad_assignment('k0', _ge(eref.k0), mad_type, substituted_vars=substituted_vars))
395
396
  tokens.append(mad_assignment('e1', _ge(eref.edge_entry_angle), mad_type, substituted_vars=substituted_vars))
396
397
  tokens.append(mad_assignment('e2', _ge(eref.edge_exit_angle), mad_type, substituted_vars=substituted_vars))
397
398
  tokens.append(mad_assignment('fint', _ge(eref.edge_entry_fint), mad_type, substituted_vars=substituted_vars))
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: xtrack
3
- Version: 0.98.2
3
+ Version: 0.98.4
4
4
  Summary: Tracking library for particle accelerators
5
5
  Author: G. Iadarola et al.
6
6
  License-Expression: Apache-2.0
@@ -1 +0,0 @@
1
- __version__ = '0.98.2'
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes