xtrack 0.98.4__tar.gz → 0.98.6__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.98.4/xtrack.egg-info → xtrack-0.98.6}/PKG-INFO +1 -1
- {xtrack-0.98.4 → xtrack-0.98.6}/tests/test_environment.py +146 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/tests/test_madnginterface.py +16 -0
- xtrack-0.98.6/xtrack/_version.py +1 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/builder.py +91 -31
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/environment.py +15 -13
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/madng_interface.py +4 -4
- {xtrack-0.98.4 → xtrack-0.98.6/xtrack.egg-info}/PKG-INFO +1 -1
- xtrack-0.98.4/xtrack/_version.py +0 -1
- {xtrack-0.98.4 → xtrack-0.98.6}/LICENSE +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/MANIFEST.in +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/README.md +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/ducktrack/__init__.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/ducktrack/base_classes.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/ducktrack/be_beamfields/BB6D.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/ducktrack/be_beamfields/BB6Ddata.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/ducktrack/be_beamfields/__init__.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/ducktrack/be_beamfields/beambeam.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/ducktrack/be_beamfields/boost.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/ducktrack/be_beamfields/gaussian_fields.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/ducktrack/be_beamfields/propagate_sigma_matrix.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/ducktrack/be_beamfields/qgauss.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/ducktrack/be_beamfields/slicing.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/ducktrack/be_beamfields/spacecharge.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/ducktrack/elements.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/ducktrack/line.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/ducktrack/mathlibs.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/ducktrack/particles.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/ducktrack/temp_pyparticles.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/pyproject.toml +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/setup.cfg +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/setup.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/tests/test_acceleration.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/tests/test_acdipole.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/tests/test_acdipole_twiss.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/tests/test_amplitude_detuning.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/tests/test_aperture_polygon.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/tests/test_aperture_table.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/tests/test_aperture_turn_ele_and_monitor.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/tests/test_apertures.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/tests/test_attr_replicas_and_slices.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/tests/test_boris_spatial.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/tests/test_bucket_with_ref_energy_change.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/tests/test_cavity_absolute_time.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/tests/test_chromatic_functions_vs_madx.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/tests/test_coasting.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/tests/test_collective_tracker.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/tests/test_collimation.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/tests/test_coupling_edwards_teng.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/tests/test_electron_cooler.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/tests/test_element_characterization_functions.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/tests/test_element_internal_record.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/tests/test_elements.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/tests/test_elements_classflags.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/tests/test_elements_thick.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/tests/test_fcc_ee_solenoid_correction.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/tests/test_fcc_ee_solenoid_correction_new_optimize_api.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/tests/test_footprint.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/tests/test_freeze_longitudinal.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/tests/test_full_rings.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/tests/test_h6_sps_beamline.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/tests/test_hvkick.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/tests/test_ions.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/tests/test_json.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/tests/test_lhc_env.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/tests/test_lhc_match_phase_15.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/tests/test_line.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/tests/test_load.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/tests/test_load_vars.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/tests/test_lumi.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/tests/test_mad_writer.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/tests/test_madloader.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/tests/test_magnet.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/tests/test_match_and_track_from_element.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/tests/test_match_coupling_knob.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/tests/test_match_nested.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/tests/test_match_optics_and_ip_knob.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/tests/test_match_optics_and_ip_knob_new_optimize_api.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/tests/test_match_orbit_bump.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/tests/test_match_tune_chroma_cminus.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/tests/test_misalign.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/tests/test_monitor.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/tests/test_multi_bunch_gauss.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/tests/test_multiline.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/tests/test_multisetter.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/tests/test_multispecies.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/tests/test_native_madloader.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/tests/test_native_madloader_lhc.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/tests/test_native_madloader_lhc_thin.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/tests/test_native_madloader_ps.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/tests/test_native_madloader_sps.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/tests/test_native_madloader_ti2.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/tests/test_optimize_for_tracking.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/tests/test_particles.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/tests/test_particles_basics.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/tests/test_particles_pdg.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/tests/test_pipeline.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/tests/test_prebuild_kernels.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/tests/test_ps_against_ptc.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/tests/test_ps_multiturn_twiss.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/tests/test_psb_chicane.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/tests/test_pyht_interface.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/tests/test_quadrupole_fringe_ptc.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/tests/test_quadrupole_wedge.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/tests/test_radial_steering.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/tests/test_radiation.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/tests/test_radiation_equilibrium_emittances.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/tests/test_radiation_equilibrium_emittances_thick.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/tests/test_radiation_integrals.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/tests/test_random_gen.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/tests/test_random_gen_exp.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/tests/test_random_gen_gauss.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/tests/test_random_gen_ruth.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/tests/test_rbend_straight_body.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/tests/test_rf_track.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/tests/test_rotation_signs.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/tests/test_second_order_taylor_map.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/tests/test_seeds.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/tests/test_slice_and_insert_with_replicas.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/tests/test_slice_elements.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/tests/test_slicing.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/tests/test_solenoid_bz_map_vs_boris.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/tests/test_solenoid_bz_map_vs_boris_legacy.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/tests/test_spacecharge_in_ring.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/tests/test_spin.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/tests/test_sps_thick_cpymad_loader.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/tests/test_sps_thick_native_loader.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/tests/test_survey.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/tests/test_tapering.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/tests/test_thick_kickers_rf_crab.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/tests/test_thick_lhc.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/tests/test_tilt_shifts.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/tests/test_tracker.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/tests/test_trajectory_correcton.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/tests/test_twiss.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/tests/test_twiss_to_file.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/tests/test_twiss_vs_madx_psb.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/tests/test_vs_madx.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/tests/test_xmask_orbit_correction.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/__init__.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/_temp/__init__.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/_temp/boris_and_solenoid_map/__init__.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/_temp/boris_and_solenoid_map/boris.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/_temp/boris_and_solenoid_map/solenoid_field.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/_temp/lhc_match/__init__.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/_temp/lhc_match/gen_madx_optics_file.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/_temp/lhc_match/lhc_match.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/_temp/lhc_match/var_limits.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/_temp/python_lattice_writer/__init__.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/_temp/python_lattice_writer/lattice_py_generation.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/aperture_meas.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/base_element.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/__init__.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/acdipole.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/apertures.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/apertures_src/limitellipse.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/apertures_src/limitpolygon.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/apertures_src/limitracetrack.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/apertures_src/limitrect.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/apertures_src/limitrectellipse.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/apertures_src/longitudinallimitrect.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/beam_interaction.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/elements.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/elements_src/_generate_slice_elements_c_code.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/elements_src/_include_integrator.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/elements_src/acdipole.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/elements_src/bend.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/elements_src/cavity.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/elements_src/crab_cavity.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/elements_src/default_magnet_config.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/elements_src/dipole_fringe.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/elements_src/dipoleedge.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/elements_src/drift.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/elements_src/drift_exact.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/elements_src/drift_exact_slice.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/elements_src/drift_slice.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/elements_src/drift_slice_bend.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/elements_src/drift_slice_cavity.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/elements_src/drift_slice_crab_cavity.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/elements_src/drift_slice_multipole.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/elements_src/drift_slice_octupole.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/elements_src/drift_slice_quadrupole.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/elements_src/drift_slice_rbend.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/elements_src/drift_slice_sextupole.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/elements_src/drift_slice_uniform_solenoid.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/elements_src/electroncooler.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/elements_src/elens.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/elements_src/exciter.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/elements_src/firstordertaylormap.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/elements_src/legacy_solenoid.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/elements_src/linesegmentmap.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/elements_src/magnet.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/elements_src/magnet_drift.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/elements_src/magnet_edge.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/elements_src/magnet_kick.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/elements_src/marker.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/elements_src/misalignment.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/elements_src/multipole.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/elements_src/multipoleedge.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/elements_src/nonlinearlens.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/elements_src/octupole.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/elements_src/quadrupole.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/elements_src/rbend.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/elements_src/referenceenergyincrease.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/elements_src/rfmultipole.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/elements_src/second_order_taylor_map.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/elements_src/sextupole.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/elements_src/simplethinbend.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/elements_src/simplethinquadrupole.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/elements_src/slnd.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/elements_src/srotation.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/elements_src/temprf.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/elements_src/thick_slice_bend.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/elements_src/thick_slice_cavity.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/elements_src/thick_slice_crab_cavity.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/elements_src/thick_slice_multipole.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/elements_src/thick_slice_octupole.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/elements_src/thick_slice_quadrupole.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/elements_src/thick_slice_rbend.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/elements_src/thick_slice_sextupole.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/elements_src/thick_slice_uniform_solenoid.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/elements_src/thin_slice_bend.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/elements_src/thin_slice_bend_entry.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/elements_src/thin_slice_bend_exit.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/elements_src/thin_slice_cavity.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/elements_src/thin_slice_crab_cavity.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/elements_src/thin_slice_multipole.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/elements_src/thin_slice_octupole.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/elements_src/thin_slice_octupole_entry.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/elements_src/thin_slice_octupole_exit.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/elements_src/thin_slice_quadrupole.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/elements_src/thin_slice_quadrupole_entry.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/elements_src/thin_slice_quadrupole_exit.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/elements_src/thin_slice_rbend.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/elements_src/thin_slice_rbend_entry.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/elements_src/thin_slice_rbend_exit.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/elements_src/thin_slice_sextupole.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/elements_src/thin_slice_sextupole_entry.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/elements_src/thin_slice_sextupole_exit.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/elements_src/thin_slice_uniform_solenoid_entry.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/elements_src/thin_slice_uniform_solenoid_exit.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/elements_src/track_acdipole.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/elements_src/track_dipole_edge_linear.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/elements_src/track_dipole_edge_nonlinear.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/elements_src/track_dipole_fringe.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/elements_src/track_drift.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/elements_src/track_legacy_solenoid.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/elements_src/track_legacy_solenoid_multipolar_components.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/elements_src/track_legacy_solenoid_radiation.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/elements_src/track_magnet.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/elements_src/track_magnet.template.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/elements_src/track_magnet_configure.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/elements_src/track_magnet_drift.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/elements_src/track_magnet_edge.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/elements_src/track_magnet_kick.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/elements_src/track_magnet_radiation.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/elements_src/track_misalignments.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/elements_src/track_mult_fringe.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/elements_src/track_rf.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/elements_src/track_rf.template.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/elements_src/track_srotation.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/elements_src/track_thick_bend.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/elements_src/track_thick_cfd.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/elements_src/track_wedge.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/elements_src/track_xrotation.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/elements_src/track_xyshift.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/elements_src/track_yrotation.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/elements_src/variable_solenoid.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/elements_src/wedge.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/elements_src/wire.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/elements_src/xrotation.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/elements_src/xyshift.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/elements_src/yrotation.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/elements_src/zetashift.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/exciter.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/rft_element.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/slice_base.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/slice_elements_drift.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/slice_elements_edge.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/slice_elements_thick.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/beam_elements/slice_elements_thin.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/boris.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/footprint.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/functions.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/general.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/headers/atomicadd.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/headers/checks.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/headers/constants.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/headers/particle_states.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/headers/synrad_spectrum.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/headers/track.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/headers/track_local_particle_with_transformations.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/internal_record.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/json.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/line.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/linear_normal_form.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/load.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/loss_location_refinement/__init__.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/loss_location_refinement/loss_location_refinement.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/lumi.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/mad_loader.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/mad_parser/__init__.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/mad_parser/loader.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/mad_parser/madx.lark +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/mad_parser/parse.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/mad_writer.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/match.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/monitors/__init__.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/monitors/beam_position_monitor.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/monitors/beam_position_monitor.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/monitors/beam_profile_monitor.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/monitors/beam_profile_monitor.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/monitors/beam_size_monitor.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/monitors/beam_size_monitor.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/monitors/last_turns_monitor.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/monitors/last_turns_monitor.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/monitors/particles_monitor.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/monitors/particles_monitor.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/multiline.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/multiline_legacy/__init__.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/multiline_legacy/multiline_legacy.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/multiline_legacy/shared_knobs.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/multisetter/__init__.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/multisetter/multisetter.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/multisetter/multisetter.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/particles/__init__.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/particles/constants.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/particles/local_particle_custom_api.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/particles/masses.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/particles/particles.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/particles/pdg.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/particles/rng_src/base_rng.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/particles/rng_src/particles_rng.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/pipeline/__init__.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/pipeline/core.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/pipeline/manager.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/pipeline/multitracker.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/prebuilt_kernel_definitions/__init__.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/prebuilt_kernel_definitions/element_inits.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/prebuilt_kernel_definitions/element_types.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/progress_indicator.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/random/__init__.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/random/random_generators.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/random/random_src/exponential.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/random/random_src/exponential_integral_Ei.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/random/random_src/normal.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/random/random_src/rutherford.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/random/random_src/uniform.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/random/random_src/uniform_accurate.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/slicing.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/survey.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/svgutils/__init__.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/svgutils/parser.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/svgutils/path.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/svgutils/svgutils.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/synctime.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/table.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/tapering.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/targets.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/track_flags.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/tracker.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/tracker_data.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/tracker_src/tracker.h +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/trajectory_correction.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/twiss.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/twissplot.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack/view.py +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack.egg-info/SOURCES.txt +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack.egg-info/dependency_links.txt +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack.egg-info/entry_points.txt +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack.egg-info/requires.txt +0 -0
- {xtrack-0.98.4 → xtrack-0.98.6}/xtrack.egg-info/top_level.txt +0 -0
|
@@ -4339,3 +4339,149 @@ def test_str_in_composer_to_dict_from_dict():
|
|
|
4339
4339
|
assert line2.composer.components[0].at == 2
|
|
4340
4340
|
assert line2.composer.components[1] == 'q1'
|
|
4341
4341
|
assert line2.composer.components[2] == 'q1'
|
|
4342
|
+
|
|
4343
|
+
def test_sandwitch_thin_elements():
|
|
4344
|
+
|
|
4345
|
+
# Create an environment
|
|
4346
|
+
env = xt.Environment()
|
|
4347
|
+
|
|
4348
|
+
env.new('m0', xt.Marker)
|
|
4349
|
+
env.new('m1', xt.Marker)
|
|
4350
|
+
env.new('m2', xt.Marker)
|
|
4351
|
+
env.new('m3', xt.Marker)
|
|
4352
|
+
env.new('m4', xt.Marker)
|
|
4353
|
+
env.new('m5', xt.Marker)
|
|
4354
|
+
env.new('m6', xt.Marker)
|
|
4355
|
+
env.new('m7', xt.Marker)
|
|
4356
|
+
env.new('m8', xt.Marker)
|
|
4357
|
+
env.new('m9', xt.Marker)
|
|
4358
|
+
env.new('m10', xt.Marker)
|
|
4359
|
+
|
|
4360
|
+
env.new_line(name='myline', compose=True)
|
|
4361
|
+
composer = env['myline'].composer
|
|
4362
|
+
|
|
4363
|
+
composer.components.extend([
|
|
4364
|
+
env.place('m0'),
|
|
4365
|
+
env.place('m3', at=10.),
|
|
4366
|
+
env.place(['m1', 'm2']),
|
|
4367
|
+
env.place(['m6', 'm7'], at='m3@end'),
|
|
4368
|
+
env.place(['m4', 'm5'], at='m3@start'),
|
|
4369
|
+
env.place('m8', at=10, from_='m0'),
|
|
4370
|
+
env.place('m9', at=20.),
|
|
4371
|
+
env.place('m10', at=-10, from_='m9'),
|
|
4372
|
+
])
|
|
4373
|
+
|
|
4374
|
+
tt_unsorted = composer.resolve_s_positions(sort=False)
|
|
4375
|
+
tt_unsorted.cols['s from_ from_anchor'].show()
|
|
4376
|
+
# prints:
|
|
4377
|
+
# name s from_ from_anchor
|
|
4378
|
+
# m0 0 None None
|
|
4379
|
+
# m3 10 None None
|
|
4380
|
+
# m1 10 m3 end
|
|
4381
|
+
# m2 10 m1 end
|
|
4382
|
+
# m6 10 m3 end
|
|
4383
|
+
# m7 10 m6 end
|
|
4384
|
+
# m4 10 m3 start
|
|
4385
|
+
# m5 10 m4 end
|
|
4386
|
+
# m8 10 m0 None
|
|
4387
|
+
# m9 20 None None
|
|
4388
|
+
# m10 10 m9 None
|
|
4389
|
+
|
|
4390
|
+
assert np.all(tt_unsorted.name == [
|
|
4391
|
+
'm0', 'm3', 'm1', 'm2', 'm6', 'm7', 'm4', 'm5', 'm8', 'm9', 'm10'
|
|
4392
|
+
])
|
|
4393
|
+
xo.assert_allclose(tt_unsorted.s, [
|
|
4394
|
+
0., 10., 10., 10., 10., 10., 10., 10., 10., 20., 10.])
|
|
4395
|
+
assert np.all(tt_unsorted.from_ == [
|
|
4396
|
+
None, None, 'm3', 'm1', 'm3', 'm6', 'm3', 'm4', 'm0', None, 'm9'
|
|
4397
|
+
])
|
|
4398
|
+
assert np.all(tt_unsorted.from_anchor == [
|
|
4399
|
+
None, None, 'end', 'end', 'end', 'end', 'start', 'end', None, None, None
|
|
4400
|
+
])
|
|
4401
|
+
|
|
4402
|
+
tt_sorted = composer.resolve_s_positions(sort=True)
|
|
4403
|
+
tt_sorted.cols['s from_ from_anchor'].show()
|
|
4404
|
+
# prints:
|
|
4405
|
+
# name s from_ from_anchor
|
|
4406
|
+
# m0 0 None None
|
|
4407
|
+
# m8 10 m0 None
|
|
4408
|
+
# m4 10 m3 start
|
|
4409
|
+
# m5 10 m4 end
|
|
4410
|
+
# m3 10 None None
|
|
4411
|
+
# m1 10 m3 end
|
|
4412
|
+
# m2 10 m1 end
|
|
4413
|
+
# m6 10 m3 end
|
|
4414
|
+
# m7 10 m6 end
|
|
4415
|
+
# m10 10 m9 None
|
|
4416
|
+
# m9 20 None None
|
|
4417
|
+
|
|
4418
|
+
assert np.all(tt_sorted.name == [
|
|
4419
|
+
'm0', 'm8', 'm4', 'm5', 'm3', 'm1', 'm2', 'm6', 'm7', 'm10', 'm9'
|
|
4420
|
+
])
|
|
4421
|
+
xo.assert_allclose(tt_sorted.s, [
|
|
4422
|
+
0., 10., 10., 10., 10., 10., 10., 10., 10., 10., 20.])
|
|
4423
|
+
assert np.all(tt_sorted.from_ == [
|
|
4424
|
+
None, 'm0', 'm3', 'm4', None, 'm3', 'm1', 'm3', 'm6', 'm9', None
|
|
4425
|
+
])
|
|
4426
|
+
assert np.all(tt_sorted.from_anchor == [
|
|
4427
|
+
None, None, 'start', 'end', None, 'end', 'end', 'end', 'end', None, None
|
|
4428
|
+
])
|
|
4429
|
+
|
|
4430
|
+
def test_sandwitch_thin_elements_insert():
|
|
4431
|
+
|
|
4432
|
+
env = xt.Environment()
|
|
4433
|
+
|
|
4434
|
+
# Create a line with two quadrupoles and a marker
|
|
4435
|
+
line = env.new_line(name='myline', components=[
|
|
4436
|
+
env.new('q0', xt.Quadrupole, length=2.0, at=10.),
|
|
4437
|
+
env.new('q1', xt.Quadrupole, length=2.0, at=20.),
|
|
4438
|
+
env.new('m0', xt.Marker, at=40.),
|
|
4439
|
+
])
|
|
4440
|
+
|
|
4441
|
+
# Create a set of new elements to be placed
|
|
4442
|
+
env.new('s1', xt.Sextupole, length=0.1, k2=0.2)
|
|
4443
|
+
env.new('s2', xt.Sextupole, length=0.1, k2=-0.2)
|
|
4444
|
+
env.new('m1', xt.Marker)
|
|
4445
|
+
env.new('m2', xt.Marker)
|
|
4446
|
+
env.new('m3', xt.Marker)
|
|
4447
|
+
|
|
4448
|
+
# Insert the new elements in the line
|
|
4449
|
+
line.insert([
|
|
4450
|
+
env.place('s1', at=5.),
|
|
4451
|
+
env.place('s2', anchor='end', at=-5., from_='q1@start'),
|
|
4452
|
+
env.place(['m1', 'm2'], at='m0@start'),
|
|
4453
|
+
env.place('m3', at='m0@end'),
|
|
4454
|
+
])
|
|
4455
|
+
|
|
4456
|
+
tt = line.get_table()
|
|
4457
|
+
tt.show(cols=['s_start', 's_center', 's_end'])
|
|
4458
|
+
# is:
|
|
4459
|
+
# name s_start s_center s_end
|
|
4460
|
+
# ||drift_4 0 2.475 4.95
|
|
4461
|
+
# s1 4.95 5 5.05
|
|
4462
|
+
# ||drift_6 5.05 7.025 9
|
|
4463
|
+
# q0 9 10 11
|
|
4464
|
+
# ||drift_7 11 12.45 13.9
|
|
4465
|
+
# s2 13.9 13.95 14
|
|
4466
|
+
# ||drift_8 14 16.5 19
|
|
4467
|
+
# q1 19 20 21
|
|
4468
|
+
# ||drift_3 21 30.5 40
|
|
4469
|
+
# m1 40 40 40
|
|
4470
|
+
# m2 40 40 40
|
|
4471
|
+
# m0 40 40 40
|
|
4472
|
+
# m3 40 40 40
|
|
4473
|
+
# _end_point 40 40 40
|
|
4474
|
+
|
|
4475
|
+
assert np.all(tt.name == [
|
|
4476
|
+
'||drift_4', 's1', '||drift_6', 'q0', '||drift_7', 's2',
|
|
4477
|
+
'||drift_8', 'q1', '||drift_3', 'm1', 'm2', 'm0', 'm3', '_end_point'
|
|
4478
|
+
])
|
|
4479
|
+
xo.assert_allclose(tt.s_start, [
|
|
4480
|
+
0., 4.95, 5.05, 9., 11., 13.9, 14., 19., 21., 40., 40., 40., 40., 40.],
|
|
4481
|
+
atol=1e-14)
|
|
4482
|
+
xo.assert_allclose(tt.s_center, [
|
|
4483
|
+
2.475, 5., 7.025, 10., 12.45, 13.95, 16.5, 20., 30.5, 40., 40., 40., 40., 40.],
|
|
4484
|
+
atol=1e-14)
|
|
4485
|
+
xo.assert_allclose(tt.s_end, [
|
|
4486
|
+
4.95, 5.05, 9., 11., 13.9, 14., 19., 21., 40., 40., 40., 40., 40., 40.],
|
|
4487
|
+
atol=1e-14)
|
|
@@ -324,3 +324,19 @@ def test_madng_slices():
|
|
|
324
324
|
xo.assert_allclose(twng_ip.wy_ng, twng_ip_sliced.wy_ng, rtol=1e-3)
|
|
325
325
|
xo.assert_allclose(twng_ip.dx_ng, twng_ip_sliced.dx_ng, atol=1e-6)
|
|
326
326
|
xo.assert_allclose(twng_ip.dy_ng, twng_ip_sliced.dy_ng, atol=1e-6)
|
|
327
|
+
|
|
328
|
+
def test_madng_interface_amplitude_detuning_and_second_order_chrom():
|
|
329
|
+
line = xt.load(test_data_folder /
|
|
330
|
+
'hllhc15_thick/lhc_thick_with_knobs.json')
|
|
331
|
+
|
|
332
|
+
twng = line.madng_twiss()
|
|
333
|
+
det = line.get_amplitude_detuning_coefficients(num_turns=512)
|
|
334
|
+
|
|
335
|
+
xo.assert_allclose(twng.dqxdjx_nf_ng, det['det_xx'], rtol=7e-2)
|
|
336
|
+
xo.assert_allclose(twng.dqydjy_nf_ng, det['det_yy'], rtol=7e-2)
|
|
337
|
+
xo.assert_allclose(twng.dqxdjy_nf_ng, det['det_xy'], rtol=7e-2)
|
|
338
|
+
xo.assert_allclose(twng.dqydjx_nf_ng, det['det_yx'], rtol=7e-2)
|
|
339
|
+
|
|
340
|
+
tw = line.twiss4d()
|
|
341
|
+
xo.assert_allclose(tw.ddqx, twng.d2q1_nf_ng, rtol=1e-2)
|
|
342
|
+
xo.assert_allclose(tw.ddqy, twng.d2q2_nf_ng, rtol=1e-2)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = '0.98.6'
|
|
@@ -122,7 +122,7 @@ class Builder:
|
|
|
122
122
|
def __len__(self):
|
|
123
123
|
return len(self.components)
|
|
124
124
|
|
|
125
|
-
def resolve_s_positions(self):
|
|
125
|
+
def resolve_s_positions(self, sort=True):
|
|
126
126
|
components = self.components
|
|
127
127
|
if components is None:
|
|
128
128
|
components = []
|
|
@@ -132,6 +132,8 @@ class Builder:
|
|
|
132
132
|
|
|
133
133
|
seq_all_places = _all_places(flattened_components)
|
|
134
134
|
tab_unsorted = _resolve_s_positions(seq_all_places, self.env, refer=self.refer)
|
|
135
|
+
if not sort:
|
|
136
|
+
return tab_unsorted
|
|
135
137
|
tab_sorted = _sort_places(tab_unsorted)
|
|
136
138
|
return tab_sorted
|
|
137
139
|
|
|
@@ -440,6 +442,7 @@ def _resolve_s_positions(seq_all_places, env, refer='center',
|
|
|
440
442
|
tt_out['s_start'] = aux_s_start
|
|
441
443
|
tt_out['s_center'] = aux_s_center
|
|
442
444
|
tt_out['s_end'] = aux_s_end
|
|
445
|
+
tt_out['s']= aux_s_start
|
|
443
446
|
|
|
444
447
|
tt_out['from_'] = np.array([ss.from_ for ss in seq_all_places])
|
|
445
448
|
tt_out['from_anchor'] = np.array([ss.from_anchor for ss in seq_all_places])
|
|
@@ -455,6 +458,8 @@ def _sort_places(tt_unsorted, s_tol=1e-10, allow_non_existent_from=False):
|
|
|
455
458
|
iii = _argsort_s(tt_unsorted.s_center, tol=s_tol)
|
|
456
459
|
tt_s_sorted = tt_unsorted.rows[iii]
|
|
457
460
|
|
|
461
|
+
# Identify groups of elements with s_center with the same s position
|
|
462
|
+
# (basically thin elements, if not overlapping)
|
|
458
463
|
group_id = np.zeros(len(tt_s_sorted), dtype=int)
|
|
459
464
|
group_id[0] = 0
|
|
460
465
|
for ii in range(1, len(tt_s_sorted)):
|
|
@@ -473,17 +478,23 @@ def _sort_places(tt_unsorted, s_tol=1e-10, allow_non_existent_from=False):
|
|
|
473
478
|
# at each iteration.
|
|
474
479
|
ind_name = {nn: ii for ii, nn in enumerate(tt_s_sorted.name)}
|
|
475
480
|
|
|
481
|
+
# Sort elements within each group
|
|
476
482
|
n_places = len(tt_s_sorted)
|
|
477
483
|
i_start_group = 0
|
|
478
484
|
i_place_sorted = []
|
|
479
485
|
while i_start_group < n_places:
|
|
486
|
+
|
|
487
|
+
# Identify group edges
|
|
480
488
|
i_group = tt_s_sorted['group_id', i_start_group]
|
|
481
489
|
i_end_group = i_start_group + 1
|
|
482
490
|
while i_end_group < n_places and tt_s_sorted['group_id', i_end_group] == i_group:
|
|
483
491
|
i_end_group += 1
|
|
492
|
+
|
|
493
|
+
# Debug
|
|
484
494
|
# print(f'Group {i_group}: {tt_s_sorted.name[i_start_group:i_end_group]}')
|
|
485
495
|
|
|
486
496
|
n_group = i_end_group - i_start_group
|
|
497
|
+
|
|
487
498
|
if n_group == 1: # Single element
|
|
488
499
|
i_place_sorted.append(tt_s_sorted.i_place[i_start_group])
|
|
489
500
|
i_start_group = i_end_group
|
|
@@ -492,46 +503,95 @@ def _sort_places(tt_unsorted, s_tol=1e-10, allow_non_existent_from=False):
|
|
|
492
503
|
if np.all(tt_s_sorted.from_anchor[i_start_group:i_end_group] == None): # Nothing to do
|
|
493
504
|
i_place_sorted.extend(list(tt_s_sorted.i_place[i_start_group:i_end_group]))
|
|
494
505
|
i_start_group = i_end_group
|
|
506
|
+
continue
|
|
507
|
+
|
|
508
|
+
# Geneal case to sort thin sandwiches:
|
|
509
|
+
# - elements with from_ before the group go first (in order of appearance)
|
|
510
|
+
# - elements with no from_ go next (in order of appearance)
|
|
511
|
+
# - elements with from_ after the group go last (in order of appearance)
|
|
512
|
+
# - elements with from_ inside the group get inserted based on their from_/from_anchor
|
|
495
513
|
|
|
496
514
|
tt_group = tt_s_sorted.rows[i_start_group:i_end_group]
|
|
515
|
+
|
|
516
|
+
# Debug
|
|
497
517
|
# tt_group.show(cols=['s_center', 'name', 'from_', 'from_anchor'])
|
|
498
518
|
|
|
499
|
-
|
|
519
|
+
# Identify subgroups
|
|
520
|
+
subgroup_from_is_before = []
|
|
521
|
+
subgroup_from_is_after = []
|
|
522
|
+
subgroup_from_is_inside = []
|
|
523
|
+
subgroup_no_from = []
|
|
524
|
+
for ii in range(n_group):
|
|
525
|
+
ff = tt_group.from_[ii]
|
|
500
526
|
if ff is None:
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
if
|
|
504
|
-
|
|
527
|
+
subgroup_no_from.append(ii)
|
|
528
|
+
else:
|
|
529
|
+
if ff not in ind_name:
|
|
530
|
+
if allow_non_existent_from:
|
|
531
|
+
subgroup_no_from.append(ii)
|
|
532
|
+
continue
|
|
533
|
+
else:
|
|
534
|
+
raise ValueError(f'Element {ff} not found in the line')
|
|
535
|
+
i_from_global = ind_name[ff]
|
|
536
|
+
if i_from_global < i_start_group:
|
|
537
|
+
subgroup_from_is_before.append(ii)
|
|
538
|
+
elif i_from_global >= i_end_group:
|
|
539
|
+
subgroup_from_is_after.append(ii)
|
|
505
540
|
else:
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
541
|
+
subgroup_from_is_inside.append(ii)
|
|
542
|
+
|
|
543
|
+
# Build dicts with insertions from subgroup_from_is_inside
|
|
544
|
+
# (dictionary keys are the from_ names)
|
|
545
|
+
insertion_before = {}
|
|
546
|
+
insertion_after = {}
|
|
547
|
+
for ii in subgroup_from_is_inside:
|
|
548
|
+
from_ = tt_group.from_[ii]
|
|
549
|
+
from_anchor = tt_group.from_anchor[ii]
|
|
550
|
+
if from_anchor == 'start' or from_anchor == None:
|
|
551
|
+
if from_ not in insertion_before:
|
|
552
|
+
insertion_before[from_] = []
|
|
553
|
+
insertion_before[from_].append(ii)
|
|
554
|
+
elif from_anchor == 'end':
|
|
555
|
+
if from_ not in insertion_after:
|
|
556
|
+
insertion_after[from_] = []
|
|
557
|
+
insertion_after[from_].append(ii)
|
|
514
558
|
else:
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
559
|
+
raise ValueError(f'Unknown from_anchor {from_anchor}')
|
|
560
|
+
|
|
561
|
+
# Make insertions
|
|
562
|
+
subgroup_from_is_not_inside = (subgroup_from_is_before +
|
|
563
|
+
subgroup_no_from +
|
|
564
|
+
subgroup_from_is_after)
|
|
565
|
+
i_subgroup_sorted = subgroup_from_is_not_inside.copy()
|
|
566
|
+
while len(insertion_before) > 0 or len(insertion_after) > 0:
|
|
567
|
+
new_i_subgroup_sorted = []
|
|
568
|
+
for ii in i_subgroup_sorted:
|
|
569
|
+
nn = tt_group.name[ii]
|
|
570
|
+
if nn in insertion_before:
|
|
571
|
+
new_i_subgroup_sorted.extend(insertion_before[nn])
|
|
572
|
+
insertion_before.pop(nn)
|
|
573
|
+
new_i_subgroup_sorted.append(ii)
|
|
574
|
+
if nn in insertion_after:
|
|
575
|
+
new_i_subgroup_sorted.extend(insertion_after[nn])
|
|
576
|
+
insertion_after.pop(nn)
|
|
577
|
+
|
|
578
|
+
if len(new_i_subgroup_sorted) == len(i_subgroup_sorted):
|
|
579
|
+
# No changes -> done
|
|
580
|
+
raise ValueError('Could not sort elements within group; possible circular '
|
|
581
|
+
'dependency in from_ specifications')
|
|
582
|
+
|
|
583
|
+
i_subgroup_sorted = new_i_subgroup_sorted
|
|
584
|
+
|
|
585
|
+
# Sort the group subtable
|
|
586
|
+
tt_group = tt_group.rows[i_subgroup_sorted]
|
|
587
|
+
|
|
588
|
+
# Append the sorted indices
|
|
532
589
|
i_place_sorted.extend(list(tt_group.i_place))
|
|
590
|
+
|
|
591
|
+
# Move to next group
|
|
533
592
|
i_start_group = i_end_group
|
|
534
593
|
|
|
594
|
+
# Sort the entire table according to i_place_sorted
|
|
535
595
|
tt_sorted = tt_unsorted.rows[i_place_sorted]
|
|
536
596
|
|
|
537
597
|
tt_sorted['s_center'] = tt_sorted['s_start'] + tt_sorted['length'] / 2
|
|
@@ -420,6 +420,9 @@ class Environment:
|
|
|
420
420
|
])
|
|
421
421
|
"""
|
|
422
422
|
|
|
423
|
+
if isinstance(components, str):
|
|
424
|
+
raise ValueError('components must be a list or tuple, not a string')
|
|
425
|
+
|
|
423
426
|
out = xt.Line(env=self, compose=True, length=length, refer=refer,
|
|
424
427
|
s_tol=s_tol, mirror=mirror)
|
|
425
428
|
|
|
@@ -1552,19 +1555,19 @@ class EnvElements:
|
|
|
1552
1555
|
def __len__(self):
|
|
1553
1556
|
return len(self.env._element_dict)
|
|
1554
1557
|
|
|
1555
|
-
def get_table(self):
|
|
1558
|
+
def get_table(self, attr=False):
|
|
1556
1559
|
names = sorted(list(self.env._element_dict.keys()))
|
|
1557
1560
|
dumline = self.env.new_line(components=names)
|
|
1558
|
-
tt = dumline.get_table()
|
|
1561
|
+
tt = dumline.get_table(attr=attr)
|
|
1559
1562
|
assert tt.name[-1] == '_end_point'
|
|
1560
1563
|
tt = tt.rows[:-1] # Remove endpoint
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1564
|
+
for cc in ['s', 's_start', 's_center', 's_end', 'env_name']:
|
|
1565
|
+
if cc in tt._col_names:
|
|
1566
|
+
tt._col_names.remove(cc)
|
|
1567
|
+
del tt._data[cc]
|
|
1568
|
+
if 'length' not in tt._col_names:
|
|
1569
|
+
tt['length'] = np.array(
|
|
1570
|
+
[getattr(self.env._element_dict[nn], 'length', 0) for nn in tt.name])
|
|
1568
1571
|
return tt
|
|
1569
1572
|
|
|
1570
1573
|
def remove(self, name):
|
|
@@ -1619,11 +1622,11 @@ class EnvParticles:
|
|
|
1619
1622
|
return len(self.env._particles)
|
|
1620
1623
|
|
|
1621
1624
|
def get_table(self):
|
|
1622
|
-
names = sorted(list(self.env._particles.keys()))
|
|
1625
|
+
names = np.array(sorted(list(self.env._particles.keys())))
|
|
1623
1626
|
mass0 = np.array(
|
|
1624
|
-
[self.env._particles[nn].mass0
|
|
1627
|
+
[self.env._particles[nn].mass0 for nn in names])
|
|
1625
1628
|
charge0 = np.array(
|
|
1626
|
-
[self.env._particles[nn].
|
|
1629
|
+
[self.env._particles[nn].q0 for nn in names])
|
|
1627
1630
|
energy0 = np.array(
|
|
1628
1631
|
[self.env._particles[nn].energy0[0] for nn in names])
|
|
1629
1632
|
p0c = np.array(
|
|
@@ -2299,4 +2302,3 @@ def _disable_name_clash_checks(env):
|
|
|
2299
2302
|
yield
|
|
2300
2303
|
finally:
|
|
2301
2304
|
env._enable_name_clash_check = old_value
|
|
2302
|
-
|
|
@@ -297,10 +297,10 @@ def _tw_ng(line, rdts=(), normal_form=True,
|
|
|
297
297
|
d4q2 = out_nf[9],
|
|
298
298
|
d5q1 = out_nf[10],
|
|
299
299
|
d5q2 = out_nf[11],
|
|
300
|
-
dqxdjx = out_nf[
|
|
301
|
-
dqydjy = out_nf[
|
|
302
|
-
dqxdjy = out_nf[
|
|
303
|
-
dqydjx = out_nf[
|
|
300
|
+
dqxdjx = out_nf[12]*2.,
|
|
301
|
+
dqydjy = out_nf[13]*2.,
|
|
302
|
+
dqxdjy = out_nf[14]*2.,
|
|
303
|
+
dqydjx = out_nf[15]*2.,
|
|
304
304
|
)
|
|
305
305
|
for nn in dct_nf:
|
|
306
306
|
tw[nn+'_nf_ng'] = dct_nf[nn]
|
xtrack-0.98.4/xtrack/_version.py
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = '0.98.4'
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|