xtrack 0.80.1__tar.gz → 0.81.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {xtrack-0.80.1/xtrack.egg-info → xtrack-0.81.0}/PKG-INFO +1 -1
- xtrack-0.81.0/tests/test_aperture_table.py +106 -0
- xtrack-0.81.0/xtrack/_version.py +1 -0
- xtrack-0.81.0/xtrack/aperture_meas.py +82 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/line.py +40 -1
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/linear_normal_form.py +4 -1
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/mad_parser/loader.py +2 -1
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/monitors/particles_monitor.h +5 -1
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/particles/particles.py +4 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/twiss.py +12 -13
- {xtrack-0.80.1 → xtrack-0.81.0/xtrack.egg-info}/PKG-INFO +1 -1
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack.egg-info/SOURCES.txt +2 -0
- xtrack-0.80.1/xtrack/_version.py +0 -1
- {xtrack-0.80.1 → xtrack-0.81.0}/LICENSE +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/MANIFEST.in +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/README.md +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/ducktrack/__init__.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/ducktrack/base_classes.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/ducktrack/be_beamfields/BB6D.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/ducktrack/be_beamfields/BB6Ddata.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/ducktrack/be_beamfields/__init__.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/ducktrack/be_beamfields/beambeam.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/ducktrack/be_beamfields/boost.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/ducktrack/be_beamfields/gaussian_fields.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/ducktrack/be_beamfields/propagate_sigma_matrix.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/ducktrack/be_beamfields/qgauss.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/ducktrack/be_beamfields/slicing.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/ducktrack/be_beamfields/spacecharge.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/ducktrack/elements.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/ducktrack/line.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/ducktrack/mathlibs.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/ducktrack/particles.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/ducktrack/temp_pyparticles.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/pyproject.toml +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/setup.cfg +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/setup.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/tests/test_acceleration.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/tests/test_amplitude_detuning.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/tests/test_aperture_turn_ele_and_monitor.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/tests/test_apertures.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/tests/test_attr_replicas_and_slices.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/tests/test_bucket_with_ref_energy_change.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/tests/test_cavity_absolute_time.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/tests/test_chromatic_functions_vs_madx.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/tests/test_coasting.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/tests/test_collective_tracker.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/tests/test_collimation.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/tests/test_electron_cooler.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/tests/test_element_characterization_functions.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/tests/test_element_internal_record.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/tests/test_elements.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/tests/test_elements_classflags.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/tests/test_elements_thick.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/tests/test_environment.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/tests/test_fcc_ee_solenoid_correction.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/tests/test_fcc_ee_solenoid_correction_new_optimize_api.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/tests/test_footprint.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/tests/test_freeze_longitudinal.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/tests/test_full_rings.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/tests/test_h6_sps_beamline.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/tests/test_hvkick.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/tests/test_ions.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/tests/test_legacy_multiline_to_env.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/tests/test_lhc_env.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/tests/test_lhc_match_phase_15.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/tests/test_line.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/tests/test_lumi.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/tests/test_mad_writer.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/tests/test_madloader.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/tests/test_madnginterface.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/tests/test_magnet.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/tests/test_match_and_track_from_element.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/tests/test_match_coupling_knob.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/tests/test_match_nested.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/tests/test_match_optics_and_ip_knob.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/tests/test_match_optics_and_ip_knob_new_optimize_api.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/tests/test_match_orbit_bump.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/tests/test_match_tune_chroma_cminus.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/tests/test_monitor.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/tests/test_multi_bunch_gauss.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/tests/test_multiline.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/tests/test_multisetter.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/tests/test_multispecies.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/tests/test_native_madloader.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/tests/test_optimize_for_tracking.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/tests/test_particles.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/tests/test_particles_basics.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/tests/test_particles_pdg.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/tests/test_periodic_symmetric_twiss_and_match.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/tests/test_pipeline.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/tests/test_prebuild_kernels.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/tests/test_ps_against_ptc.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/tests/test_ps_multiturn_twiss.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/tests/test_psb_chicane.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/tests/test_pyht_interface.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/tests/test_radial_steering.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/tests/test_radiation.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/tests/test_radiation_equilibrium_emittances.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/tests/test_radiation_equilibrium_emittances_thick.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/tests/test_random_gen.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/tests/test_random_gen_exp.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/tests/test_random_gen_gauss.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/tests/test_random_gen_ruth.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/tests/test_rbend_rbarc.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/tests/test_rf_track.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/tests/test_rotation_signs.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/tests/test_second_order_taylor_map.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/tests/test_seeds.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/tests/test_slice_and_insert_with_replicas.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/tests/test_slice_elements.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/tests/test_slicing.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/tests/test_solenoid_bz_map_vs_boris.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/tests/test_spacecharge_in_ring.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/tests/test_sps_thick.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/tests/test_survey.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/tests/test_tapering.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/tests/test_thick_lhc.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/tests/test_tilt_shifts.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/tests/test_tracker.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/tests/test_trajectory_correcton.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/tests/test_twiss.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/tests/test_twiss_vs_madx_psb.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/tests/test_vs_madx.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/tests/test_xmask_orbit_correction.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/__init__.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/_temp/__init__.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/_temp/boris_and_solenoid_map/__init__.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/_temp/boris_and_solenoid_map/boris.h +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/_temp/boris_and_solenoid_map/solenoid_field.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/_temp/lhc_match/__init__.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/_temp/lhc_match/gen_madx_optics_file.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/_temp/lhc_match/lhc_match.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/_temp/lhc_match/var_limits.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/base_element.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/beam_elements/__init__.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/beam_elements/apertures.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/beam_elements/apertures_src/limitellipse.h +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/beam_elements/apertures_src/limitpolygon.h +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/beam_elements/apertures_src/limitracetrack.h +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/beam_elements/apertures_src/limitrect.h +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/beam_elements/apertures_src/limitrectellipse.h +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/beam_elements/apertures_src/longitudinallimitrect.h +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/beam_elements/beam_interaction.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/beam_elements/elements.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/beam_elements/elements_src/bend.h +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/beam_elements/elements_src/cavity.h +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/beam_elements/elements_src/dipole_fringe.h +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/beam_elements/elements_src/dipoleedge.h +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/beam_elements/elements_src/drift.h +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/beam_elements/elements_src/drift_elem.h +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/beam_elements/elements_src/drift_slice.h +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/beam_elements/elements_src/drift_slice_bend.h +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/beam_elements/elements_src/drift_slice_octupole.h +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/beam_elements/elements_src/drift_slice_quadrupole.h +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/beam_elements/elements_src/drift_slice_rbend.h +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/beam_elements/elements_src/drift_slice_sextupole.h +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/beam_elements/elements_src/electroncooler.h +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/beam_elements/elements_src/elens.h +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/beam_elements/elements_src/exciter.h +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/beam_elements/elements_src/firstordertaylormap.h +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/beam_elements/elements_src/linesegmentmap.h +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/beam_elements/elements_src/magnet.h +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/beam_elements/elements_src/magnet_drift.h +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/beam_elements/elements_src/magnet_edge.h +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/beam_elements/elements_src/magnet_kick.h +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/beam_elements/elements_src/multipole.h +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/beam_elements/elements_src/multipoleedge.h +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/beam_elements/elements_src/nonlinearlens.h +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/beam_elements/elements_src/octupole.h +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/beam_elements/elements_src/quadrupole.h +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/beam_elements/elements_src/rbend.h +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/beam_elements/elements_src/referenceenergyincrease.h +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/beam_elements/elements_src/rfmultipole.h +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/beam_elements/elements_src/second_order_taylor_map.h +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/beam_elements/elements_src/sextupole.h +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/beam_elements/elements_src/simplethinbend.h +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/beam_elements/elements_src/simplethinquadrupole.h +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/beam_elements/elements_src/solenoid.h +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/beam_elements/elements_src/srotation.h +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/beam_elements/elements_src/thick_slice_bend.h +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/beam_elements/elements_src/thick_slice_drift.h +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/beam_elements/elements_src/thick_slice_octupole.h +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/beam_elements/elements_src/thick_slice_quadrupole.h +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/beam_elements/elements_src/thick_slice_rbend.h +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/beam_elements/elements_src/thick_slice_sextupole.h +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/beam_elements/elements_src/thick_slice_solenoid.h +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/beam_elements/elements_src/thin_slice_bend.h +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/beam_elements/elements_src/thin_slice_bend_entry.h +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/beam_elements/elements_src/thin_slice_bend_exit.h +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/beam_elements/elements_src/thin_slice_octupole.h +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/beam_elements/elements_src/thin_slice_octupole_entry.h +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/beam_elements/elements_src/thin_slice_octupole_exit.h +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/beam_elements/elements_src/thin_slice_quadrupole.h +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/beam_elements/elements_src/thin_slice_quadrupole_entry.h +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/beam_elements/elements_src/thin_slice_quadrupole_exit.h +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/beam_elements/elements_src/thin_slice_rbend.h +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/beam_elements/elements_src/thin_slice_rbend_entry.h +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/beam_elements/elements_src/thin_slice_rbend_exit.h +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/beam_elements/elements_src/thin_slice_sextupole.h +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/beam_elements/elements_src/thin_slice_sextupole_entry.h +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/beam_elements/elements_src/thin_slice_sextupole_exit.h +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/beam_elements/elements_src/track_bend.h +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/beam_elements/elements_src/track_dipole_edge_linear.h +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/beam_elements/elements_src/track_dipole_edge_nonlinear.h +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/beam_elements/elements_src/track_dipole_fringe.h +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/beam_elements/elements_src/track_magnet.h +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/beam_elements/elements_src/track_magnet_drift.h +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/beam_elements/elements_src/track_magnet_edge.h +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/beam_elements/elements_src/track_magnet_kick.h +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/beam_elements/elements_src/track_magnet_radiation.h +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/beam_elements/elements_src/track_mult_fringe.h +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/beam_elements/elements_src/track_multipolar_components.h +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/beam_elements/elements_src/track_multipole.h +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/beam_elements/elements_src/track_quadrupole.h +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/beam_elements/elements_src/track_solenoid.h +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/beam_elements/elements_src/track_srotation.h +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/beam_elements/elements_src/track_thick_bend.h +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/beam_elements/elements_src/track_thick_cfd.h +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/beam_elements/elements_src/track_wedge.h +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/beam_elements/elements_src/track_xrotation.h +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/beam_elements/elements_src/track_yrotation.h +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/beam_elements/elements_src/wedge.h +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/beam_elements/elements_src/wire.h +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/beam_elements/elements_src/xrotation.h +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/beam_elements/elements_src/xyshift.h +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/beam_elements/elements_src/yrotation.h +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/beam_elements/elements_src/zetashift.h +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/beam_elements/exciter.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/beam_elements/magnets.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/beam_elements/rft_element.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/beam_elements/slice_elements.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/beam_elements/slice_elements_thick.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/environment.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/footprint.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/general.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/headers/atomicadd.h +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/headers/checks.h +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/headers/constants.h +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/headers/particle_states.h +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/headers/synrad_spectrum.h +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/internal_record.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/json.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/loss_location_refinement/__init__.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/loss_location_refinement/loss_location_refinement.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/lumi.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/mad_loader.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/mad_parser/__init__.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/mad_parser/madx.lark +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/mad_parser/parse.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/mad_writer.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/madng_interface.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/match.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/monitors/__init__.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/monitors/beam_position_monitor.h +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/monitors/beam_position_monitor.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/monitors/beam_profile_monitor.h +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/monitors/beam_profile_monitor.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/monitors/beam_size_monitor.h +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/monitors/beam_size_monitor.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/monitors/last_turns_monitor.h +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/monitors/last_turns_monitor.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/monitors/particles_monitor.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/multiline.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/multiline_legacy/__init__.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/multiline_legacy/multiline_legacy.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/multiline_legacy/shared_knobs.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/multisetter/__init__.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/multisetter/multisetter.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/particles/__init__.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/particles/constants.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/particles/masses.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/particles/pdg.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/particles/rng_src/base_rng.h +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/particles/rng_src/particles_rng.h +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/pipeline/__init__.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/pipeline/core.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/pipeline/manager.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/pipeline/multitracker.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/progress_indicator.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/random/__init__.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/random/random_generators.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/random/random_src/exponential.h +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/random/random_src/exponential_integral_Ei.h +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/random/random_src/normal.h +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/random/random_src/rutherford.h +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/random/random_src/uniform.h +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/random/random_src/uniform_accurate.h +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/slicing.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/survey.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/synctime.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/tapering.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/targets.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/tracker.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/tracker_data.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/tracker_src/tracker.h +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/trajectory_correction.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack/twissplot.py +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack.egg-info/dependency_links.txt +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack.egg-info/requires.txt +0 -0
- {xtrack-0.80.1 → xtrack-0.81.0}/xtrack.egg-info/top_level.txt +0 -0
@@ -0,0 +1,106 @@
|
|
1
|
+
import pathlib
|
2
|
+
|
3
|
+
import xtrack as xt
|
4
|
+
import numpy as np
|
5
|
+
import xobjects as xo
|
6
|
+
from cpymad.madx import Madx
|
7
|
+
|
8
|
+
test_data_folder = pathlib.Path(
|
9
|
+
__file__).parent.joinpath('../test_data').absolute()
|
10
|
+
|
11
|
+
def test_aperture_table():
|
12
|
+
|
13
|
+
aper_blacklist = [
|
14
|
+
'vtaf.51632.b_aper', 'vbrta.51633.a_aper', 'vbrta.51633.b_aper',
|
15
|
+
'bgiha.51634.a_aper', 'bgiva.51674.a_aper']
|
16
|
+
|
17
|
+
env = xt.load_madx_lattice(test_data_folder /
|
18
|
+
'sps_with_apertures/EYETS 2024-2025.seq')
|
19
|
+
env.vars.load_madx(str(test_data_folder / 'sps_with_apertures/lhc_q20.str'))
|
20
|
+
line = env.sps
|
21
|
+
line.particle_ref = xt.Particles(mass0=xt.PROTON_MASS_EV, q0=1, p0c=26e9)
|
22
|
+
|
23
|
+
tw0 = line.twiss4d()
|
24
|
+
|
25
|
+
|
26
|
+
mad = Madx()
|
27
|
+
mad.input('''
|
28
|
+
SPS : SEQUENCE, refer = centre, L = 7000;
|
29
|
+
a: marker, at = 20;
|
30
|
+
endsequence;
|
31
|
+
''')
|
32
|
+
mad.call(str(test_data_folder /
|
33
|
+
'sps_with_apertures/APERTURE_EYETS 2024-2025.seq'))
|
34
|
+
mad.beam()
|
35
|
+
mad.use('SPS')
|
36
|
+
line_aper = xt.Line.from_madx_sequence(mad.sequence.SPS, install_apertures=True)
|
37
|
+
|
38
|
+
tt_aper = line_aper.get_table().rows['.*_aper']
|
39
|
+
|
40
|
+
insertions = []
|
41
|
+
for nn in tt_aper.name:
|
42
|
+
if nn in aper_blacklist:
|
43
|
+
continue
|
44
|
+
env.elements[nn] = line_aper.get(nn).copy()
|
45
|
+
insertions.append(env.place(nn, at=tt_aper['s', nn]))
|
46
|
+
|
47
|
+
for ins in insertions:
|
48
|
+
if ins.name.endswith('.a_aper'):
|
49
|
+
ins.at += 1e-3
|
50
|
+
if ins.name.endswith('.b_aper'):
|
51
|
+
ins.at -= 1e-3
|
52
|
+
|
53
|
+
line = env.sps
|
54
|
+
line.insert(insertions)
|
55
|
+
|
56
|
+
line.build_tracker()
|
57
|
+
aper = line.get_aperture_table(dx=1e-3, dy=1e-3,
|
58
|
+
x_range=(-0.1, 0.1), y_range=(-0.1, 0.1))
|
59
|
+
|
60
|
+
|
61
|
+
###########
|
62
|
+
aper_check = aper.rows['veba.20250.a_aper' : 'vebb.20270.b_aper']
|
63
|
+
|
64
|
+
assert np.all(aper_check.name == np.array(
|
65
|
+
['veba.20250.a_aper', 'drift_333..2', 'mba.20250', 'drift_334..0',
|
66
|
+
'veba.20250.b_aper', 'drift_334..1', 'vebb.20270.a_aper',
|
67
|
+
'drift_334..2', 'mbb.20270', 'drift_335..0', 'vebb.20270.b_aper']))
|
68
|
+
xo.assert_allclose(aper_check.s, np.array([
|
69
|
+
1225.8247 , 1225.8247 , 1226.02017417, 1232.28019277,
|
70
|
+
1232.4827 , 1232.4827 , 1232.4847 , 1232.4847 ,
|
71
|
+
1232.67019277, 1238.93021138, 1239.1227 ]), rtol=0, atol=1e-6)
|
72
|
+
xo.assert_allclose(aper_check.x_aper_low, np.array(
|
73
|
+
[-0.0765, -0.0765, -0.0765, -0.0765, -0.0765, -0.0765, -0.0645,
|
74
|
+
-0.0645, -0.0645, -0.0645, -0.0645]), rtol=0, atol=1e-3)
|
75
|
+
xo.assert_allclose(aper_check.x_aper_high, np.array(
|
76
|
+
[0.0755, 0.0755, 0.0755, 0.0755, 0.0755, 0.0755, 0.0645, 0.0645,
|
77
|
+
0.0645, 0.0645, 0.0645]), rtol=0, atol=1e-3)
|
78
|
+
xo.assert_allclose(aper_check.y_aper_low, np.array(
|
79
|
+
[-0.0195, -0.0195, -0.0195, -0.0195, -0.0195, -0.0195, -0.0265,
|
80
|
+
-0.0265, -0.0265, -0.0265, -0.0265]), rtol=0, atol=1e-3)
|
81
|
+
xo.assert_allclose(aper_check.y_aper_high, np.array(
|
82
|
+
[0.0195, 0.0195, 0.0195, 0.0195, 0.0195, 0.0195, 0.0265, 0.0265,
|
83
|
+
0.0265, 0.0265, 0.0265]), rtol=0, atol=1e-3)
|
84
|
+
|
85
|
+
assert np.all(np.isnan(aper_check.x_aper_low_discrete) == np.array(
|
86
|
+
[False, True, True, True, False, True, False, True, True,
|
87
|
+
True, False]))
|
88
|
+
assert np.all(np.isnan(aper_check.x_aper_high_discrete) == np.array(
|
89
|
+
[False, True, True, True, False, True, False, True, True,
|
90
|
+
True, False]))
|
91
|
+
assert np.all(np.isnan(aper_check.y_aper_low_discrete) == np.array(
|
92
|
+
[False, True, True, True, False, True, False, True, True,
|
93
|
+
True, False]))
|
94
|
+
assert np.all(np.isnan(aper_check.y_aper_high_discrete) == np.array(
|
95
|
+
[False, True, True, True, False, True, False, True, True,
|
96
|
+
True, False]))
|
97
|
+
|
98
|
+
mask_not_none = ~np.isnan(aper_check.x_aper_low_discrete)
|
99
|
+
assert np.all(aper_check.x_aper_low_discrete[mask_not_none]
|
100
|
+
== aper_check.x_aper_low[mask_not_none])
|
101
|
+
assert np.all(aper_check.x_aper_high_discrete[mask_not_none]
|
102
|
+
== aper_check.x_aper_high[mask_not_none])
|
103
|
+
assert np.all(aper_check.y_aper_low_discrete[mask_not_none]
|
104
|
+
== aper_check.y_aper_low[mask_not_none])
|
105
|
+
assert np.all(aper_check.y_aper_high_discrete[mask_not_none]
|
106
|
+
== aper_check.y_aper_high[mask_not_none])
|
@@ -0,0 +1 @@
|
|
1
|
+
__version__ = '0.81.0'
|
@@ -0,0 +1,82 @@
|
|
1
|
+
import numpy as np
|
2
|
+
import xtrack as xt
|
3
|
+
|
4
|
+
def measure_aperture(line,
|
5
|
+
dx=1e-3, dy=1e-3, x_range=(-0.1, 0.1), y_range=(-0.1, 0.1)):
|
6
|
+
x_test = np.arange(x_range[0], x_range[1], dx)
|
7
|
+
y_test = np.arange(y_range[0], y_range[1], dy)
|
8
|
+
|
9
|
+
n_x = len(x_test)
|
10
|
+
|
11
|
+
x_probe = np.concatenate([x_test, 0*y_test])
|
12
|
+
y_probe = np.concatenate([0*x_test, y_test])
|
13
|
+
|
14
|
+
p = line.build_particles(x=x_probe, y=y_probe)
|
15
|
+
|
16
|
+
with xt.line._preserve_config(line):
|
17
|
+
line.freeze_longitudinal()
|
18
|
+
line.freeze_vars(['x', 'px', 'y', 'py'])
|
19
|
+
line.config.XSUITE_RESTORE_LOSS = True
|
20
|
+
|
21
|
+
line.track(p, turn_by_turn_monitor='ONE_TURN_EBE')
|
22
|
+
mon = line.record_last_track
|
23
|
+
|
24
|
+
x_h_aper = mon.x[:n_x, :]
|
25
|
+
s_h_aper = mon.s[:n_x, :]
|
26
|
+
state_h_aper = mon.state[:n_x, :]
|
27
|
+
state_h_aper[:, :-1] = state_h_aper[:, 1:] # due to the way they are logged
|
28
|
+
|
29
|
+
mean_x = 0.5*(x_h_aper[:-1, :] + x_h_aper[1:, :])
|
30
|
+
diff_loss_h = np.diff(state_h_aper, axis=0)
|
31
|
+
zeros = mean_x * 0
|
32
|
+
x_aper_low_mat = np.where(diff_loss_h>0, mean_x, zeros)
|
33
|
+
x_aper_low_discrete = x_aper_low_mat.sum(axis=0)
|
34
|
+
x_aper_high_mat = np.where(diff_loss_h<0, mean_x, zeros)
|
35
|
+
x_aper_high_discrete = x_aper_high_mat.sum(axis=0)
|
36
|
+
|
37
|
+
y_v_aper = mon.y[n_x:, :]
|
38
|
+
state_v_aper = mon.state[n_x:, :]
|
39
|
+
state_v_aper[:, :-1] = state_v_aper[:, 1:] # due to the way they are logged
|
40
|
+
|
41
|
+
mean_y = 0.5*(y_v_aper[:-1, :] + y_v_aper[1:, :])
|
42
|
+
diff_loss_v = np.diff(state_v_aper, axis=0)
|
43
|
+
zeros = mean_y * 0
|
44
|
+
y_aper_low_mat = np.where(diff_loss_v>0, mean_y, zeros)
|
45
|
+
y_aper_low_discrete = y_aper_low_mat.sum(axis=0)
|
46
|
+
y_aper_high_mat = np.where(diff_loss_v<0, mean_y, zeros)
|
47
|
+
y_aper_high_discrete = y_aper_high_mat.sum(axis=0)
|
48
|
+
|
49
|
+
s_aper = s_h_aper[0, :]
|
50
|
+
|
51
|
+
mask_interp_low_h = x_aper_low_discrete != 0
|
52
|
+
x_aper_low = np.interp(s_aper,
|
53
|
+
s_aper[mask_interp_low_h], x_aper_low_discrete[mask_interp_low_h])
|
54
|
+
mask_interp_high_h = x_aper_high_discrete != 0
|
55
|
+
x_aper_high = np.interp(s_aper,
|
56
|
+
s_aper[mask_interp_high_h], x_aper_high_discrete[mask_interp_high_h])
|
57
|
+
x_aper_low_discrete[~mask_interp_low_h] = np.nan
|
58
|
+
x_aper_high_discrete[~mask_interp_high_h] = np.nan
|
59
|
+
|
60
|
+
mask_interp_low_v = y_aper_low_discrete != 0
|
61
|
+
y_aper_low = np.interp(s_aper,
|
62
|
+
s_aper[mask_interp_low_v], y_aper_low_discrete[mask_interp_low_v])
|
63
|
+
mask_interp_high_v = y_aper_high_discrete != 0
|
64
|
+
y_aper_high = np.interp(s_aper,
|
65
|
+
s_aper[mask_interp_high_v], y_aper_high_discrete[mask_interp_high_v])
|
66
|
+
y_aper_low_discrete[~mask_interp_low_v] = np.nan
|
67
|
+
y_aper_high_discrete[~mask_interp_high_v] = np.nan
|
68
|
+
|
69
|
+
out = xt.Table({
|
70
|
+
'name': np.array(list(line.element_names) + ['_end_point']),
|
71
|
+
's': s_aper,
|
72
|
+
'x_aper_low': x_aper_low,
|
73
|
+
'x_aper_high': x_aper_high,
|
74
|
+
'x_aper_low_discrete': x_aper_low_discrete,
|
75
|
+
'x_aper_high_discrete': x_aper_high_discrete,
|
76
|
+
'y_aper_low': y_aper_low,
|
77
|
+
'y_aper_high': y_aper_high,
|
78
|
+
'y_aper_low_discrete': y_aper_low_discrete,
|
79
|
+
'y_aper_high_discrete': y_aper_high_discrete,
|
80
|
+
})
|
81
|
+
|
82
|
+
return out
|
@@ -37,6 +37,7 @@ from xtrack.twiss import (compute_one_turn_matrix_finite_differences,
|
|
37
37
|
get_non_linear_chromaticity,
|
38
38
|
DEFAULT_MATRIX_STABILITY_TOL,
|
39
39
|
DEFAULT_MATRIX_RESPONSIVENESS_TOL)
|
40
|
+
from xtrack.aperture_meas import measure_aperture
|
40
41
|
from .match import match_line, closed_orbit_correction, match_knob_line, Action
|
41
42
|
from .tapering import compensate_radiation_energy_loss
|
42
43
|
from .mad_loader import MadLoader
|
@@ -799,6 +800,42 @@ class Line:
|
|
799
800
|
True: 'reverse', False: 'proper'}[reverse]
|
800
801
|
return tab
|
801
802
|
|
803
|
+
def get_aperture_table(self, dx=1e-3, dy=1e-3, x_range=(-0.1, 0.1),
|
804
|
+
y_range=(-0.1, 0.1)):
|
805
|
+
'''
|
806
|
+
Return a table with the horizontal and vertical aperture estimated at all
|
807
|
+
elements of the line.
|
808
|
+
The aperture is estimated by tracking a particle through the line and
|
809
|
+
measuring the maximum and minumum horizontal and vertical position
|
810
|
+
at which particles survive. For elements at which no lost particles are
|
811
|
+
detected, the aperture is estimated by interpolating the values
|
812
|
+
of the neighbouring elements.
|
813
|
+
|
814
|
+
Parameters
|
815
|
+
----------
|
816
|
+
dx : float, optional
|
817
|
+
Required horizontal resolution (in m) for the aperture measurement.
|
818
|
+
Default is 1e-3.
|
819
|
+
dy : float, optional
|
820
|
+
Required vertical resolution (in m) for the aperture measurement.
|
821
|
+
Default is 1e-3.
|
822
|
+
x_range : tuple, optional
|
823
|
+
Horizontal range (in m) for the aperture measurement.
|
824
|
+
Default is (-0.1, 0.1).
|
825
|
+
y_range : tuple, optional
|
826
|
+
Vertical range (in m) for the aperture measurement.
|
827
|
+
Default is (-0.1, 0.1).
|
828
|
+
|
829
|
+
Returns
|
830
|
+
-------
|
831
|
+
aperture_table : xtrack.Table
|
832
|
+
Table with the horizontal and vertical aperture at all elements
|
833
|
+
of the line.
|
834
|
+
'''
|
835
|
+
|
836
|
+
return xt.aperture_meas.measure_aperture(self,
|
837
|
+
dx=1e-3, dy=1e-3, x_range=(-0.1, 0.1), y_range=(-0.1, 0.1))
|
838
|
+
|
802
839
|
def copy(self, shallow=False, _context=None, _buffer=None):
|
803
840
|
'''
|
804
841
|
Return a copy of the line.
|
@@ -4067,7 +4104,9 @@ class Line:
|
|
4067
4104
|
>>> line.set(['e', 'f'], '3*a')
|
4068
4105
|
|
4069
4106
|
'''
|
4070
|
-
if hasattr(name, '
|
4107
|
+
if hasattr(name, 'env_name'):
|
4108
|
+
name = name.env_name
|
4109
|
+
elif hasattr(name, 'name'):
|
4071
4110
|
name = name.name
|
4072
4111
|
|
4073
4112
|
if isinstance(name, Iterable) and not isinstance(name, str):
|
@@ -186,11 +186,14 @@ def compute_linear_normal_form(M, symplectify=False, only_4d_block=False,
|
|
186
186
|
n2_inv_sq = np.matmul(np.matmul(a2, S), b2)
|
187
187
|
n3_inv_sq = np.matmul(np.matmul(a3, S), b3)
|
188
188
|
|
189
|
+
if only_4d_block:
|
190
|
+
n3_inv_sq = 1.0 # Just to avoid errors
|
191
|
+
|
189
192
|
if not n1_inv_sq > 0:
|
190
193
|
raise ValueError('Invalid n1')
|
191
194
|
if not n2_inv_sq > 0:
|
192
195
|
raise ValueError('Invalid n2')
|
193
|
-
if not n3_inv_sq > 0:
|
196
|
+
if not n3_inv_sq > 0 :
|
194
197
|
raise ValueError('Invalid n3')
|
195
198
|
|
196
199
|
n1 = 1./np.sqrt(n1_inv_sq)
|
@@ -675,6 +675,7 @@ def load_madx_lattice(file=None, string=None, reverse_lines=None):
|
|
675
675
|
del new_env.lines['__DUMMY__'] # keep the elements but not the line
|
676
676
|
|
677
677
|
env = new_env
|
678
|
-
|
678
|
+
|
679
|
+
env.vars.default_to_zero = False
|
679
680
|
|
680
681
|
return env
|
@@ -1749,6 +1749,9 @@ class Particles(xo.HybridClass):
|
|
1749
1749
|
int64_t check_is_active(LocalParticle* part) {
|
1750
1750
|
int64_t ipart=0;
|
1751
1751
|
while (ipart < part->_num_active_particles){
|
1752
|
+
#ifdef XSUITE_RESTORE_LOSS
|
1753
|
+
ipart++;
|
1754
|
+
#else
|
1752
1755
|
if (part->state[ipart]<1){
|
1753
1756
|
LocalParticle_exchange(
|
1754
1757
|
part, ipart, part->_num_active_particles-1);
|
@@ -1758,6 +1761,7 @@ class Particles(xo.HybridClass):
|
|
1758
1761
|
else{
|
1759
1762
|
ipart++;
|
1760
1763
|
}
|
1764
|
+
#endif
|
1761
1765
|
}
|
1762
1766
|
|
1763
1767
|
if (part->_num_active_particles==0){
|
@@ -1345,9 +1345,8 @@ def _compute_chromatic_functions(line, init, delta_chrom, steps_r_matrix,
|
|
1345
1345
|
symmetrize=(periodic_mode == 'periodic_symmetric'),
|
1346
1346
|
include_collective=include_collective,
|
1347
1347
|
)['R_matrix']
|
1348
|
-
|
1349
1348
|
(WW_chrom, _, _, _) = lnf.compute_linear_normal_form(RR_chrom,
|
1350
|
-
only_4d_block=
|
1349
|
+
only_4d_block=True,
|
1351
1350
|
responsiveness_tol=matrix_responsiveness_tol,
|
1352
1351
|
stability_tol=matrix_stability_tol,
|
1353
1352
|
symplectify=symplectify)
|
@@ -2377,15 +2376,15 @@ def compute_one_turn_matrix_finite_differences(
|
|
2377
2376
|
ddelta = steps_r_matrix["ddelta"]
|
2378
2377
|
part_temp = xpart.build_particles(_context=context,
|
2379
2378
|
particle_ref=particle_on_co, mode='shift',
|
2380
|
-
x = [dx, 0., 0., 0., 0., 0., -dx, 0., 0., 0., 0., 0.],
|
2381
|
-
px = [0., dpx, 0., 0., 0., 0., 0., -dpx, 0., 0., 0., 0.],
|
2382
|
-
y = [0., 0., dy, 0., 0., 0., 0., 0., -dy, 0., 0., 0.],
|
2383
|
-
py = [0., 0., 0., dpy, 0., 0., 0., 0., 0., -dpy, 0., 0.],
|
2384
|
-
zeta = [0., 0., 0., 0., dzeta, 0., 0., 0., 0., 0., -dzeta, 0.],
|
2385
|
-
delta = [0., 0., 0., 0., 0., ddelta, 0., 0., 0., 0., 0., -ddelta],
|
2379
|
+
x = [0., dx, 0., 0., 0., 0., 0., -dx, 0., 0., 0., 0., 0.],
|
2380
|
+
px = [0., 0., dpx, 0., 0., 0., 0., 0., -dpx, 0., 0., 0., 0.],
|
2381
|
+
y = [0., 0., 0., dy, 0., 0., 0., 0., 0., -dy, 0., 0., 0.],
|
2382
|
+
py = [0., 0., 0., 0., dpy, 0., 0., 0., 0., 0., -dpy, 0., 0.],
|
2383
|
+
zeta = [0., 0., 0., 0., 0., dzeta, 0., 0., 0., 0., 0., -dzeta, 0.],
|
2384
|
+
delta = [0., 0., 0., 0., 0., 0., ddelta, 0., 0., 0., 0., 0., -ddelta],
|
2386
2385
|
)
|
2387
2386
|
dpzeta = float(context.nparray_from_context_array(
|
2388
|
-
(part_temp.ptau[
|
2387
|
+
(part_temp.ptau[6] - part_temp.ptau[12])/2/part_temp.beta0[0]))
|
2389
2388
|
if particle_on_co._xobject.at_element[0]>0:
|
2390
2389
|
part_temp.s[:] = particle_on_co._xobject.s[0]
|
2391
2390
|
part_temp.at_element[:] = particle_on_co._xobject.at_element[0]
|
@@ -2421,7 +2420,7 @@ def compute_one_turn_matrix_finite_differences(
|
|
2421
2420
|
line.config.XSUITE_MIRROR = True
|
2422
2421
|
line.track(part_temp, num_turns=num_turns)
|
2423
2422
|
|
2424
|
-
temp_mat = np.zeros(shape=(6,
|
2423
|
+
temp_mat = np.zeros(shape=(6, 13), dtype=np.float64)
|
2425
2424
|
temp_mat[0, :] = context.nparray_from_context_array(part_temp.x)
|
2426
2425
|
temp_mat[1, :] = context.nparray_from_context_array(part_temp.px)
|
2427
2426
|
temp_mat[2, :] = context.nparray_from_context_array(part_temp.y)
|
@@ -2433,13 +2432,13 @@ def compute_one_turn_matrix_finite_differences(
|
|
2433
2432
|
RR = np.zeros(shape=(6, 6), dtype=np.float64)
|
2434
2433
|
|
2435
2434
|
for jj, dd in enumerate([dx, dpx, dy, dpy, dzeta, dpzeta]):
|
2436
|
-
RR[:, jj] = (temp_mat[:, jj] - temp_mat[:, jj+6])/(2*dd)
|
2435
|
+
RR[:, jj] = (temp_mat[:, jj+1] - temp_mat[:, jj+1+6])/(2*dd)
|
2437
2436
|
|
2438
2437
|
out = {'R_matrix': RR}
|
2439
2438
|
|
2440
2439
|
if element_by_element:
|
2441
2440
|
mon = line.record_last_track
|
2442
|
-
temp_mad_ebe = np.zeros(shape=(len(line._element_names_unique) + 1, 6,
|
2441
|
+
temp_mad_ebe = np.zeros(shape=(len(line._element_names_unique) + 1, 6, 13), dtype=np.float64)
|
2443
2442
|
temp_mad_ebe[:, 0, :] = mon.x.T
|
2444
2443
|
temp_mad_ebe[:, 1, :] = mon.px.T
|
2445
2444
|
temp_mad_ebe[:, 2, :] = mon.y.T
|
@@ -2449,7 +2448,7 @@ def compute_one_turn_matrix_finite_differences(
|
|
2449
2448
|
|
2450
2449
|
RR_ebe = np.zeros(shape=(len(line._element_names_unique) + 1, 6, 6), dtype=np.float64)
|
2451
2450
|
for jj, dd in enumerate([dx, dpx, dy, dpy, dzeta, dpzeta]):
|
2452
|
-
RR_ebe[:, :, jj] = (temp_mad_ebe[:, :, jj] - temp_mad_ebe[:, :, jj+6])/(2*dd)
|
2451
|
+
RR_ebe[:, :, jj] = (temp_mad_ebe[:, :, jj+1] - temp_mad_ebe[:, :, jj+1+6])/(2*dd)
|
2453
2452
|
|
2454
2453
|
if only_markers:
|
2455
2454
|
mask_twiss = line.tracker._get_twiss_mask_markers()
|
@@ -22,6 +22,7 @@ ducktrack/be_beamfields/slicing.py
|
|
22
22
|
ducktrack/be_beamfields/spacecharge.py
|
23
23
|
tests/test_acceleration.py
|
24
24
|
tests/test_amplitude_detuning.py
|
25
|
+
tests/test_aperture_table.py
|
25
26
|
tests/test_aperture_turn_ele_and_monitor.py
|
26
27
|
tests/test_apertures.py
|
27
28
|
tests/test_attr_replicas_and_slices.py
|
@@ -110,6 +111,7 @@ tests/test_vs_madx.py
|
|
110
111
|
tests/test_xmask_orbit_correction.py
|
111
112
|
xtrack/__init__.py
|
112
113
|
xtrack/_version.py
|
114
|
+
xtrack/aperture_meas.py
|
113
115
|
xtrack/base_element.py
|
114
116
|
xtrack/environment.py
|
115
117
|
xtrack/footprint.py
|
xtrack-0.80.1/xtrack/_version.py
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
__version__ = '0.80.1'
|
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
|