xtrack 0.82.0__tar.gz → 0.82.2__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.82.0/xtrack.egg-info → xtrack-0.82.2}/PKG-INFO +1 -1
- {xtrack-0.82.0 → xtrack-0.82.2}/tests/test_particles_basics.py +25 -7
- {xtrack-0.82.0 → xtrack-0.82.2}/tests/test_twiss_vs_madx_psb.py +2 -2
- {xtrack-0.82.0 → xtrack-0.82.2}/tests/test_vs_madx.py +2 -2
- xtrack-0.82.2/xtrack/_version.py +1 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/particles/particles.py +15 -12
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/twiss.py +76 -62
- {xtrack-0.82.0 → xtrack-0.82.2/xtrack.egg-info}/PKG-INFO +1 -1
- xtrack-0.82.0/xtrack/_version.py +0 -1
- {xtrack-0.82.0 → xtrack-0.82.2}/LICENSE +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/MANIFEST.in +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/README.md +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/ducktrack/__init__.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/ducktrack/base_classes.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/ducktrack/be_beamfields/BB6D.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/ducktrack/be_beamfields/BB6Ddata.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/ducktrack/be_beamfields/__init__.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/ducktrack/be_beamfields/beambeam.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/ducktrack/be_beamfields/boost.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/ducktrack/be_beamfields/gaussian_fields.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/ducktrack/be_beamfields/propagate_sigma_matrix.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/ducktrack/be_beamfields/qgauss.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/ducktrack/be_beamfields/slicing.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/ducktrack/be_beamfields/spacecharge.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/ducktrack/elements.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/ducktrack/line.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/ducktrack/mathlibs.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/ducktrack/particles.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/ducktrack/temp_pyparticles.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/pyproject.toml +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/setup.cfg +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/setup.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/tests/test_acceleration.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/tests/test_amplitude_detuning.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/tests/test_aperture_table.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/tests/test_aperture_turn_ele_and_monitor.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/tests/test_apertures.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/tests/test_attr_replicas_and_slices.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/tests/test_bucket_with_ref_energy_change.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/tests/test_cavity_absolute_time.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/tests/test_chromatic_functions_vs_madx.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/tests/test_coasting.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/tests/test_collective_tracker.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/tests/test_collimation.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/tests/test_electron_cooler.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/tests/test_element_characterization_functions.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/tests/test_element_internal_record.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/tests/test_elements.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/tests/test_elements_classflags.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/tests/test_elements_thick.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/tests/test_environment.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/tests/test_fcc_ee_solenoid_correction.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/tests/test_fcc_ee_solenoid_correction_new_optimize_api.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/tests/test_footprint.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/tests/test_freeze_longitudinal.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/tests/test_full_rings.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/tests/test_h6_sps_beamline.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/tests/test_hvkick.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/tests/test_ions.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/tests/test_legacy_multiline_to_env.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/tests/test_lhc_env.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/tests/test_lhc_match_phase_15.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/tests/test_line.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/tests/test_lumi.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/tests/test_mad_writer.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/tests/test_madloader.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/tests/test_madnginterface.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/tests/test_magnet.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/tests/test_match_and_track_from_element.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/tests/test_match_coupling_knob.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/tests/test_match_nested.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/tests/test_match_optics_and_ip_knob.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/tests/test_match_optics_and_ip_knob_new_optimize_api.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/tests/test_match_orbit_bump.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/tests/test_match_tune_chroma_cminus.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/tests/test_monitor.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/tests/test_multi_bunch_gauss.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/tests/test_multiline.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/tests/test_multisetter.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/tests/test_multispecies.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/tests/test_native_madloader.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/tests/test_optimize_for_tracking.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/tests/test_particles.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/tests/test_particles_pdg.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/tests/test_periodic_symmetric_twiss_and_match.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/tests/test_pipeline.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/tests/test_prebuild_kernels.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/tests/test_ps_against_ptc.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/tests/test_ps_multiturn_twiss.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/tests/test_psb_chicane.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/tests/test_pyht_interface.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/tests/test_radial_steering.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/tests/test_radiation.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/tests/test_radiation_equilibrium_emittances.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/tests/test_radiation_equilibrium_emittances_thick.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/tests/test_random_gen.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/tests/test_random_gen_exp.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/tests/test_random_gen_gauss.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/tests/test_random_gen_ruth.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/tests/test_rbend_rbarc.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/tests/test_rf_track.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/tests/test_rotation_signs.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/tests/test_second_order_taylor_map.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/tests/test_seeds.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/tests/test_slice_and_insert_with_replicas.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/tests/test_slice_elements.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/tests/test_slicing.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/tests/test_solenoid_bz_map_vs_boris.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/tests/test_spacecharge_in_ring.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/tests/test_sps_thick.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/tests/test_survey.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/tests/test_tapering.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/tests/test_thick_lhc.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/tests/test_tilt_shifts.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/tests/test_tracker.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/tests/test_trajectory_correcton.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/tests/test_twiss.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/tests/test_xmask_orbit_correction.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/__init__.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/_temp/__init__.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/_temp/boris_and_solenoid_map/__init__.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/_temp/boris_and_solenoid_map/boris.h +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/_temp/boris_and_solenoid_map/solenoid_field.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/_temp/lhc_match/__init__.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/_temp/lhc_match/gen_madx_optics_file.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/_temp/lhc_match/lhc_match.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/_temp/lhc_match/var_limits.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/aperture_meas.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/base_element.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/beam_elements/__init__.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/beam_elements/apertures.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/beam_elements/apertures_src/limitellipse.h +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/beam_elements/apertures_src/limitpolygon.h +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/beam_elements/apertures_src/limitracetrack.h +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/beam_elements/apertures_src/limitrect.h +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/beam_elements/apertures_src/limitrectellipse.h +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/beam_elements/apertures_src/longitudinallimitrect.h +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/beam_elements/beam_interaction.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/beam_elements/elements.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/beam_elements/elements_src/bend.h +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/beam_elements/elements_src/cavity.h +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/beam_elements/elements_src/dipole_fringe.h +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/beam_elements/elements_src/dipoleedge.h +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/beam_elements/elements_src/drift.h +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/beam_elements/elements_src/drift_elem.h +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/beam_elements/elements_src/drift_slice.h +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/beam_elements/elements_src/drift_slice_bend.h +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/beam_elements/elements_src/drift_slice_octupole.h +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/beam_elements/elements_src/drift_slice_quadrupole.h +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/beam_elements/elements_src/drift_slice_rbend.h +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/beam_elements/elements_src/drift_slice_sextupole.h +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/beam_elements/elements_src/electroncooler.h +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/beam_elements/elements_src/elens.h +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/beam_elements/elements_src/exciter.h +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/beam_elements/elements_src/firstordertaylormap.h +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/beam_elements/elements_src/linesegmentmap.h +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/beam_elements/elements_src/magnet.h +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/beam_elements/elements_src/magnet_drift.h +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/beam_elements/elements_src/magnet_edge.h +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/beam_elements/elements_src/magnet_kick.h +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/beam_elements/elements_src/multipole.h +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/beam_elements/elements_src/multipoleedge.h +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/beam_elements/elements_src/nonlinearlens.h +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/beam_elements/elements_src/octupole.h +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/beam_elements/elements_src/quadrupole.h +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/beam_elements/elements_src/rbend.h +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/beam_elements/elements_src/referenceenergyincrease.h +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/beam_elements/elements_src/rfmultipole.h +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/beam_elements/elements_src/second_order_taylor_map.h +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/beam_elements/elements_src/sextupole.h +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/beam_elements/elements_src/simplethinbend.h +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/beam_elements/elements_src/simplethinquadrupole.h +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/beam_elements/elements_src/solenoid.h +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/beam_elements/elements_src/srotation.h +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/beam_elements/elements_src/thick_slice_bend.h +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/beam_elements/elements_src/thick_slice_drift.h +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/beam_elements/elements_src/thick_slice_octupole.h +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/beam_elements/elements_src/thick_slice_quadrupole.h +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/beam_elements/elements_src/thick_slice_rbend.h +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/beam_elements/elements_src/thick_slice_sextupole.h +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/beam_elements/elements_src/thick_slice_solenoid.h +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/beam_elements/elements_src/thin_slice_bend.h +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/beam_elements/elements_src/thin_slice_bend_entry.h +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/beam_elements/elements_src/thin_slice_bend_exit.h +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/beam_elements/elements_src/thin_slice_octupole.h +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/beam_elements/elements_src/thin_slice_octupole_entry.h +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/beam_elements/elements_src/thin_slice_octupole_exit.h +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/beam_elements/elements_src/thin_slice_quadrupole.h +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/beam_elements/elements_src/thin_slice_quadrupole_entry.h +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/beam_elements/elements_src/thin_slice_quadrupole_exit.h +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/beam_elements/elements_src/thin_slice_rbend.h +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/beam_elements/elements_src/thin_slice_rbend_entry.h +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/beam_elements/elements_src/thin_slice_rbend_exit.h +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/beam_elements/elements_src/thin_slice_sextupole.h +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/beam_elements/elements_src/thin_slice_sextupole_entry.h +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/beam_elements/elements_src/thin_slice_sextupole_exit.h +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/beam_elements/elements_src/track_bend.h +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/beam_elements/elements_src/track_dipole_edge_linear.h +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/beam_elements/elements_src/track_dipole_edge_nonlinear.h +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/beam_elements/elements_src/track_dipole_fringe.h +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/beam_elements/elements_src/track_magnet.h +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/beam_elements/elements_src/track_magnet_drift.h +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/beam_elements/elements_src/track_magnet_edge.h +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/beam_elements/elements_src/track_magnet_kick.h +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/beam_elements/elements_src/track_magnet_radiation.h +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/beam_elements/elements_src/track_mult_fringe.h +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/beam_elements/elements_src/track_multipolar_components.h +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/beam_elements/elements_src/track_multipole.h +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/beam_elements/elements_src/track_quadrupole.h +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/beam_elements/elements_src/track_solenoid.h +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/beam_elements/elements_src/track_srotation.h +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/beam_elements/elements_src/track_thick_bend.h +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/beam_elements/elements_src/track_thick_cfd.h +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/beam_elements/elements_src/track_wedge.h +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/beam_elements/elements_src/track_xrotation.h +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/beam_elements/elements_src/track_yrotation.h +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/beam_elements/elements_src/wedge.h +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/beam_elements/elements_src/wire.h +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/beam_elements/elements_src/xrotation.h +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/beam_elements/elements_src/xyshift.h +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/beam_elements/elements_src/yrotation.h +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/beam_elements/elements_src/zetashift.h +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/beam_elements/exciter.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/beam_elements/magnets.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/beam_elements/rft_element.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/beam_elements/slice_elements.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/beam_elements/slice_elements_thick.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/environment.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/footprint.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/general.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/headers/atomicadd.h +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/headers/checks.h +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/headers/constants.h +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/headers/particle_states.h +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/headers/synrad_spectrum.h +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/internal_record.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/json.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/line.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/linear_normal_form.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/loss_location_refinement/__init__.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/loss_location_refinement/loss_location_refinement.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/lumi.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/mad_loader.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/mad_parser/__init__.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/mad_parser/loader.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/mad_parser/madx.lark +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/mad_parser/parse.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/mad_writer.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/madng_interface.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/match.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/monitors/__init__.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/monitors/beam_position_monitor.h +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/monitors/beam_position_monitor.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/monitors/beam_profile_monitor.h +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/monitors/beam_profile_monitor.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/monitors/beam_size_monitor.h +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/monitors/beam_size_monitor.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/monitors/last_turns_monitor.h +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/monitors/last_turns_monitor.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/monitors/particles_monitor.h +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/monitors/particles_monitor.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/multiline.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/multiline_legacy/__init__.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/multiline_legacy/multiline_legacy.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/multiline_legacy/shared_knobs.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/multisetter/__init__.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/multisetter/multisetter.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/particles/__init__.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/particles/constants.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/particles/masses.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/particles/pdg.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/particles/rng_src/base_rng.h +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/particles/rng_src/particles_rng.h +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/pipeline/__init__.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/pipeline/core.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/pipeline/manager.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/pipeline/multitracker.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/progress_indicator.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/random/__init__.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/random/random_generators.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/random/random_src/exponential.h +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/random/random_src/exponential_integral_Ei.h +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/random/random_src/normal.h +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/random/random_src/rutherford.h +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/random/random_src/uniform.h +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/random/random_src/uniform_accurate.h +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/slicing.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/survey.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/svgutils/__init__.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/svgutils/parser.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/svgutils/path.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/svgutils/svgutils.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/synctime.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/tapering.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/targets.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/tracker.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/tracker_data.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/tracker_src/tracker.h +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/trajectory_correction.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack/twissplot.py +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack.egg-info/SOURCES.txt +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack.egg-info/dependency_links.txt +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack.egg-info/requires.txt +0 -0
- {xtrack-0.82.0 → xtrack-0.82.2}/xtrack.egg-info/top_level.txt +0 -0
@@ -32,23 +32,22 @@ def _check_consistency_energy_variables(particles):
|
|
32
32
|
|
33
33
|
beta = particles.beta0 * particles.rvv
|
34
34
|
gamma = 1/np.sqrt(1 - beta**2)
|
35
|
-
pc = particles.
|
35
|
+
pc = particles.mass * gamma * beta
|
36
36
|
|
37
37
|
# Check consistency of delta with rvv
|
38
|
-
xo.assert_allclose(particles.delta, (pc-particles.p0c)/(particles.p0c),
|
38
|
+
xo.assert_allclose(particles.delta, (pc/particles.mass_ratio - particles.p0c)/(particles.p0c),
|
39
39
|
rtol=1e-14, atol=1e-14)
|
40
40
|
|
41
41
|
# Check consistency of ptau with rvv
|
42
|
-
energy = particles.
|
43
|
-
xo.assert_allclose(particles.ptau, (energy - particles.energy0)/particles.p0c,
|
42
|
+
energy = particles.mass * gamma
|
43
|
+
xo.assert_allclose(particles.ptau, (energy/particles.mass_ratio - particles.energy0)/particles.p0c,
|
44
44
|
rtol=1e-14, atol=1e-14)
|
45
45
|
|
46
46
|
# Check consistency of pzeta
|
47
|
-
energy = particles.
|
48
|
-
xo.assert_allclose(particles.pzeta, (energy
|
47
|
+
energy = particles.mass * gamma
|
48
|
+
xo.assert_allclose(particles.pzeta, (energy/particles.mass_ratio - particles.energy0)/(particles.beta0 * particles.p0c),
|
49
49
|
rtol=1e-14, atol=1e-14)
|
50
50
|
|
51
|
-
|
52
51
|
# Check energy property
|
53
52
|
xo.assert_allclose(particles.energy, energy, rtol=1e-14, atol=1e-14)
|
54
53
|
|
@@ -294,6 +293,25 @@ def test_python_add_to_energy(test_context):
|
|
294
293
|
|
295
294
|
assert np.all(particles.zeta == zeta_before)
|
296
295
|
|
296
|
+
particles = xp.Particles(_context=test_context, mass0=xp.PROTON_MASS_EV,
|
297
|
+
q0=1, p0c=1.4e9, x=[1e-3, 0], px=[1e-6, -1e-6],
|
298
|
+
y=[0, 1e-3], py=[2e-6, 0], zeta=[1e-2, 2e-2],
|
299
|
+
delta=[0, 1e-4], mass_ratio=[0.2, 1.7], charge_ratio=[0.5, 2])
|
300
|
+
|
301
|
+
energy_before = particles.copy(_context=xo.ContextCpu()).energy
|
302
|
+
zeta_before = particles.copy(_context=xo.ContextCpu()).zeta
|
303
|
+
|
304
|
+
particles.add_to_energy(3e6)
|
305
|
+
|
306
|
+
expected_energy = energy_before + 3e6
|
307
|
+
particles.move(_context=xo.ContextCpu())
|
308
|
+
xo.assert_allclose(particles.energy, expected_energy,
|
309
|
+
atol=1e-14, rtol=1e-14)
|
310
|
+
|
311
|
+
_check_consistency_energy_variables(particles)
|
312
|
+
|
313
|
+
assert np.all(particles.zeta == zeta_before)
|
314
|
+
|
297
315
|
|
298
316
|
@for_all_test_contexts
|
299
317
|
def test_python_delta_setter(test_context):
|
@@ -31,8 +31,8 @@ def test_twiss_psb(test_context):
|
|
31
31
|
# With the approximation beta ~= beta0 we have delta ~= pzeta ~= 1/beta0 ptau
|
32
32
|
# ==> ptau ~= beta0 delta ==> dptau / ddelta~= beta0
|
33
33
|
|
34
|
-
xo.assert_allclose(tw.dqx, twmad.summary.dq1 * beta0, rtol=0, atol=1e-
|
35
|
-
xo.assert_allclose(tw.dqy, twmad.summary.dq2 * beta0, rtol=0, atol=1e-
|
34
|
+
xo.assert_allclose(tw.dqx, twmad.summary.dq1 * beta0, rtol=0, atol=1e-3)
|
35
|
+
xo.assert_allclose(tw.dqy, twmad.summary.dq2 * beta0, rtol=0, atol=1e-3)
|
36
36
|
|
37
37
|
dx_ref = np.interp(tw.s, twmad.s, twmad.dx * beta0)
|
38
38
|
betx_ref = np.interp(tw.s, twmad.s, twmad.betx)
|
@@ -620,7 +620,7 @@ def test_low_beta_twiss(test_context):
|
|
620
620
|
xo.assert_allclose(mad.table.summ['q1'][0], tw['qx'], rtol=0, atol=1e-6)
|
621
621
|
xo.assert_allclose(mad.table.summ['q2'][0], tw['qy'], rtol=0, atol=1e-6)
|
622
622
|
xo.assert_allclose(mad.table.summ['dq1'][0]*beta0, tw['dqx'], rtol=0,
|
623
|
-
atol=1e-
|
623
|
+
atol=1e-3)
|
624
624
|
xo.assert_allclose(mad.table.summ['dq2'][0]*beta0, tw['dqy'], rtol=0,
|
625
|
-
atol=1e-
|
625
|
+
atol=1e-3)
|
626
626
|
xo.assert_allclose(tw.qs, emitdf.qs.iloc[0], rtol=0, atol=1e-8)
|
@@ -0,0 +1 @@
|
|
1
|
+
__version__ = '0.82.2'
|
@@ -349,6 +349,14 @@ class Particles(xo.HybridClass):
|
|
349
349
|
mask=input_mask,
|
350
350
|
)
|
351
351
|
|
352
|
+
# Init chi and charge ratio
|
353
|
+
self._update_chi_charge_ratio(
|
354
|
+
chi=kwargs.get('chi'),
|
355
|
+
charge_ratio=kwargs.get('charge_ratio'),
|
356
|
+
mass_ratio=kwargs.get('mass_ratio'),
|
357
|
+
mask=input_mask,
|
358
|
+
)
|
359
|
+
|
352
360
|
# Init energy deviations
|
353
361
|
self._update_energy_deviations(
|
354
362
|
delta=kwargs.get('delta'),
|
@@ -366,14 +374,6 @@ class Particles(xo.HybridClass):
|
|
366
374
|
mask=input_mask,
|
367
375
|
)
|
368
376
|
|
369
|
-
# Init chi and charge ratio
|
370
|
-
self._update_chi_charge_ratio(
|
371
|
-
chi=kwargs.get('chi'),
|
372
|
-
charge_ratio=kwargs.get('charge_ratio'),
|
373
|
-
mass_ratio=kwargs.get('mass_ratio'),
|
374
|
-
mask=input_mask,
|
375
|
-
)
|
376
|
-
|
377
377
|
self.unhide_first_n_particles()
|
378
378
|
if isinstance(self._context, xo.ContextCpu) and not _no_reorganize:
|
379
379
|
self.reorganize()
|
@@ -1394,7 +1394,7 @@ class Particles(xo.HybridClass):
|
|
1394
1394
|
Add `delta_energy` to the `energy` of the particles object. `delta`,
|
1395
1395
|
'ptau', `rvv` and `rpp` are updated accordingly.
|
1396
1396
|
"""
|
1397
|
-
self.ptau += delta_energy / self.p0c
|
1397
|
+
self.ptau += delta_energy / self.p0c / self.mass_ratio
|
1398
1398
|
|
1399
1399
|
def set_particle(self, index, set_scalar_vars=False, **kwargs):
|
1400
1400
|
raise NotImplementedError('This functionality has been removed')
|
@@ -1873,9 +1873,9 @@ class Particles(xo.HybridClass):
|
|
1873
1873
|
double const p0c = LocalParticle_get_p0c(part);
|
1874
1874
|
double const charge_ratio = LocalParticle_get_charge_ratio(part);
|
1875
1875
|
double const chi = LocalParticle_get_chi(part);
|
1876
|
-
double const mass_ratio =
|
1877
|
-
|
1878
|
-
ptau += delta_energy/p0c
|
1876
|
+
double const mass_ratio = charge_ratio / chi;
|
1877
|
+
|
1878
|
+
ptau += delta_energy/p0c / mass_ratio;
|
1879
1879
|
|
1880
1880
|
double const old_rpp = LocalParticle_get_rpp(part);
|
1881
1881
|
|
@@ -2083,6 +2083,9 @@ class Particles(xo.HybridClass):
|
|
2083
2083
|
if _rpp is not None or _rvv is not None:
|
2084
2084
|
raise ValueError('Setting `delta` and `ptau` by only giving '
|
2085
2085
|
'`_rpp` and `_rvv` is not supported.')
|
2086
|
+
if any(self.mass_ratio != 1.0):
|
2087
|
+
raise ValueError('Need to provide `delta` or `ptau` with '
|
2088
|
+
'non-default mass ratios.')
|
2086
2089
|
self._delta = 0.0
|
2087
2090
|
delta = self._delta # Cupy complains if we later assign LinkedArray
|
2088
2091
|
|
@@ -680,6 +680,43 @@ def twiss_line(line, particle_ref=None, method=None,
|
|
680
680
|
_initial_particles=_initial_particles,
|
681
681
|
_ebe_monitor=_ebe_monitor)
|
682
682
|
|
683
|
+
|
684
|
+
|
685
|
+
if (not only_orbit and (
|
686
|
+
(compute_chromatic_properties is True)
|
687
|
+
or (compute_chromatic_properties is None and periodic))):
|
688
|
+
|
689
|
+
with xt.line._preserve_config(line):
|
690
|
+
line.freeze_energy(force=True)
|
691
|
+
cols_chrom, scalars_chrom = _compute_chromatic_functions(
|
692
|
+
line=line,
|
693
|
+
init=init,
|
694
|
+
delta_chrom=delta_chrom,
|
695
|
+
steps_r_matrix=steps_r_matrix,
|
696
|
+
matrix_responsiveness_tol=matrix_responsiveness_tol,
|
697
|
+
matrix_stability_tol=matrix_stability_tol,
|
698
|
+
symplectify=symplectify,
|
699
|
+
method=method,
|
700
|
+
use_full_inverse=use_full_inverse,
|
701
|
+
nemitt_x=nemitt_x,
|
702
|
+
nemitt_y=nemitt_y,
|
703
|
+
on_momentum_twiss_res=twiss_res,
|
704
|
+
r_sigma=r_sigma,
|
705
|
+
delta_disp=delta_disp,
|
706
|
+
zeta_disp=zeta_disp,
|
707
|
+
start=start,
|
708
|
+
end=end,
|
709
|
+
num_turns=num_turns,
|
710
|
+
hide_thin_groups=hide_thin_groups,
|
711
|
+
only_markers=only_markers,
|
712
|
+
periodic=periodic,
|
713
|
+
periodic_mode=periodic_mode,
|
714
|
+
include_collective=include_collective,
|
715
|
+
)
|
716
|
+
twiss_res._data.update(cols_chrom)
|
717
|
+
twiss_res._data.update(scalars_chrom)
|
718
|
+
twiss_res._col_names += list(cols_chrom.keys())
|
719
|
+
|
683
720
|
if not skip_global_quantities and not only_orbit:
|
684
721
|
twiss_res._data['R_matrix'] = R_matrix
|
685
722
|
twiss_res._data['steps_r_matrix'] = steps_r_matrix
|
@@ -691,39 +728,6 @@ def twiss_line(line, particle_ref=None, method=None,
|
|
691
728
|
twiss_res._data['eigenvalues'] = eigenvalues.copy()
|
692
729
|
twiss_res._data['rotation_matrix'] = Rot.copy()
|
693
730
|
|
694
|
-
if (not only_orbit and (
|
695
|
-
(compute_chromatic_properties is True)
|
696
|
-
or (compute_chromatic_properties is None and periodic))):
|
697
|
-
|
698
|
-
cols_chrom, scalars_chrom = _compute_chromatic_functions(
|
699
|
-
line=line,
|
700
|
-
init=init,
|
701
|
-
delta_chrom=delta_chrom,
|
702
|
-
steps_r_matrix=steps_r_matrix,
|
703
|
-
matrix_responsiveness_tol=matrix_responsiveness_tol,
|
704
|
-
matrix_stability_tol=matrix_stability_tol,
|
705
|
-
symplectify=symplectify,
|
706
|
-
method=method,
|
707
|
-
use_full_inverse=use_full_inverse,
|
708
|
-
nemitt_x=nemitt_x,
|
709
|
-
nemitt_y=nemitt_y,
|
710
|
-
on_momentum_twiss_res=twiss_res,
|
711
|
-
r_sigma=r_sigma,
|
712
|
-
delta_disp=delta_disp,
|
713
|
-
zeta_disp=zeta_disp,
|
714
|
-
start=start,
|
715
|
-
end=end,
|
716
|
-
num_turns=num_turns,
|
717
|
-
hide_thin_groups=hide_thin_groups,
|
718
|
-
only_markers=only_markers,
|
719
|
-
periodic=periodic,
|
720
|
-
periodic_mode=periodic_mode,
|
721
|
-
include_collective=include_collective,
|
722
|
-
)
|
723
|
-
twiss_res._data.update(cols_chrom)
|
724
|
-
twiss_res._data.update(scalars_chrom)
|
725
|
-
twiss_res._col_names += list(cols_chrom.keys())
|
726
|
-
|
727
731
|
if eneloss_and_damping and not only_orbit:
|
728
732
|
assert 'R_matrix' in twiss_res._data
|
729
733
|
if radiation_method != 'full' or twiss_res._data['R_matrix_ebe'] is None:
|
@@ -814,14 +818,16 @@ def twiss_line(line, particle_ref=None, method=None,
|
|
814
818
|
if ((twiss_res.orientation == 'forward' and not reverse)
|
815
819
|
or (twiss_res.orientation == 'backward' and reverse)):
|
816
820
|
twiss_res.muzeta += init.muzeta - twiss_res.muzeta[0]
|
817
|
-
|
821
|
+
if 'dzeta' in twiss_res._data:
|
822
|
+
twiss_res.dzeta += init.dzeta - twiss_res.dzeta[0]
|
818
823
|
if 'mux' in twiss_res._data:
|
819
824
|
twiss_res.mux += init.mux - twiss_res.mux[0]
|
820
825
|
twiss_res.muy += init.muy - twiss_res.muy[0]
|
821
826
|
elif ((twiss_res.orientation == 'forward' and reverse)
|
822
827
|
or (twiss_res.orientation == 'backward' and not reverse)):
|
823
828
|
twiss_res.muzeta += init.muzeta - twiss_res.muzeta[-1]
|
824
|
-
|
829
|
+
if 'dzeta' in twiss_res._data:
|
830
|
+
twiss_res.dzeta += init.dzeta - twiss_res.dzeta[-1]
|
825
831
|
if 'mux' in twiss_res._data:
|
826
832
|
twiss_res.mux += init.mux - twiss_res.mux[-1]
|
827
833
|
twiss_res.muy += init.muy - twiss_res.muy[-1]
|
@@ -1013,14 +1019,6 @@ def _twiss_open(line, init,
|
|
1013
1019
|
Ws[:, 4, :] -= 0.5 * (line.record_last_track.zeta[7:13, i_start:i_stop+1] - zeta_co).T / scale_eigen
|
1014
1020
|
Ws[:, 5, :] -= 0.5 * (line.record_last_track.ptau[7:13, i_start:i_stop+1] - ptau_co).T / particle_on_co._xobject.beta0[0] / scale_eigen
|
1015
1021
|
|
1016
|
-
dzeta = (((line.record_last_track.zeta[6, i_start:i_stop+1] - zeta_co).T
|
1017
|
-
- (line.record_last_track.zeta[12, i_start:i_stop+1] - zeta_co).T )
|
1018
|
-
/ ((line.record_last_track.delta[6, i_start:i_stop+1] - delta_co).T
|
1019
|
-
- (line.record_last_track.delta[12, i_start:i_stop+1] - delta_co).T))
|
1020
|
-
|
1021
|
-
dzeta -= dzeta[0]
|
1022
|
-
dzeta = np.array(dzeta)
|
1023
|
-
|
1024
1022
|
name_co = np.array(line._element_names_unique[i_start:i_stop] + ('_end_point',))
|
1025
1023
|
name_co_env = np.array(line.element_names[i_start:i_stop] + ('_end_point',))
|
1026
1024
|
|
@@ -1052,8 +1050,6 @@ def _twiss_open(line, init,
|
|
1052
1050
|
lattice_functions, i_replace = _compute_lattice_functions(Ws, use_full_inverse, s_co)
|
1053
1051
|
twiss_res_element_by_element.update(lattice_functions)
|
1054
1052
|
|
1055
|
-
twiss_res_element_by_element['dzeta'] = dzeta
|
1056
|
-
|
1057
1053
|
extra_data = {}
|
1058
1054
|
extra_data['only_markers'] = only_markers
|
1059
1055
|
if _keep_tracking_data:
|
@@ -1067,7 +1063,7 @@ def _twiss_open(line, init,
|
|
1067
1063
|
'x', 'px', 'y', 'py', 'zeta', 'delta', 'ptau',
|
1068
1064
|
'betx', 'bety', 'alfx', 'alfy', 'gamx', 'gamy',
|
1069
1065
|
'betx1', 'bety1', 'betx2', 'bety2',
|
1070
|
-
'dx', 'dpx', 'dy', '
|
1066
|
+
'dx', 'dpx', 'dy', 'dpy',
|
1071
1067
|
]
|
1072
1068
|
|
1073
1069
|
for key in _vars_hide_changes:
|
@@ -1228,20 +1224,17 @@ def _compute_global_quantities(line, twiss_res):
|
|
1228
1224
|
part_on_co = twiss_res['particle_on_co']
|
1229
1225
|
W_matrix = twiss_res['W_matrix']
|
1230
1226
|
|
1231
|
-
dzeta = twiss_res['dzeta']
|
1232
|
-
eta = -dzeta[-1]/circumference
|
1233
|
-
alpha = eta + 1/part_on_co._xobject.gamma0[0]**2
|
1234
|
-
|
1235
1227
|
beta0 = part_on_co._xobject.beta0[0]
|
1236
1228
|
T_rev0 = circumference/clight/beta0
|
1237
1229
|
bets0 = W_matrix[0, 4, 4]**2 + W_matrix[0, 4, 5]**2
|
1238
|
-
if
|
1239
|
-
|
1240
|
-
|
1241
|
-
|
1230
|
+
if 'slip_factor' in twiss_res:
|
1231
|
+
if twiss_res['slip_factor'] < 0: # below transition
|
1232
|
+
bets0 = -bets0
|
1233
|
+
else:
|
1234
|
+
bets0 = 0
|
1242
1235
|
|
1243
1236
|
twiss_res._data.update({
|
1244
|
-
'
|
1237
|
+
'bets0': bets0,
|
1245
1238
|
'circumference': circumference, 'T_rev0': T_rev0,
|
1246
1239
|
'particle_on_co':part_on_co.copy(_context=xo.context_default),
|
1247
1240
|
'gamma0': part_on_co._xobject.gamma0[0],
|
@@ -1439,12 +1432,22 @@ def _compute_chromatic_functions(line, init, delta_chrom, steps_r_matrix,
|
|
1439
1432
|
dqx = dmux[-1]
|
1440
1433
|
dqy = dmuy[-1]
|
1441
1434
|
|
1442
|
-
|
1435
|
+
dzeta = (tw_chrom_res[1].zeta - tw_chrom_res[0].zeta)/(2*delta_chrom)
|
1436
|
+
dzeta -= dzeta[0]
|
1437
|
+
dzeta = np.array(dzeta)
|
1438
|
+
|
1439
|
+
slip_factor = -dzeta[-1] / tw_chrom_res[0].circumference
|
1440
|
+
momentum_compaction_factor = (slip_factor
|
1441
|
+
+ 1/tw_chrom_res[0].particle_on_co._xobject.gamma0[0]**2)
|
1442
|
+
|
1443
|
+
cols_chrom = {'dmux': dmux, 'dmuy': dmuy, 'dzeta': dzeta,
|
1443
1444
|
'bx_chrom': bx_chrom, 'by_chrom': by_chrom,
|
1444
1445
|
'ax_chrom': ax_chrom, 'ay_chrom': ay_chrom,
|
1445
1446
|
'wx_chrom': wx_chrom, 'wy_chrom': wy_chrom,
|
1446
1447
|
}
|
1447
|
-
scalars_chrom = {'dqx': dqx, 'dqy': dqy
|
1448
|
+
scalars_chrom = {'dqx': dqx, 'dqy': dqy, 'slip_factor': slip_factor,
|
1449
|
+
'momentum_compaction_factor': momentum_compaction_factor,
|
1450
|
+
}
|
1448
1451
|
|
1449
1452
|
if on_momentum_twiss_res is not None:
|
1450
1453
|
mux = on_momentum_twiss_res.mux
|
@@ -2049,6 +2052,8 @@ def _handle_loop_around(kwargs):
|
|
2049
2052
|
tw_res.mux -= tw_res['mux', ele_name_init] - init.mux
|
2050
2053
|
tw_res.muy -= tw_res['muy', ele_name_init] - init.muy
|
2051
2054
|
tw_res.muzeta -= tw_res['muzeta', ele_name_init] - init.muzeta
|
2055
|
+
|
2056
|
+
if 'dzeta' in tw_res.keys():
|
2052
2057
|
tw_res.dzeta -= tw_res['dzeta', ele_name_init] - init.dzeta
|
2053
2058
|
|
2054
2059
|
# Not yet supported
|
@@ -2098,7 +2103,9 @@ def _handle_init_inside_range(kwargs):
|
|
2098
2103
|
tw_res.mux -= tw_res['mux', ele_name_init] - init.mux
|
2099
2104
|
tw_res.muy -= tw_res['muy', ele_name_init] - init.muy
|
2100
2105
|
tw_res.muzeta -= tw_res['muzeta', ele_name_init] - init.muzeta
|
2101
|
-
|
2106
|
+
|
2107
|
+
if 'dzeta' in tw_res:
|
2108
|
+
tw_res.dzeta -= tw_res['dzeta', ele_name_init] - init.dzeta
|
2102
2109
|
|
2103
2110
|
# Not correctly handled yet
|
2104
2111
|
if 'dmux' in tw_res.keys():
|
@@ -3009,11 +3016,14 @@ class TwissTable(Table):
|
|
3009
3016
|
mux = self.mux[at_element]
|
3010
3017
|
muy = self.muy[at_element]
|
3011
3018
|
muzeta = self.muzeta[at_element]
|
3012
|
-
dzeta = self.dzeta[at_element]
|
3013
3019
|
else:
|
3014
3020
|
mux = 0
|
3015
3021
|
muy = 0
|
3016
3022
|
muzeta = 0
|
3023
|
+
|
3024
|
+
if 'dzeta' in self.keys():
|
3025
|
+
dzeta = self.dzeta[at_element]
|
3026
|
+
else:
|
3017
3027
|
dzeta = 0
|
3018
3028
|
|
3019
3029
|
return TwissInit(particle_on_co=part, W_matrix=W,
|
@@ -3342,7 +3352,8 @@ class TwissTable(Table):
|
|
3342
3352
|
out.dpx = out.dpx
|
3343
3353
|
out.dy = out.dy
|
3344
3354
|
out.dpy = -out.dpy
|
3345
|
-
|
3355
|
+
if 'dzeta' in out:
|
3356
|
+
out.dzeta = -out.dzeta
|
3346
3357
|
|
3347
3358
|
if 'dx_zeta' in out._col_names:
|
3348
3359
|
out.dx_zeta = out.dx_zeta
|
@@ -3365,10 +3376,12 @@ class TwissTable(Table):
|
|
3365
3376
|
out.mux = out.mux[0] - out.mux
|
3366
3377
|
out.muy = out.muy[0] - out.muy
|
3367
3378
|
out.muzeta = out.muzeta[0] - out.muzeta
|
3368
|
-
out.dzeta = out.dzeta[0] - out.dzeta
|
3369
3379
|
out.phix = -out.phix
|
3370
3380
|
out.phiy = -out.phiy
|
3371
3381
|
|
3382
|
+
if 'dzeta' in out:
|
3383
|
+
out.dzeta = out.dzeta[0] - out.dzeta
|
3384
|
+
|
3372
3385
|
if 'ax_chrom' in out._col_names:
|
3373
3386
|
out.ax_chrom = -out.ax_chrom
|
3374
3387
|
out.ay_chrom = -out.ay_chrom
|
@@ -3471,7 +3484,8 @@ class TwissTable(Table):
|
|
3471
3484
|
|
3472
3485
|
def zero_at(self, name):
|
3473
3486
|
for kk in CYCLICAL_QUANTITIES:
|
3474
|
-
|
3487
|
+
if kk in self:
|
3488
|
+
self[kk] -= self[kk, name]
|
3475
3489
|
|
3476
3490
|
def target(self, tars=None, value=None, at=None, **kwargs):
|
3477
3491
|
if value is None:
|
xtrack-0.82.0/xtrack/_version.py
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
__version__ = '0.82.0'
|
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
|