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