xtrack 0.86.3__tar.gz → 0.86.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.86.3/xtrack.egg-info → xtrack-0.86.4}/PKG-INFO +1 -1
- {xtrack-0.86.3 → xtrack-0.86.4}/tests/test_collimation.py +1 -2
- {xtrack-0.86.3 → xtrack-0.86.4}/tests/test_element_characterization_functions.py +3 -3
- xtrack-0.86.4/xtrack/_version.py +1 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/beam_elements/elements.py +10 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/beam_elements/slice_elements_thick.py +13 -6
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/loss_location_refinement/loss_location_refinement.py +63 -54
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/tapering.py +1 -1
- {xtrack-0.86.3 → xtrack-0.86.4/xtrack.egg-info}/PKG-INFO +1 -1
- xtrack-0.86.3/xtrack/_version.py +0 -1
- {xtrack-0.86.3 → xtrack-0.86.4}/LICENSE +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/MANIFEST.in +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/README.md +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/ducktrack/__init__.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/ducktrack/base_classes.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/ducktrack/be_beamfields/BB6D.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/ducktrack/be_beamfields/BB6Ddata.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/ducktrack/be_beamfields/__init__.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/ducktrack/be_beamfields/beambeam.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/ducktrack/be_beamfields/boost.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/ducktrack/be_beamfields/gaussian_fields.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/ducktrack/be_beamfields/propagate_sigma_matrix.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/ducktrack/be_beamfields/qgauss.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/ducktrack/be_beamfields/slicing.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/ducktrack/be_beamfields/spacecharge.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/ducktrack/elements.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/ducktrack/line.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/ducktrack/mathlibs.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/ducktrack/particles.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/ducktrack/temp_pyparticles.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/pyproject.toml +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/setup.cfg +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/setup.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/tests/test_acceleration.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/tests/test_amplitude_detuning.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/tests/test_aperture_table.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/tests/test_aperture_turn_ele_and_monitor.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/tests/test_apertures.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/tests/test_attr_replicas_and_slices.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/tests/test_bucket_with_ref_energy_change.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/tests/test_cavity_absolute_time.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/tests/test_chromatic_functions_vs_madx.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/tests/test_coasting.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/tests/test_collective_tracker.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/tests/test_electron_cooler.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/tests/test_element_internal_record.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/tests/test_elements.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/tests/test_elements_classflags.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/tests/test_elements_thick.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/tests/test_environment.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/tests/test_fcc_ee_solenoid_correction.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/tests/test_fcc_ee_solenoid_correction_new_optimize_api.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/tests/test_footprint.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/tests/test_freeze_longitudinal.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/tests/test_full_rings.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/tests/test_h6_sps_beamline.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/tests/test_hvkick.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/tests/test_ions.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/tests/test_legacy_multiline_to_env.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/tests/test_lhc_env.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/tests/test_lhc_match_phase_15.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/tests/test_line.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/tests/test_load.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/tests/test_lumi.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/tests/test_mad_writer.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/tests/test_madloader.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/tests/test_madnginterface.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/tests/test_magnet.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/tests/test_match_and_track_from_element.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/tests/test_match_coupling_knob.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/tests/test_match_nested.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/tests/test_match_optics_and_ip_knob.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/tests/test_match_optics_and_ip_knob_new_optimize_api.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/tests/test_match_orbit_bump.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/tests/test_match_tune_chroma_cminus.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/tests/test_monitor.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/tests/test_multi_bunch_gauss.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/tests/test_multiline.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/tests/test_multisetter.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/tests/test_multispecies.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/tests/test_native_madloader.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/tests/test_optimize_for_tracking.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/tests/test_particles.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/tests/test_particles_basics.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/tests/test_particles_pdg.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/tests/test_periodic_symmetric_twiss_and_match.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/tests/test_pipeline.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/tests/test_prebuild_kernels.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/tests/test_ps_against_ptc.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/tests/test_ps_multiturn_twiss.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/tests/test_psb_chicane.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/tests/test_pyht_interface.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/tests/test_radial_steering.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/tests/test_radiation.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/tests/test_radiation_equilibrium_emittances.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/tests/test_radiation_equilibrium_emittances_thick.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/tests/test_radiation_integrals.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/tests/test_random_gen.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/tests/test_random_gen_exp.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/tests/test_random_gen_gauss.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/tests/test_random_gen_ruth.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/tests/test_rbend_rbarc.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/tests/test_rf_track.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/tests/test_rotation_signs.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/tests/test_second_order_taylor_map.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/tests/test_seeds.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/tests/test_slice_and_insert_with_replicas.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/tests/test_slice_elements.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/tests/test_slicing.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/tests/test_solenoid_bz_map_vs_boris.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/tests/test_solenoid_bz_map_vs_boris_legacy.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/tests/test_spacecharge_in_ring.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/tests/test_spin.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/tests/test_sps_thick.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/tests/test_survey.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/tests/test_tapering.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/tests/test_thick_lhc.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/tests/test_tilt_shifts.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/tests/test_tracker.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/tests/test_trajectory_correcton.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/tests/test_twiss.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/tests/test_twiss_vs_madx_psb.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/tests/test_vs_madx.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/tests/test_xmask_orbit_correction.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/__init__.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/_temp/__init__.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/_temp/boris_and_solenoid_map/__init__.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/_temp/boris_and_solenoid_map/boris.h +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/_temp/boris_and_solenoid_map/solenoid_field.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/_temp/lhc_match/__init__.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/_temp/lhc_match/gen_madx_optics_file.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/_temp/lhc_match/lhc_match.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/_temp/lhc_match/var_limits.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/aperture_meas.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/base_element.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/beam_elements/__init__.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/beam_elements/apertures.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/beam_elements/apertures_src/limitellipse.h +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/beam_elements/apertures_src/limitpolygon.h +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/beam_elements/apertures_src/limitracetrack.h +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/beam_elements/apertures_src/limitrect.h +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/beam_elements/apertures_src/limitrectellipse.h +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/beam_elements/apertures_src/longitudinallimitrect.h +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/beam_elements/beam_interaction.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/beam_elements/elements_src/bend.h +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/beam_elements/elements_src/cavity.h +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/beam_elements/elements_src/default_magnet_config.h +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/beam_elements/elements_src/dipole_fringe.h +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/beam_elements/elements_src/dipoleedge.h +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/beam_elements/elements_src/drift.h +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/beam_elements/elements_src/drift_slice.h +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/beam_elements/elements_src/drift_slice_bend.h +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/beam_elements/elements_src/drift_slice_octupole.h +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/beam_elements/elements_src/drift_slice_quadrupole.h +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/beam_elements/elements_src/drift_slice_rbend.h +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/beam_elements/elements_src/drift_slice_sextupole.h +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/beam_elements/elements_src/drift_slice_uniform_solenoid.h +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/beam_elements/elements_src/electroncooler.h +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/beam_elements/elements_src/elens.h +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/beam_elements/elements_src/exciter.h +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/beam_elements/elements_src/firstordertaylormap.h +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/beam_elements/elements_src/legacy_solenoid.h +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/beam_elements/elements_src/linesegmentmap.h +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/beam_elements/elements_src/magnet.h +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/beam_elements/elements_src/magnet_drift.h +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/beam_elements/elements_src/magnet_edge.h +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/beam_elements/elements_src/magnet_kick.h +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/beam_elements/elements_src/marker.h +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/beam_elements/elements_src/multipole.h +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/beam_elements/elements_src/multipoleedge.h +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/beam_elements/elements_src/nonlinearlens.h +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/beam_elements/elements_src/octupole.h +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/beam_elements/elements_src/quadrupole.h +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/beam_elements/elements_src/rbend.h +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/beam_elements/elements_src/referenceenergyincrease.h +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/beam_elements/elements_src/rfmultipole.h +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/beam_elements/elements_src/second_order_taylor_map.h +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/beam_elements/elements_src/sextupole.h +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/beam_elements/elements_src/simplethinbend.h +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/beam_elements/elements_src/simplethinquadrupole.h +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/beam_elements/elements_src/slnd.h +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/beam_elements/elements_src/srotation.h +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/beam_elements/elements_src/thick_slice_bend.h +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/beam_elements/elements_src/thick_slice_octupole.h +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/beam_elements/elements_src/thick_slice_quadrupole.h +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/beam_elements/elements_src/thick_slice_rbend.h +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/beam_elements/elements_src/thick_slice_sextupole.h +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/beam_elements/elements_src/thick_slice_uniform_solenoid.h +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/beam_elements/elements_src/thin_slice_bend.h +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/beam_elements/elements_src/thin_slice_bend_entry.h +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/beam_elements/elements_src/thin_slice_bend_exit.h +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/beam_elements/elements_src/thin_slice_octupole.h +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/beam_elements/elements_src/thin_slice_octupole_entry.h +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/beam_elements/elements_src/thin_slice_octupole_exit.h +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/beam_elements/elements_src/thin_slice_quadrupole.h +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/beam_elements/elements_src/thin_slice_quadrupole_entry.h +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/beam_elements/elements_src/thin_slice_quadrupole_exit.h +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/beam_elements/elements_src/thin_slice_rbend.h +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/beam_elements/elements_src/thin_slice_rbend_entry.h +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/beam_elements/elements_src/thin_slice_rbend_exit.h +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/beam_elements/elements_src/thin_slice_sextupole.h +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/beam_elements/elements_src/thin_slice_sextupole_entry.h +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/beam_elements/elements_src/thin_slice_sextupole_exit.h +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/beam_elements/elements_src/thin_slice_uniform_solenoid_entry.h +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/beam_elements/elements_src/thin_slice_uniform_solenoid_exit.h +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/beam_elements/elements_src/track_cavity.h +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/beam_elements/elements_src/track_dipole_edge_linear.h +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/beam_elements/elements_src/track_dipole_edge_nonlinear.h +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/beam_elements/elements_src/track_dipole_fringe.h +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/beam_elements/elements_src/track_drift.h +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/beam_elements/elements_src/track_legacy_solenoid.h +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/beam_elements/elements_src/track_legacy_solenoid_multipolar_components.h +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/beam_elements/elements_src/track_legacy_solenoid_radiation.h +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/beam_elements/elements_src/track_magnet.h +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/beam_elements/elements_src/track_magnet_drift.h +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/beam_elements/elements_src/track_magnet_edge.h +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/beam_elements/elements_src/track_magnet_kick.h +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/beam_elements/elements_src/track_magnet_radiation.h +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/beam_elements/elements_src/track_mult_fringe.h +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/beam_elements/elements_src/track_srotation.h +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/beam_elements/elements_src/track_thick_bend.h +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/beam_elements/elements_src/track_thick_cfd.h +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/beam_elements/elements_src/track_wedge.h +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/beam_elements/elements_src/track_xrotation.h +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/beam_elements/elements_src/track_yrotation.h +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/beam_elements/elements_src/variable_solenoid.h +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/beam_elements/elements_src/wedge.h +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/beam_elements/elements_src/wire.h +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/beam_elements/elements_src/xrotation.h +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/beam_elements/elements_src/xyshift.h +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/beam_elements/elements_src/yrotation.h +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/beam_elements/elements_src/zetashift.h +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/beam_elements/exciter.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/beam_elements/magnets.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/beam_elements/rft_element.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/beam_elements/slice_elements_edge.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/beam_elements/slice_elements_thin.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/environment.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/footprint.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/general.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/headers/atomicadd.h +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/headers/checks.h +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/headers/constants.h +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/headers/particle_states.h +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/headers/synrad_spectrum.h +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/headers/track.h +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/internal_record.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/json.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/line.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/linear_normal_form.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/load.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/loss_location_refinement/__init__.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/lumi.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/mad_loader.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/mad_parser/__init__.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/mad_parser/loader.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/mad_parser/madx.lark +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/mad_parser/parse.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/mad_writer.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/madng_interface.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/match.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/monitors/__init__.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/monitors/beam_position_monitor.h +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/monitors/beam_position_monitor.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/monitors/beam_profile_monitor.h +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/monitors/beam_profile_monitor.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/monitors/beam_size_monitor.h +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/monitors/beam_size_monitor.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/monitors/last_turns_monitor.h +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/monitors/last_turns_monitor.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/monitors/particles_monitor.h +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/monitors/particles_monitor.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/multiline.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/multiline_legacy/__init__.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/multiline_legacy/multiline_legacy.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/multiline_legacy/shared_knobs.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/multisetter/__init__.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/multisetter/multisetter.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/particles/__init__.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/particles/constants.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/particles/masses.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/particles/particles.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/particles/pdg.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/particles/rng_src/base_rng.h +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/particles/rng_src/particles_rng.h +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/pipeline/__init__.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/pipeline/core.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/pipeline/manager.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/pipeline/multitracker.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/progress_indicator.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/random/__init__.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/random/random_generators.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/random/random_src/exponential.h +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/random/random_src/exponential_integral_Ei.h +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/random/random_src/normal.h +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/random/random_src/rutherford.h +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/random/random_src/uniform.h +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/random/random_src/uniform_accurate.h +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/slicing.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/survey.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/svgutils/__init__.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/svgutils/parser.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/svgutils/path.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/svgutils/svgutils.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/synctime.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/targets.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/tracker.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/tracker_data.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/tracker_src/tracker.h +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/trajectory_correction.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/twiss.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack/twissplot.py +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack.egg-info/SOURCES.txt +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack.egg-info/dependency_links.txt +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack.egg-info/requires.txt +0 -0
- {xtrack-0.86.3 → xtrack-0.86.4}/xtrack.egg-info/top_level.txt +0 -0
|
@@ -166,7 +166,7 @@ def test_aperture_refinement(sandwitch_aper):
|
|
|
166
166
|
+ line_aper_0.elements
|
|
167
167
|
+ (xt.Drift(_buffer=buf, length=1),
|
|
168
168
|
xt.Multipole(_buffer=buf, knl=[0.]),
|
|
169
|
-
xt.
|
|
169
|
+
xt.Quadrupole(_buffer=buf, length=1),
|
|
170
170
|
xt.Cavity(_buffer=buf, voltage=3e6, frequency=400e6),
|
|
171
171
|
xt.ParticlesMonitor(_buffer=buf,
|
|
172
172
|
start_at_turn=0, stop_at_turn=10, num_particles=3),
|
|
@@ -439,7 +439,6 @@ def test_losslocationrefinement_skip_refinement_for_collimators():
|
|
|
439
439
|
dr = 50e-6,
|
|
440
440
|
ds = 0.05,
|
|
441
441
|
save_refine_lines=True)
|
|
442
|
-
|
|
443
442
|
loss_loc_refinement.refine_loss_location(particles)
|
|
444
443
|
|
|
445
444
|
assert np.all(part_before.s == particles.s)
|
|
@@ -50,9 +50,9 @@ def test_has_backtrack(test_context):
|
|
|
50
50
|
assert _has_backtrack(line['a1'], line)
|
|
51
51
|
assert _has_backtrack(line['a2'], line)
|
|
52
52
|
|
|
53
|
-
assert
|
|
54
|
-
assert
|
|
55
|
-
assert
|
|
53
|
+
assert _allow_loss_refinement(line['e0'], line)
|
|
54
|
+
assert _allow_loss_refinement(line['e1'], line)
|
|
55
|
+
assert _allow_loss_refinement(line['e2'], line)
|
|
56
56
|
assert _allow_loss_refinement(line['a0'], line)
|
|
57
57
|
assert _allow_loss_refinement(line['a1'], line)
|
|
58
58
|
assert _allow_loss_refinement(line['a2'], line)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = '0.86.4'
|
|
@@ -701,6 +701,7 @@ class _BendCommon:
|
|
|
701
701
|
"""Common properties for Bend and RBend: see their respective docstrings."""
|
|
702
702
|
isthick = True
|
|
703
703
|
has_backtrack = True
|
|
704
|
+
allow_loss_refinement = True
|
|
704
705
|
|
|
705
706
|
_skip_in_to_dict = ['_order', 'inv_factorial_order'] # defined by knl, etc.
|
|
706
707
|
|
|
@@ -973,6 +974,8 @@ class Bend(_BendCommon, BeamElement):
|
|
|
973
974
|
A value added to delta for the purposes of tapering. Default is 0.
|
|
974
975
|
"""
|
|
975
976
|
|
|
977
|
+
allow_loss_refinement = True
|
|
978
|
+
|
|
976
979
|
_xofields = _BendCommon._common_xofields
|
|
977
980
|
_rename = _BendCommon._common_rename
|
|
978
981
|
|
|
@@ -1185,6 +1188,8 @@ class RBend(_BendCommon, BeamElement):
|
|
|
1185
1188
|
'length_straight': xo.Float64,
|
|
1186
1189
|
}
|
|
1187
1190
|
|
|
1191
|
+
allow_loss_refinement = True
|
|
1192
|
+
|
|
1188
1193
|
_rename = {
|
|
1189
1194
|
**_BendCommon._common_rename,
|
|
1190
1195
|
'length_straight': '_length_straight',
|
|
@@ -1442,6 +1447,7 @@ class Sextupole(BeamElement):
|
|
|
1442
1447
|
|
|
1443
1448
|
isthick = True
|
|
1444
1449
|
has_backtrack = True
|
|
1450
|
+
allow_loss_refinement = True
|
|
1445
1451
|
|
|
1446
1452
|
_xofields={
|
|
1447
1453
|
'k2': xo.Float64,
|
|
@@ -1600,6 +1606,7 @@ class Octupole(BeamElement):
|
|
|
1600
1606
|
|
|
1601
1607
|
isthick = True
|
|
1602
1608
|
has_backtrack = True
|
|
1609
|
+
allow_loss_refinement = True
|
|
1603
1610
|
|
|
1604
1611
|
_xofields={
|
|
1605
1612
|
'k3': xo.Float64,
|
|
@@ -1755,6 +1762,7 @@ class Quadrupole(BeamElement):
|
|
|
1755
1762
|
"""
|
|
1756
1763
|
isthick = True
|
|
1757
1764
|
has_backtrack = True
|
|
1765
|
+
allow_loss_refinement = True
|
|
1758
1766
|
|
|
1759
1767
|
_xofields = {
|
|
1760
1768
|
'k1': xo.Float64,
|
|
@@ -1911,6 +1919,7 @@ class UniformSolenoid(BeamElement):
|
|
|
1911
1919
|
|
|
1912
1920
|
isthick = True
|
|
1913
1921
|
has_backtrack = True
|
|
1922
|
+
allow_loss_refinement = True
|
|
1914
1923
|
|
|
1915
1924
|
_xofields={
|
|
1916
1925
|
'ks': xo.Float64,
|
|
@@ -2153,6 +2162,7 @@ class Solenoid(BeamElement):
|
|
|
2153
2162
|
"""
|
|
2154
2163
|
isthick = True
|
|
2155
2164
|
has_backtrack = True
|
|
2165
|
+
allow_loss_refinement = True
|
|
2156
2166
|
|
|
2157
2167
|
_xofields = {
|
|
2158
2168
|
'length': xo.Float64,
|
|
@@ -20,6 +20,7 @@ COMMON_SLICE_XO_FIELDS = {
|
|
|
20
20
|
|
|
21
21
|
class ThickSliceBend(BeamElement):
|
|
22
22
|
allow_rot_and_shift = False
|
|
23
|
+
allow_loss_refinement = True
|
|
23
24
|
rot_and_shift_from_parent = True
|
|
24
25
|
_skip_in_to_dict = ['_parent']
|
|
25
26
|
has_backtrack = True
|
|
@@ -49,6 +50,7 @@ class ThickSliceBend(BeamElement):
|
|
|
49
50
|
|
|
50
51
|
class ThickSliceRBend(BeamElement):
|
|
51
52
|
allow_rot_and_shift = False
|
|
53
|
+
allow_loss_refinement = True
|
|
52
54
|
rot_and_shift_from_parent = True
|
|
53
55
|
_skip_in_to_dict = ['_parent']
|
|
54
56
|
has_backtrack = True
|
|
@@ -78,6 +80,7 @@ class ThickSliceRBend(BeamElement):
|
|
|
78
80
|
|
|
79
81
|
class ThickSliceQuadrupole(BeamElement):
|
|
80
82
|
allow_rot_and_shift = False
|
|
83
|
+
allow_loss_refinement = True
|
|
81
84
|
rot_and_shift_from_parent = True
|
|
82
85
|
_skip_in_to_dict = ['_parent']
|
|
83
86
|
has_backtrack = True
|
|
@@ -107,6 +110,7 @@ class ThickSliceQuadrupole(BeamElement):
|
|
|
107
110
|
|
|
108
111
|
class ThickSliceSextupole(BeamElement):
|
|
109
112
|
allow_rot_and_shift = False
|
|
113
|
+
allow_loss_refinement = True
|
|
110
114
|
rot_and_shift_from_parent = True
|
|
111
115
|
_skip_in_to_dict = ['_parent']
|
|
112
116
|
has_backtrack = True
|
|
@@ -139,6 +143,7 @@ class ThickSliceSextupole(BeamElement):
|
|
|
139
143
|
|
|
140
144
|
class ThickSliceOctupole(BeamElement):
|
|
141
145
|
allow_rot_and_shift = False
|
|
146
|
+
allow_loss_refinement = True
|
|
142
147
|
rot_and_shift_from_parent = True
|
|
143
148
|
_skip_in_to_dict = ['_parent']
|
|
144
149
|
has_backtrack = True
|
|
@@ -171,6 +176,7 @@ class ThickSliceOctupole(BeamElement):
|
|
|
171
176
|
|
|
172
177
|
class ThickSliceUniformSolenoid(BeamElement):
|
|
173
178
|
allow_rot_and_shift = False
|
|
179
|
+
allow_loss_refinement = True
|
|
174
180
|
rot_and_shift_from_parent = True
|
|
175
181
|
_skip_in_to_dict = ['_parent']
|
|
176
182
|
has_backtrack = True
|
|
@@ -203,6 +209,7 @@ class ThickSliceUniformSolenoid(BeamElement):
|
|
|
203
209
|
|
|
204
210
|
class ThickSliceSolenoid(BeamElement):
|
|
205
211
|
allow_rot_and_shift = False
|
|
212
|
+
allow_loss_refinement = True
|
|
206
213
|
rot_and_shift_from_parent = True
|
|
207
214
|
_skip_in_to_dict = ['_parent']
|
|
208
215
|
has_backtrack = True
|
|
@@ -235,10 +242,10 @@ class ThickSliceSolenoid(BeamElement):
|
|
|
235
242
|
|
|
236
243
|
class DriftSliceBend(BeamElement):
|
|
237
244
|
allow_rot_and_shift = False
|
|
245
|
+
allow_loss_refinement = True
|
|
238
246
|
rot_and_shift_from_parent = False
|
|
239
247
|
_skip_in_to_dict = ['_parent']
|
|
240
248
|
has_backtrack = True
|
|
241
|
-
allow_loss_refinement = True
|
|
242
249
|
_force_moveable = True
|
|
243
250
|
isthick = True
|
|
244
251
|
_inherit_strengths = False
|
|
@@ -270,10 +277,10 @@ class DriftSliceBend(BeamElement):
|
|
|
270
277
|
|
|
271
278
|
class DriftSliceRBend(BeamElement):
|
|
272
279
|
allow_rot_and_shift = False
|
|
280
|
+
allow_loss_refinement = True
|
|
273
281
|
rot_and_shift_from_parent = False
|
|
274
282
|
_skip_in_to_dict = ['_parent']
|
|
275
283
|
has_backtrack = True
|
|
276
|
-
allow_loss_refinement = True
|
|
277
284
|
_force_moveable = True
|
|
278
285
|
isthick = True
|
|
279
286
|
_inherit_strengths = False
|
|
@@ -305,10 +312,10 @@ class DriftSliceRBend(BeamElement):
|
|
|
305
312
|
|
|
306
313
|
class DriftSliceQuadrupole(BeamElement):
|
|
307
314
|
allow_rot_and_shift = False
|
|
315
|
+
allow_loss_refinement = True
|
|
308
316
|
rot_and_shift_from_parent = False
|
|
309
317
|
_skip_in_to_dict = ['_parent']
|
|
310
318
|
has_backtrack = True
|
|
311
|
-
allow_loss_refinement = True
|
|
312
319
|
_force_moveable = True
|
|
313
320
|
isthick = True
|
|
314
321
|
_inherit_strengths = False
|
|
@@ -340,10 +347,10 @@ class DriftSliceQuadrupole(BeamElement):
|
|
|
340
347
|
|
|
341
348
|
class DriftSliceSextupole(BeamElement):
|
|
342
349
|
allow_rot_and_shift = False
|
|
350
|
+
allow_loss_refinement = True
|
|
343
351
|
rot_and_shift_from_parent = False
|
|
344
352
|
_skip_in_to_dict = ['_parent']
|
|
345
353
|
has_backtrack = True
|
|
346
|
-
allow_loss_refinement = True
|
|
347
354
|
_force_moveable = True
|
|
348
355
|
isthick = True
|
|
349
356
|
_inherit_strengths = False
|
|
@@ -375,10 +382,10 @@ class DriftSliceSextupole(BeamElement):
|
|
|
375
382
|
|
|
376
383
|
class DriftSliceOctupole(BeamElement):
|
|
377
384
|
allow_rot_and_shift = False
|
|
385
|
+
allow_loss_refinement = True
|
|
378
386
|
rot_and_shift_from_parent = False
|
|
379
387
|
_skip_in_to_dict = ['_parent']
|
|
380
388
|
has_backtrack = True
|
|
381
|
-
allow_loss_refinement = True
|
|
382
389
|
_force_moveable = True
|
|
383
390
|
isthick = True
|
|
384
391
|
_inherit_strengths = False
|
|
@@ -410,10 +417,10 @@ class DriftSliceOctupole(BeamElement):
|
|
|
410
417
|
|
|
411
418
|
class DriftSlice(BeamElement):
|
|
412
419
|
allow_rot_and_shift = False
|
|
420
|
+
allow_loss_refinement = True
|
|
413
421
|
rot_and_shift_from_parent = False
|
|
414
422
|
_skip_in_to_dict = ['_parent']
|
|
415
423
|
has_backtrack = True
|
|
416
|
-
allow_loss_refinement = True
|
|
417
424
|
_force_moveable = True
|
|
418
425
|
isthick = True
|
|
419
426
|
_inherit_strengths = False
|
|
@@ -9,9 +9,9 @@ from scipy.spatial import ConvexHull
|
|
|
9
9
|
import xobjects as xo
|
|
10
10
|
import xtrack as xt
|
|
11
11
|
|
|
12
|
-
from ..beam_elements import LimitPolygon, XYShift, SRotation
|
|
13
|
-
from ..line import (Line, _is_thick,
|
|
14
|
-
|
|
12
|
+
from ..beam_elements import LimitPolygon, XYShift, SRotation
|
|
13
|
+
from ..line import (Line, _is_thick, _allow_loss_refinement, _has_backtrack,
|
|
14
|
+
_is_aperture)
|
|
15
15
|
|
|
16
16
|
from ..general import _print
|
|
17
17
|
|
|
@@ -68,6 +68,7 @@ class LossLocationRefinement:
|
|
|
68
68
|
if line.iscollective:
|
|
69
69
|
self._original_line = line
|
|
70
70
|
self.line = line._get_non_collective_line()
|
|
71
|
+
self.line.build_tracker(_buffer=line._buffer)
|
|
71
72
|
else:
|
|
72
73
|
self._original_line = line
|
|
73
74
|
self.line = line
|
|
@@ -136,6 +137,11 @@ class LossLocationRefinement:
|
|
|
136
137
|
i_aper_0 = self.i_apertures[self.i_apertures.index(i_ap) - 1]
|
|
137
138
|
logger.debug(f'i_aper_1={i_aper_1}, i_aper_0={i_aper_0}')
|
|
138
139
|
|
|
140
|
+
for ii in range(i_aper_0, i_aper_1):
|
|
141
|
+
ee = self._original_line[ii]
|
|
142
|
+
if _skip_in_loss_location_refinement(ee, self._original_line):
|
|
143
|
+
return
|
|
144
|
+
|
|
139
145
|
s0, s1, _ = generate_interp_aperture_locations(self.line,
|
|
140
146
|
i_aper_0, i_aper_1, self.ds)
|
|
141
147
|
assert s1 >= s0
|
|
@@ -312,10 +318,8 @@ def interp_aperture_replicate(context, line,
|
|
|
312
318
|
i_aper_0, i_aper_1,
|
|
313
319
|
ds, _ln_gen, mode='end',):
|
|
314
320
|
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
i_start_thin_1 = find_adjacent_drift(line, i_aper_1, direction='upstream') + 1
|
|
318
|
-
i_end_thin_0 = find_adjacent_drift(line, i_aper_0, direction='downstream') - 1
|
|
321
|
+
i_start_thin_1 = find_adjacent_thick(line, i_aper_1, direction='upstream') + 1
|
|
322
|
+
i_end_thin_0 = find_adjacent_thick(line, i_aper_0, direction='downstream') - 1
|
|
319
323
|
|
|
320
324
|
s0, s1, s_vect = generate_interp_aperture_locations(line,
|
|
321
325
|
i_aper_0, i_aper_1, ds)
|
|
@@ -328,13 +332,13 @@ def interp_aperture_replicate(context, line,
|
|
|
328
332
|
raise ValueError(f'Invalid mode: {mode}')
|
|
329
333
|
interp_apertures = []
|
|
330
334
|
for ss in s_vect:
|
|
331
|
-
interp_apertures.append(aper_to_copy.copy(_buffer=
|
|
335
|
+
interp_apertures.append(aper_to_copy.copy(_buffer=line._buffer))
|
|
332
336
|
|
|
333
337
|
interp_line = build_interp_line(
|
|
334
|
-
_buffer=
|
|
338
|
+
_buffer=line._buffer,
|
|
335
339
|
s0=s0, s1=s1, s_interp=s_vect,
|
|
336
|
-
aper_0=aper_to_copy.copy(_buffer=
|
|
337
|
-
aper_1=aper_to_copy.copy(_buffer=
|
|
340
|
+
aper_0=aper_to_copy.copy(_buffer=line._buffer),
|
|
341
|
+
aper_1=aper_to_copy.copy(_buffer=line._buffer),
|
|
338
342
|
aper_interp=interp_apertures,
|
|
339
343
|
line=line, i_start_thin_0=i_end_thin_0,
|
|
340
344
|
i_start_thin_1=i_start_thin_1,
|
|
@@ -346,16 +350,15 @@ def interp_aperture_using_polygons(context, line,
|
|
|
346
350
|
i_aper_0, i_aper_1,
|
|
347
351
|
n_theta, r_max, dr, ds, _ln_gen):
|
|
348
352
|
|
|
349
|
-
temp_buf = context.new_buffer()
|
|
350
353
|
|
|
351
354
|
polygon_1, i_start_thin_1 = characterize_aperture(line,
|
|
352
355
|
i_aper_1, n_theta, r_max, dr,
|
|
353
|
-
buffer_for_poly=
|
|
356
|
+
buffer_for_poly=line._buffer,
|
|
354
357
|
coming_from='upstream')
|
|
355
358
|
|
|
356
359
|
polygon_0, i_end_thin_0 = characterize_aperture(line, i_aper_0,
|
|
357
360
|
n_theta, r_max, dr,
|
|
358
|
-
buffer_for_poly=
|
|
361
|
+
buffer_for_poly=line._buffer,
|
|
359
362
|
coming_from='downstream')
|
|
360
363
|
|
|
361
364
|
s0, s1, s_vect = generate_interp_aperture_locations(line,
|
|
@@ -373,12 +376,12 @@ def interp_aperture_using_polygons(context, line,
|
|
|
373
376
|
x_hull = x_non_convex[i_hull]
|
|
374
377
|
y_hull = y_non_convex[i_hull]
|
|
375
378
|
interp_polygons.append(LimitPolygon(
|
|
376
|
-
_buffer=
|
|
379
|
+
_buffer=line._buffer,
|
|
377
380
|
x_vertices=x_hull,
|
|
378
381
|
y_vertices=y_hull))
|
|
379
382
|
|
|
380
383
|
interp_line = build_interp_line(
|
|
381
|
-
_buffer=
|
|
384
|
+
_buffer=line._buffer,
|
|
382
385
|
s0=s0, s1=s1, s_interp=s_vect,
|
|
383
386
|
aper_0=polygon_0, aper_1=polygon_1,
|
|
384
387
|
aper_interp=interp_polygons,
|
|
@@ -401,47 +404,60 @@ def generate_interp_aperture_locations(line, i_aper_0, i_aper_1, ds):
|
|
|
401
404
|
|
|
402
405
|
return s0, s1, s_vect
|
|
403
406
|
|
|
407
|
+
class InterpAperNameGenerator:
|
|
408
|
+
def __init__(self, line):
|
|
409
|
+
self.counter = 0
|
|
410
|
+
self.line = line
|
|
411
|
+
|
|
412
|
+
def get_name(self):
|
|
413
|
+
nn_insert = f'_interp_aper_{self.counter}'
|
|
414
|
+
while nn_insert in self.line.element_names:
|
|
415
|
+
self.counter += 1
|
|
416
|
+
nn_insert = f'_interp_aper_{self.counter}'
|
|
417
|
+
name = nn_insert
|
|
418
|
+
self.counter += 1
|
|
419
|
+
return name
|
|
420
|
+
|
|
404
421
|
def build_interp_line(_buffer, s0, s1, s_interp, aper_0, aper_1, aper_interp,
|
|
405
422
|
line, i_start_thin_0, i_start_thin_1, _ln_gen):
|
|
406
423
|
|
|
407
|
-
|
|
408
|
-
s_elements = [s0] + list(s_interp) +[s1]
|
|
409
|
-
elements = [aper_0] + aper_interp + [aper_1]
|
|
424
|
+
env = line.env
|
|
410
425
|
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
if not _behaves_like_drift(ee, line):
|
|
414
|
-
assert not _is_thick(ee, line)
|
|
415
|
-
ss_ee = line.tracker._tracker_data_base.element_s_locations[i_ele]
|
|
416
|
-
elements.append(ee.copy(_buffer=_buffer))
|
|
417
|
-
s_elements.append(ss_ee)
|
|
418
|
-
i_sorted = np.argsort(s_elements)
|
|
419
|
-
s_sorted = list(np.take(s_elements, i_sorted))
|
|
420
|
-
ele_sorted = list(np.take(elements, i_sorted))
|
|
426
|
+
interp_line = env.new_line(
|
|
427
|
+
components=line.element_names[i_start_thin_0+1 : i_start_thin_1])
|
|
421
428
|
|
|
422
|
-
|
|
423
|
-
|
|
429
|
+
namegen = InterpAperNameGenerator(line=interp_line)
|
|
430
|
+
nn0 = namegen.get_name()
|
|
424
431
|
|
|
425
|
-
|
|
426
|
-
|
|
432
|
+
# Start aperture
|
|
433
|
+
assert aper_0._buffer is _buffer
|
|
434
|
+
env.elements[nn0] = aper_0
|
|
435
|
+
interp_line.element_names.insert(0, nn0)
|
|
427
436
|
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
437
|
+
# Interpolated apertures
|
|
438
|
+
insertions = []
|
|
439
|
+
for ss, aa in zip(s_interp, aper_interp):
|
|
440
|
+
nn_insert = namegen.get_name()
|
|
441
|
+
assert aa._buffer is _buffer
|
|
442
|
+
interp_line.env.elements[nn_insert] = aa
|
|
443
|
+
insertions.append(interp_line.env.place(nn_insert, at=ss-s0))
|
|
444
|
+
interp_line.insert(insertions)
|
|
433
445
|
|
|
434
|
-
|
|
446
|
+
# End aperture
|
|
447
|
+
nn_1 = namegen.get_name()
|
|
448
|
+
assert aper_1._buffer is _buffer
|
|
449
|
+
interp_line.env.elements[nn_1] = aper_1
|
|
450
|
+
interp_line.element_names.append(nn_1)
|
|
435
451
|
|
|
452
|
+
# Build it
|
|
436
453
|
interp_line.build_tracker(_buffer=_buffer,
|
|
437
454
|
track_kernel=_ln_gen.tracker.track_kernel)
|
|
438
455
|
interp_line.reset_s_at_end_turn = False
|
|
439
456
|
interp_line.config.XTRACK_GLOBAL_XY_LIMIT = _ln_gen.config.XTRACK_GLOBAL_XY_LIMIT
|
|
440
457
|
|
|
441
|
-
|
|
442
458
|
return interp_line
|
|
443
459
|
|
|
444
|
-
def
|
|
460
|
+
def find_adjacent_thick(line, i_element, direction):
|
|
445
461
|
|
|
446
462
|
ii=i_element
|
|
447
463
|
found = False
|
|
@@ -454,18 +470,14 @@ def find_adjacent_drift(line, i_element, direction):
|
|
|
454
470
|
ee = line.element_dict[line.element_names[ii]]
|
|
455
471
|
if isinstance(ee, xt.Replica):
|
|
456
472
|
ee = ee.resolve(line)
|
|
457
|
-
|
|
458
|
-
#_print(ccnn)
|
|
459
|
-
if ccnn.startswith('Drift'):
|
|
460
|
-
found = True
|
|
461
|
-
elif _behaves_like_drift(ee, line):
|
|
473
|
+
if _is_thick(ee, line):
|
|
462
474
|
found = True
|
|
463
475
|
else:
|
|
464
476
|
ii += increment
|
|
465
477
|
|
|
466
478
|
return ii
|
|
467
479
|
|
|
468
|
-
def
|
|
480
|
+
def find_previous_thick(line, i_aperture):
|
|
469
481
|
|
|
470
482
|
ii=i_aperture
|
|
471
483
|
found = False
|
|
@@ -473,10 +485,7 @@ def find_previous_drift(line, i_aperture):
|
|
|
473
485
|
ee = line.element_dict[line.element_names[ii]]
|
|
474
486
|
if isinstance(ee, xt.Replica):
|
|
475
487
|
ee = ee.resolve(line)
|
|
476
|
-
|
|
477
|
-
if ccnn == 'Drift':
|
|
478
|
-
found = True
|
|
479
|
-
elif _behaves_like_drift(ee, line):
|
|
488
|
+
if _is_thick(ee, line):
|
|
480
489
|
found = True
|
|
481
490
|
else:
|
|
482
491
|
ii -= 1
|
|
@@ -493,14 +502,14 @@ def characterize_aperture(line, i_aperture, n_theta, r_max, dr,
|
|
|
493
502
|
|
|
494
503
|
assert coming_from in ['upstream', 'downstream']
|
|
495
504
|
|
|
496
|
-
# find previous
|
|
505
|
+
# find previous thick
|
|
497
506
|
if coming_from == 'upstream':
|
|
498
|
-
i_start =
|
|
507
|
+
i_start = find_adjacent_thick(line, i_aperture, 'upstream') + 1
|
|
499
508
|
i_stop = i_aperture + 1
|
|
500
509
|
backtrack = False
|
|
501
510
|
index_start_thin = i_start
|
|
502
511
|
elif coming_from == 'downstream':
|
|
503
|
-
i_stop =
|
|
512
|
+
i_stop = find_adjacent_thick(line, i_aperture, 'downstream')
|
|
504
513
|
i_start = i_aperture
|
|
505
514
|
backtrack = 'force'
|
|
506
515
|
assert np.all([_has_backtrack(ee, line) for ee in
|
|
@@ -6,7 +6,7 @@ from .general import _print
|
|
|
6
6
|
import xtrack as xt
|
|
7
7
|
import xobjects as xo
|
|
8
8
|
|
|
9
|
-
def compensate_radiation_energy_loss(line, delta0='
|
|
9
|
+
def compensate_radiation_energy_loss(line, delta0='zero_mean', rtol_eneloss=1e-12,
|
|
10
10
|
max_iter=100, verbose=True,
|
|
11
11
|
co_search_at=None,
|
|
12
12
|
**kwargs):
|
xtrack-0.86.3/xtrack/_version.py
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = '0.86.3'
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|