xtrack 0.97.1__tar.gz → 0.98.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {xtrack-0.97.1/xtrack.egg-info → xtrack-0.98.0}/PKG-INFO +2 -2
- {xtrack-0.97.1 → xtrack-0.98.0}/pyproject.toml +1 -1
- {xtrack-0.97.1 → xtrack-0.98.0}/tests/test_element_characterization_functions.py +4 -4
- {xtrack-0.97.1 → xtrack-0.98.0}/tests/test_elements_thick.py +99 -111
- {xtrack-0.97.1 → xtrack-0.98.0}/tests/test_environment.py +12 -12
- {xtrack-0.97.1 → xtrack-0.98.0}/tests/test_line.py +1 -1
- {xtrack-0.97.1 → xtrack-0.98.0}/tests/test_magnet.py +34 -30
- {xtrack-0.97.1 → xtrack-0.98.0}/tests/test_misalign.py +2 -1
- {xtrack-0.97.1 → xtrack-0.98.0}/tests/test_multispecies.py +2 -2
- {xtrack-0.97.1 → xtrack-0.98.0}/tests/test_native_madloader.py +3 -3
- {xtrack-0.97.1 → xtrack-0.98.0}/tests/test_native_madloader_lhc.py +1 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/tests/test_native_madloader_lhc_thin.py +1 -1
- {xtrack-0.97.1 → xtrack-0.98.0}/tests/test_native_madloader_ps.py +1 -1
- {xtrack-0.97.1 → xtrack-0.98.0}/tests/test_optimize_for_tracking.py +14 -15
- {xtrack-0.97.1 → xtrack-0.98.0}/tests/test_radiation_integrals.py +12 -12
- {xtrack-0.97.1 → xtrack-0.98.0}/tests/test_rbend_straight_body.py +4 -4
- {xtrack-0.97.1 → xtrack-0.98.0}/tests/test_rf_track.py +1 -1
- {xtrack-0.97.1 → xtrack-0.98.0}/tests/test_slice_and_insert_with_replicas.py +14 -14
- {xtrack-0.97.1 → xtrack-0.98.0}/tests/test_slice_elements.py +21 -9
- {xtrack-0.97.1 → xtrack-0.98.0}/tests/test_slicing.py +9 -6
- {xtrack-0.97.1 → xtrack-0.98.0}/tests/test_spin.py +2 -2
- {xtrack-0.97.1 → xtrack-0.98.0}/tests/test_sps_thick_cpymad_loader.py +0 -1
- {xtrack-0.97.1 → xtrack-0.98.0}/tests/test_sps_thick_native_loader.py +0 -1
- {xtrack-0.97.1 → xtrack-0.98.0}/tests/test_survey.py +7 -7
- {xtrack-0.97.1 → xtrack-0.98.0}/tests/test_tilt_shifts.py +1 -1
- {xtrack-0.97.1 → xtrack-0.98.0}/tests/test_vs_madx.py +2 -2
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/_temp/python_lattice_writer/lattice_py_generation.py +5 -1
- xtrack-0.98.0/xtrack/_version.py +1 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/base_element.py +1 -1
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/elements.py +169 -414
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/slice_elements_edge.py +4 -4
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/slice_elements_thin.py +2 -2
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/environment.py +2 -1
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/line.py +7 -1
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/mad_loader.py +7 -3
- xtrack-0.98.0/xtrack/multiline.py +68 -0
- {xtrack-0.97.1 → xtrack-0.98.0/xtrack.egg-info}/PKG-INFO +2 -2
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack.egg-info/SOURCES.txt +0 -1
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack.egg-info/requires.txt +1 -1
- xtrack-0.97.1/tests/test_legacy_multiline_to_env.py +0 -83
- xtrack-0.97.1/xtrack/_version.py +0 -1
- xtrack-0.97.1/xtrack/multiline.py +0 -66
- {xtrack-0.97.1 → xtrack-0.98.0}/LICENSE +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/MANIFEST.in +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/README.md +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/ducktrack/__init__.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/ducktrack/base_classes.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/ducktrack/be_beamfields/BB6D.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/ducktrack/be_beamfields/BB6Ddata.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/ducktrack/be_beamfields/__init__.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/ducktrack/be_beamfields/beambeam.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/ducktrack/be_beamfields/boost.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/ducktrack/be_beamfields/gaussian_fields.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/ducktrack/be_beamfields/propagate_sigma_matrix.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/ducktrack/be_beamfields/qgauss.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/ducktrack/be_beamfields/slicing.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/ducktrack/be_beamfields/spacecharge.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/ducktrack/elements.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/ducktrack/line.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/ducktrack/mathlibs.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/ducktrack/particles.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/ducktrack/temp_pyparticles.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/setup.cfg +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/setup.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/tests/test_acceleration.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/tests/test_acdipole.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/tests/test_acdipole_twiss.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/tests/test_amplitude_detuning.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/tests/test_aperture_polygon.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/tests/test_aperture_table.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/tests/test_aperture_turn_ele_and_monitor.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/tests/test_apertures.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/tests/test_attr_replicas_and_slices.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/tests/test_boris_spatial.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/tests/test_bucket_with_ref_energy_change.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/tests/test_cavity_absolute_time.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/tests/test_chromatic_functions_vs_madx.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/tests/test_coasting.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/tests/test_collective_tracker.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/tests/test_collimation.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/tests/test_coupling_edwards_teng.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/tests/test_electron_cooler.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/tests/test_element_internal_record.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/tests/test_elements.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/tests/test_elements_classflags.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/tests/test_fcc_ee_solenoid_correction.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/tests/test_fcc_ee_solenoid_correction_new_optimize_api.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/tests/test_footprint.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/tests/test_freeze_longitudinal.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/tests/test_full_rings.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/tests/test_h6_sps_beamline.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/tests/test_hvkick.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/tests/test_ions.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/tests/test_json.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/tests/test_lhc_env.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/tests/test_lhc_match_phase_15.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/tests/test_load.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/tests/test_load_vars.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/tests/test_lumi.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/tests/test_mad_writer.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/tests/test_madloader.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/tests/test_madnginterface.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/tests/test_match_and_track_from_element.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/tests/test_match_coupling_knob.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/tests/test_match_nested.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/tests/test_match_optics_and_ip_knob.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/tests/test_match_optics_and_ip_knob_new_optimize_api.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/tests/test_match_orbit_bump.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/tests/test_match_tune_chroma_cminus.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/tests/test_monitor.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/tests/test_multi_bunch_gauss.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/tests/test_multiline.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/tests/test_multisetter.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/tests/test_native_madloader_sps.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/tests/test_native_madloader_ti2.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/tests/test_particles.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/tests/test_particles_basics.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/tests/test_particles_pdg.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/tests/test_pipeline.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/tests/test_prebuild_kernels.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/tests/test_ps_against_ptc.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/tests/test_ps_multiturn_twiss.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/tests/test_psb_chicane.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/tests/test_pyht_interface.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/tests/test_quadrupole_fringe_ptc.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/tests/test_quadrupole_wedge.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/tests/test_radial_steering.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/tests/test_radiation.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/tests/test_radiation_equilibrium_emittances.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/tests/test_radiation_equilibrium_emittances_thick.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/tests/test_random_gen.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/tests/test_random_gen_exp.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/tests/test_random_gen_gauss.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/tests/test_random_gen_ruth.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/tests/test_rotation_signs.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/tests/test_second_order_taylor_map.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/tests/test_seeds.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/tests/test_solenoid_bz_map_vs_boris.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/tests/test_solenoid_bz_map_vs_boris_legacy.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/tests/test_spacecharge_in_ring.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/tests/test_tapering.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/tests/test_thick_kickers_rf_crab.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/tests/test_thick_lhc.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/tests/test_tracker.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/tests/test_trajectory_correcton.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/tests/test_twiss.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/tests/test_twiss_to_file.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/tests/test_twiss_vs_madx_psb.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/tests/test_xmask_orbit_correction.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/__init__.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/_temp/__init__.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/_temp/boris_and_solenoid_map/__init__.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/_temp/boris_and_solenoid_map/boris.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/_temp/boris_and_solenoid_map/solenoid_field.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/_temp/lhc_match/__init__.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/_temp/lhc_match/gen_madx_optics_file.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/_temp/lhc_match/lhc_match.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/_temp/lhc_match/var_limits.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/_temp/python_lattice_writer/__init__.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/aperture_meas.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/__init__.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/acdipole.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/apertures.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/apertures_src/limitellipse.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/apertures_src/limitpolygon.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/apertures_src/limitracetrack.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/apertures_src/limitrect.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/apertures_src/limitrectellipse.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/apertures_src/longitudinallimitrect.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/beam_interaction.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/elements_src/_generate_slice_elements_c_code.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/elements_src/_include_integrator.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/elements_src/acdipole.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/elements_src/bend.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/elements_src/cavity.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/elements_src/crab_cavity.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/elements_src/default_magnet_config.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/elements_src/dipole_fringe.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/elements_src/dipoleedge.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/elements_src/drift.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/elements_src/drift_exact.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/elements_src/drift_exact_slice.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/elements_src/drift_slice.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/elements_src/drift_slice_bend.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/elements_src/drift_slice_cavity.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/elements_src/drift_slice_crab_cavity.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/elements_src/drift_slice_multipole.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/elements_src/drift_slice_octupole.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/elements_src/drift_slice_quadrupole.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/elements_src/drift_slice_rbend.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/elements_src/drift_slice_sextupole.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/elements_src/drift_slice_uniform_solenoid.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/elements_src/electroncooler.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/elements_src/elens.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/elements_src/exciter.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/elements_src/firstordertaylormap.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/elements_src/legacy_solenoid.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/elements_src/linesegmentmap.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/elements_src/magnet.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/elements_src/magnet_drift.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/elements_src/magnet_edge.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/elements_src/magnet_kick.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/elements_src/marker.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/elements_src/misalignment.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/elements_src/multipole.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/elements_src/multipoleedge.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/elements_src/nonlinearlens.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/elements_src/octupole.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/elements_src/quadrupole.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/elements_src/rbend.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/elements_src/referenceenergyincrease.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/elements_src/rfmultipole.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/elements_src/second_order_taylor_map.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/elements_src/sextupole.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/elements_src/simplethinbend.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/elements_src/simplethinquadrupole.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/elements_src/slnd.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/elements_src/srotation.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/elements_src/temprf.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/elements_src/thick_slice_bend.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/elements_src/thick_slice_cavity.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/elements_src/thick_slice_crab_cavity.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/elements_src/thick_slice_multipole.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/elements_src/thick_slice_octupole.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/elements_src/thick_slice_quadrupole.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/elements_src/thick_slice_rbend.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/elements_src/thick_slice_sextupole.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/elements_src/thick_slice_uniform_solenoid.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/elements_src/thin_slice_bend.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/elements_src/thin_slice_bend_entry.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/elements_src/thin_slice_bend_exit.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/elements_src/thin_slice_cavity.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/elements_src/thin_slice_crab_cavity.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/elements_src/thin_slice_multipole.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/elements_src/thin_slice_octupole.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/elements_src/thin_slice_octupole_entry.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/elements_src/thin_slice_octupole_exit.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/elements_src/thin_slice_quadrupole.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/elements_src/thin_slice_quadrupole_entry.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/elements_src/thin_slice_quadrupole_exit.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/elements_src/thin_slice_rbend.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/elements_src/thin_slice_rbend_entry.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/elements_src/thin_slice_rbend_exit.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/elements_src/thin_slice_sextupole.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/elements_src/thin_slice_sextupole_entry.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/elements_src/thin_slice_sextupole_exit.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/elements_src/thin_slice_uniform_solenoid_entry.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/elements_src/thin_slice_uniform_solenoid_exit.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/elements_src/track_acdipole.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/elements_src/track_dipole_edge_linear.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/elements_src/track_dipole_edge_nonlinear.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/elements_src/track_dipole_fringe.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/elements_src/track_drift.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/elements_src/track_legacy_solenoid.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/elements_src/track_legacy_solenoid_multipolar_components.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/elements_src/track_legacy_solenoid_radiation.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/elements_src/track_magnet.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/elements_src/track_magnet.template.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/elements_src/track_magnet_configure.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/elements_src/track_magnet_drift.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/elements_src/track_magnet_edge.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/elements_src/track_magnet_kick.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/elements_src/track_magnet_radiation.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/elements_src/track_misalignments.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/elements_src/track_mult_fringe.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/elements_src/track_rf.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/elements_src/track_rf.template.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/elements_src/track_srotation.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/elements_src/track_thick_bend.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/elements_src/track_thick_cfd.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/elements_src/track_wedge.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/elements_src/track_xrotation.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/elements_src/track_xyshift.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/elements_src/track_yrotation.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/elements_src/variable_solenoid.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/elements_src/wedge.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/elements_src/wire.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/elements_src/xrotation.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/elements_src/xyshift.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/elements_src/yrotation.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/elements_src/zetashift.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/exciter.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/rft_element.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/slice_base.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/slice_elements_drift.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/beam_elements/slice_elements_thick.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/boris.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/builder.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/footprint.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/functions.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/general.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/headers/atomicadd.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/headers/checks.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/headers/constants.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/headers/particle_states.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/headers/synrad_spectrum.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/headers/track.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/headers/track_local_particle_with_transformations.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/internal_record.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/json.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/linear_normal_form.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/load.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/loss_location_refinement/__init__.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/loss_location_refinement/loss_location_refinement.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/lumi.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/mad_parser/__init__.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/mad_parser/loader.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/mad_parser/madx.lark +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/mad_parser/parse.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/mad_writer.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/madng_interface.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/match.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/monitors/__init__.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/monitors/beam_position_monitor.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/monitors/beam_position_monitor.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/monitors/beam_profile_monitor.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/monitors/beam_profile_monitor.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/monitors/beam_size_monitor.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/monitors/beam_size_monitor.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/monitors/last_turns_monitor.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/monitors/last_turns_monitor.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/monitors/particles_monitor.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/monitors/particles_monitor.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/multiline_legacy/__init__.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/multiline_legacy/multiline_legacy.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/multiline_legacy/shared_knobs.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/multisetter/__init__.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/multisetter/multisetter.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/multisetter/multisetter.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/particles/__init__.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/particles/constants.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/particles/local_particle_custom_api.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/particles/masses.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/particles/particles.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/particles/pdg.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/particles/rng_src/base_rng.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/particles/rng_src/particles_rng.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/pipeline/__init__.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/pipeline/core.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/pipeline/manager.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/pipeline/multitracker.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/prebuilt_kernel_definitions/__init__.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/prebuilt_kernel_definitions/element_inits.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/prebuilt_kernel_definitions/element_types.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/progress_indicator.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/random/__init__.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/random/random_generators.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/random/random_src/exponential.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/random/random_src/exponential_integral_Ei.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/random/random_src/normal.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/random/random_src/rutherford.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/random/random_src/uniform.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/random/random_src/uniform_accurate.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/slicing.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/survey.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/svgutils/__init__.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/svgutils/parser.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/svgutils/path.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/svgutils/svgutils.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/synctime.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/table.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/tapering.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/targets.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/track_flags.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/tracker.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/tracker_data.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/tracker_src/tracker.h +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/trajectory_correction.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/twiss.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/twissplot.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack/view.py +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack.egg-info/dependency_links.txt +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack.egg-info/entry_points.txt +0 -0
- {xtrack-0.97.1 → xtrack-0.98.0}/xtrack.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: xtrack
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.98.0
|
|
4
4
|
Summary: Tracking library for particle accelerators
|
|
5
5
|
Author: G. Iadarola et al.
|
|
6
6
|
License-Expression: Apache-2.0
|
|
@@ -25,7 +25,7 @@ Requires-Dist: nafflib; extra == "tests"
|
|
|
25
25
|
Requires-Dist: PyHEADTAIL; extra == "tests"
|
|
26
26
|
Requires-Dist: pytest; extra == "tests"
|
|
27
27
|
Requires-Dist: pytest-mock; extra == "tests"
|
|
28
|
-
Requires-Dist: pymadng; extra == "tests"
|
|
28
|
+
Requires-Dist: pymadng==0.8.1; extra == "tests"
|
|
29
29
|
Requires-Dist: requests-mock; extra == "tests"
|
|
30
30
|
Requires-Dist: tfs-pandas; extra == "tests"
|
|
31
31
|
Provides-Extra: notebooks
|
|
@@ -5,7 +5,7 @@ from xobjects.test_helpers import for_all_test_contexts
|
|
|
5
5
|
@for_all_test_contexts
|
|
6
6
|
def test_is_aperture(test_context):
|
|
7
7
|
elements={
|
|
8
|
-
'e0': xt.Bend(k0=0.4,
|
|
8
|
+
'e0': xt.Bend(k0=0.4, angle=0.3, length=1),
|
|
9
9
|
'e1': xt.Replica(parent_name='e0'),
|
|
10
10
|
'e2': xt.Replica(parent_name='e1'),
|
|
11
11
|
'a0': xt.LimitRect(),
|
|
@@ -29,7 +29,7 @@ def test_is_aperture(test_context):
|
|
|
29
29
|
@for_all_test_contexts
|
|
30
30
|
def test_has_backtrack(test_context):
|
|
31
31
|
elements={
|
|
32
|
-
'e0': xt.Bend(k0=0.4,
|
|
32
|
+
'e0': xt.Bend(k0=0.4, angle=0.3, length=1),
|
|
33
33
|
'e1': xt.Replica(parent_name='e0'),
|
|
34
34
|
'e2': xt.Replica(parent_name='e1'),
|
|
35
35
|
'a0': xt.Drift(),
|
|
@@ -59,7 +59,7 @@ def test_has_backtrack(test_context):
|
|
|
59
59
|
|
|
60
60
|
def test_is_drift_behaves_like_drift():
|
|
61
61
|
|
|
62
|
-
bend = xt.Bend(k0=0.4,
|
|
62
|
+
bend = xt.Bend(k0=0.4, angle=0.3, length=1)
|
|
63
63
|
|
|
64
64
|
line = xt.Line(
|
|
65
65
|
elements=[bend, xt.Replica(parent_name='e0'), xt.Replica(parent_name='e1'),
|
|
@@ -165,7 +165,7 @@ def test_is_drift_behaves_like_drift():
|
|
|
165
165
|
|
|
166
166
|
def test_replica_loops():
|
|
167
167
|
|
|
168
|
-
bend = xt.Bend(k0=0.4,
|
|
168
|
+
bend = xt.Bend(k0=0.4, angle=0.3, length=1)
|
|
169
169
|
|
|
170
170
|
elements = {
|
|
171
171
|
# correct case
|
|
@@ -139,7 +139,7 @@ def test_combined_function_dipole_expanded(test_context):
|
|
|
139
139
|
_context=test_context,
|
|
140
140
|
)
|
|
141
141
|
|
|
142
|
-
bend = xt.Bend(k0=1e-3,
|
|
142
|
+
bend = xt.Bend(k0=1e-3, angle=0.9e-3, length=1, k1=0.001, knl=[0, 0, 0.02])
|
|
143
143
|
line_thick = xt.Line(elements=[bend], element_names=['b'])
|
|
144
144
|
line_thick.build_tracker(_context=test_context)
|
|
145
145
|
|
|
@@ -238,7 +238,7 @@ def test_thick_multipolar_component(test_context, element_type, h):
|
|
|
238
238
|
# Bend with a multipolar component
|
|
239
239
|
bend_with_mult = element_type(
|
|
240
240
|
k0=k0,
|
|
241
|
-
|
|
241
|
+
angle=h * bend_length,
|
|
242
242
|
length=bend_length,
|
|
243
243
|
knl=knl,
|
|
244
244
|
ksl=ksl,
|
|
@@ -249,7 +249,7 @@ def test_thick_multipolar_component(test_context, element_type, h):
|
|
|
249
249
|
# Separate bend and a corresponding multipole
|
|
250
250
|
bend_no_mult = element_type(
|
|
251
251
|
k0=k0,
|
|
252
|
-
|
|
252
|
+
angle=h * bend_length / num_kicks / 2,
|
|
253
253
|
length=bend_length / num_kicks / 2,
|
|
254
254
|
num_multipole_kicks=0,
|
|
255
255
|
)
|
|
@@ -299,14 +299,11 @@ def test_thick_multipolar_component(test_context, element_type, h):
|
|
|
299
299
|
'kwargs',
|
|
300
300
|
[
|
|
301
301
|
{},
|
|
302
|
-
{'length': 2, 'angle': 0.1, 'h': 0.05},
|
|
303
|
-
{'length': 2, 'angle': 0.1, 'h': 0.1},
|
|
304
302
|
{'length': 2, 'angle': 0.1},
|
|
305
|
-
{'length': 2, 'h': 0.1},
|
|
306
303
|
{'length': 2},
|
|
307
|
-
{'angle': 0.1
|
|
304
|
+
{'angle': 0.1},
|
|
308
305
|
],
|
|
309
|
-
ids=['none', 'all', '
|
|
306
|
+
ids=['none', 'all', 'length', 'angle'],
|
|
310
307
|
)
|
|
311
308
|
@pytest.mark.parametrize('scenario', ['vanilla', 'env'])
|
|
312
309
|
def test_bend_param_handling(kwargs, scenario):
|
|
@@ -319,17 +316,7 @@ def test_bend_param_handling(kwargs, scenario):
|
|
|
319
316
|
env.new('bend', 'Bend', **kwargs)
|
|
320
317
|
return env['bend']
|
|
321
318
|
|
|
322
|
-
|
|
323
|
-
if len(kwargs) == 3 and not np.isclose(
|
|
324
|
-
kwargs['angle'], kwargs['length'] * kwargs['h'], rtol=0, atol=1e-13):
|
|
325
|
-
input_is_consistent = False
|
|
326
|
-
|
|
327
|
-
if not input_is_consistent:
|
|
328
|
-
with pytest.raises(ValueError):
|
|
329
|
-
_ = make_bend()
|
|
330
|
-
return
|
|
331
|
-
else:
|
|
332
|
-
bend = make_bend()
|
|
319
|
+
bend = make_bend()
|
|
333
320
|
|
|
334
321
|
for key, value in kwargs.items():
|
|
335
322
|
assert getattr(bend, key) == value
|
|
@@ -339,24 +326,18 @@ def test_bend_param_handling(kwargs, scenario):
|
|
|
339
326
|
if 'angle' in kwargs:
|
|
340
327
|
assert bend.angle == kwargs['angle']
|
|
341
328
|
|
|
342
|
-
if 'h' in kwargs:
|
|
343
|
-
assert bend.h == kwargs['h']
|
|
344
|
-
|
|
345
329
|
assert bend.angle == bend.length * bend.h or bend.length == 0
|
|
346
330
|
|
|
347
331
|
|
|
348
332
|
@pytest.mark.parametrize(
|
|
349
333
|
'kwargs, expected',
|
|
350
334
|
[
|
|
351
|
-
({}, {'length': 10, 'angle': 0.2
|
|
352
|
-
({'length': 2, 'angle': 0.1
|
|
353
|
-
({'length': 2
|
|
354
|
-
({'
|
|
355
|
-
({'length': 2, 'h': 0.05}, {'length': 2, 'angle': 0.1, 'h': 0.05}),
|
|
356
|
-
({'length': 2}, {'length': 2, 'angle': 0.2, 'h': 0.1}), # keeps angle
|
|
357
|
-
({'h': 0.05, 'angle': 0.1}, {'length': 10, 'angle': 0.1, 'h': 0.01}), # order matters
|
|
335
|
+
({}, {'length': 10, 'angle': 0.2}),
|
|
336
|
+
({'length': 2, 'angle': 0.1}, {'length': 2, 'angle': 0.1}),
|
|
337
|
+
({'length': 2}, {'length': 2, 'angle': 0.2}),
|
|
338
|
+
({'angle': 0.2}, {'length': 10, 'angle': 0.2}),
|
|
358
339
|
],
|
|
359
|
-
ids=['none', 'all', '
|
|
340
|
+
ids=['none', 'all', 'only_length', 'only_angle'],
|
|
360
341
|
)
|
|
361
342
|
def test_bend_param_handling_set_after(kwargs, expected):
|
|
362
343
|
bend = xt.Bend(length=10, angle=0.2)
|
|
@@ -374,19 +355,9 @@ def test_bend_param_handling_set_after(kwargs, expected):
|
|
|
374
355
|
@pytest.mark.parametrize(
|
|
375
356
|
'kwargs',
|
|
376
357
|
[
|
|
377
|
-
{'
|
|
378
|
-
{'length': 2, 'angle': 0.4, 'h': 0.2},
|
|
379
|
-
{'length': 2, 'h': 0.2},
|
|
380
|
-
{'length': 2, 'angle': 0.4},
|
|
381
|
-
{'angle': 0.4, 'h': 0.2, 'length_straight': 1.986693307950612},
|
|
382
|
-
{'h': 0.2, 'length_straight': 1.986693307950612},
|
|
383
|
-
{'angle': 0.4, 'length_straight': 1.986693307950612},
|
|
384
|
-
{'length': 2, 'length_straight': 2},
|
|
385
|
-
{'length': 2},
|
|
358
|
+
{'length_straight': 2, 'angle': 0.4},
|
|
386
359
|
{'length_straight': 2},
|
|
387
|
-
{'angle': 0.4, 'h': 0.2},
|
|
388
360
|
{'angle': 0.4},
|
|
389
|
-
{'h': 0.2},
|
|
390
361
|
# Inconsistent
|
|
391
362
|
{'length': 2, 'angle': 0.4, 'h': 0.4, 'length_straight': 2, 'error': True},
|
|
392
363
|
{'length': 2, 'angle': 0.4, 'h': 0.4, 'error': True},
|
|
@@ -395,9 +366,14 @@ def test_bend_param_handling_set_after(kwargs, expected):
|
|
|
395
366
|
{'length': 2, 'h': 0.4, 'length_straight': 2, 'error': True},
|
|
396
367
|
],
|
|
397
368
|
ids=[
|
|
398
|
-
'
|
|
399
|
-
'
|
|
400
|
-
'
|
|
369
|
+
'lstraight_angle',
|
|
370
|
+
'lstraight',
|
|
371
|
+
'angle',
|
|
372
|
+
'inconsistent_1',
|
|
373
|
+
'inconsistent_2',
|
|
374
|
+
'inconsistent_3',
|
|
375
|
+
'inconsistent_4',
|
|
376
|
+
'inconsistent_5',
|
|
401
377
|
],
|
|
402
378
|
)
|
|
403
379
|
@pytest.mark.parametrize('scenario', ['vanilla', 'env'])
|
|
@@ -433,13 +409,6 @@ def test_rbend_param_handling(kwargs, scenario):
|
|
|
433
409
|
if 'h' not in kwargs and 'angle' not in kwargs:
|
|
434
410
|
assert same(bend.length, bend.length_straight)
|
|
435
411
|
|
|
436
|
-
if 'length' not in kwargs and 'length_straight' not in kwargs:
|
|
437
|
-
if 'h' not in kwargs:
|
|
438
|
-
assert same(bend.h, 0)
|
|
439
|
-
if 'angle' not in kwargs:
|
|
440
|
-
assert same(bend.angle, 0)
|
|
441
|
-
|
|
442
|
-
|
|
443
412
|
def test_rbend_param_handling_set_after():
|
|
444
413
|
# This test is a bit less meaningful as there are a lot of combinations
|
|
445
414
|
# that lead to unintuitive, but valid, results
|
|
@@ -447,9 +416,9 @@ def test_rbend_param_handling_set_after():
|
|
|
447
416
|
def assert_eq(a, b):
|
|
448
417
|
xo.assert_allclose(a, b, rtol=0, atol=1e-15)
|
|
449
418
|
|
|
450
|
-
bend = xt.RBend(
|
|
419
|
+
bend = xt.RBend(length_straight=9.983341664682815, angle=0.2)
|
|
451
420
|
assert bend.h == 0.02
|
|
452
|
-
assert_eq(bend.
|
|
421
|
+
assert_eq(bend.length, 10)
|
|
453
422
|
|
|
454
423
|
bend.angle = 0.4
|
|
455
424
|
assert bend.angle == 0.4
|
|
@@ -464,32 +433,8 @@ def test_rbend_param_handling_set_after():
|
|
|
464
433
|
assert_eq(bend.length, 10.016686131634778)
|
|
465
434
|
assert_eq(bend.h, 0.01996668332936563)
|
|
466
435
|
|
|
467
|
-
bend.length = 10
|
|
468
|
-
assert bend.angle == 0.2
|
|
469
|
-
assert bend.length == 10
|
|
470
|
-
assert bend.h == 0.02
|
|
471
|
-
assert_eq(bend.length_straight, 9.983341664682815)
|
|
472
|
-
|
|
473
|
-
bend.h = 0.01
|
|
474
|
-
assert bend.h == 0.01
|
|
475
|
-
assert_eq(bend.length_straight, 9.983341664682815)
|
|
476
|
-
assert_eq(bend.angle, 0.09987492198591705)
|
|
477
|
-
assert_eq(bend.length, 9.987492198591704)
|
|
478
|
-
|
|
479
|
-
|
|
480
436
|
@for_all_test_contexts
|
|
481
|
-
|
|
482
|
-
'param_scenario', ['length', 'length_straight', 'both', 'mismatched'],
|
|
483
|
-
)
|
|
484
|
-
@pytest.mark.parametrize(
|
|
485
|
-
"use_angle_in_rbend", [True, False],
|
|
486
|
-
ids=('rbend with angle', 'rbend with h'),
|
|
487
|
-
)
|
|
488
|
-
@pytest.mark.parametrize(
|
|
489
|
-
"use_angle_in_sbend", [True, False],
|
|
490
|
-
ids=('sbend with angle', 'sbend with h'),
|
|
491
|
-
)
|
|
492
|
-
def test_rbend(test_context, param_scenario, use_angle_in_rbend, use_angle_in_sbend):
|
|
437
|
+
def test_rbend(test_context):
|
|
493
438
|
k0 = 0.15
|
|
494
439
|
angle = 0.1
|
|
495
440
|
radius = 2
|
|
@@ -501,20 +446,10 @@ def test_rbend(test_context, param_scenario, use_angle_in_rbend, use_angle_in_sb
|
|
|
501
446
|
|
|
502
447
|
# Set up everything for the RBend
|
|
503
448
|
r_bend_extra_kwargs = {}
|
|
449
|
+
r_bend_extra_kwargs['length_straight'] = length_straight
|
|
450
|
+
r_bend_extra_kwargs['angle'] = angle
|
|
504
451
|
|
|
505
|
-
|
|
506
|
-
r_bend_extra_kwargs['length'] = length
|
|
507
|
-
|
|
508
|
-
if param_scenario in ('length_straight', 'both', 'mismatched'):
|
|
509
|
-
r_bend_extra_kwargs['length_straight'] = length_straight
|
|
510
|
-
|
|
511
|
-
if use_angle_in_rbend:
|
|
512
|
-
r_bend_extra_kwargs['angle'] = angle
|
|
513
|
-
else:
|
|
514
|
-
r_bend_extra_kwargs['h'] = curvature
|
|
515
|
-
|
|
516
|
-
def _make_rbend():
|
|
517
|
-
return xt.RBend(
|
|
452
|
+
rbend = xt.RBend(
|
|
518
453
|
k0=k0,
|
|
519
454
|
edge_entry_angle=e1_rbend,
|
|
520
455
|
edge_entry_active=True,
|
|
@@ -524,22 +459,9 @@ def test_rbend(test_context, param_scenario, use_angle_in_rbend, use_angle_in_sb
|
|
|
524
459
|
_context=test_context,
|
|
525
460
|
)
|
|
526
461
|
|
|
527
|
-
if param_scenario == 'mismatched':
|
|
528
|
-
length_straight += 0.8
|
|
529
|
-
with pytest.raises(ValueError):
|
|
530
|
-
r_bend_extra_kwargs['length_straight'] += 0.8
|
|
531
|
-
_make_rbend()
|
|
532
|
-
return
|
|
533
|
-
else:
|
|
534
|
-
rbend = _make_rbend()
|
|
535
|
-
|
|
536
462
|
# Set up everything for the SBend
|
|
537
463
|
s_bend_extra_kwargs = {}
|
|
538
|
-
|
|
539
|
-
if use_angle_in_rbend:
|
|
540
|
-
s_bend_extra_kwargs['angle'] = angle
|
|
541
|
-
else:
|
|
542
|
-
s_bend_extra_kwargs['h'] = curvature
|
|
464
|
+
s_bend_extra_kwargs['angle'] = angle
|
|
543
465
|
|
|
544
466
|
sbend = xt.Bend(
|
|
545
467
|
k0=k0,
|
|
@@ -639,7 +561,7 @@ def test_import_thick_bend_from_madx_cpymad(use_true_thick_bends, with_knobs, be
|
|
|
639
561
|
# k0 = h if k0 is zero, but this is not feasible to implement in Xtrack now.
|
|
640
562
|
xo.assert_allclose(elem.k2, 0.4, atol=1e-14)
|
|
641
563
|
xo.assert_allclose(elem.h, elem.angle / elem.length, atol=1e-14) # h = angle / L
|
|
642
|
-
xo.assert_allclose(elem.k0, 0 if with_knobs else
|
|
564
|
+
xo.assert_allclose(elem.k0, 0 if with_knobs else 'from_h', atol=1e-14)
|
|
643
565
|
xo.assert_allclose(elem.knl, 0.0, atol=1e-14)
|
|
644
566
|
xo.assert_allclose(elem.ksl, 0.0, atol=1e-14)
|
|
645
567
|
|
|
@@ -1218,7 +1140,7 @@ def test_fringe_implementations(test_context):
|
|
|
1218
1140
|
def test_backtrack_with_bend_quadrupole_and_cfm(test_context):
|
|
1219
1141
|
|
|
1220
1142
|
# Check bend
|
|
1221
|
-
b = xt.Bend(k0=0.2,
|
|
1143
|
+
b = xt.Bend(k0=0.2, angle=0.1, length=1.0)
|
|
1222
1144
|
line = xt.Line(elements=[b])
|
|
1223
1145
|
line.particle_ref = xp.Particles(mass0=xp.PROTON_MASS_EV, beta0=0.5)
|
|
1224
1146
|
line.reset_s_at_end_turn = False
|
|
@@ -1283,7 +1205,7 @@ def test_backtrack_with_bend_quadrupole_and_cfm(test_context):
|
|
|
1283
1205
|
assert np.all(p2.state == -32)
|
|
1284
1206
|
|
|
1285
1207
|
# Same for combined function magnet
|
|
1286
|
-
cfm = xt.Bend(length=1.0, k1=0.2,
|
|
1208
|
+
cfm = xt.Bend(length=1.0, k1=0.2, angle=0.1)
|
|
1287
1209
|
line = xt.Line(elements=[cfm])
|
|
1288
1210
|
line.particle_ref = xp.Particles(mass0=xp.PROTON_MASS_EV, beta0=0.5)
|
|
1289
1211
|
line.reset_s_at_end_turn = False
|
|
@@ -2590,7 +2512,7 @@ def test_knl_knl_kick_present_with_default_num_kicks():
|
|
|
2590
2512
|
assert np.abs(p.px[0]) > 1e-7
|
|
2591
2513
|
|
|
2592
2514
|
l5 = env.new_line(components=[
|
|
2593
|
-
env.new('rb1', 'RBend',
|
|
2515
|
+
env.new('rb1', 'RBend', length_straight=0.1)])
|
|
2594
2516
|
p0 = l5.build_particles(x=3e-3)
|
|
2595
2517
|
p = p0.copy()
|
|
2596
2518
|
l5.track(p)
|
|
@@ -2706,7 +2628,7 @@ def test_octupole_num_kicks():
|
|
|
2706
2628
|
def test_configure_model():
|
|
2707
2629
|
line = xt.Line(elements={
|
|
2708
2630
|
'b1': xt.Bend(k0=10, length=4, knl=[1, 2, 3]),
|
|
2709
|
-
'r1': xt.RBend(k0=7,
|
|
2631
|
+
'r1': xt.RBend(k0=7, length_straight=3, knl=[4, 5, 6]),
|
|
2710
2632
|
'q1': xt.Quadrupole(k1=20, length=4),
|
|
2711
2633
|
's1': xt.Sextupole(k2=50, length=8),
|
|
2712
2634
|
'o1': xt.Octupole(k3=100, length=9),
|
|
@@ -3068,4 +2990,70 @@ def test_variable_solenoid_x0y0(test_context):
|
|
|
3068
2990
|
xo.assert_allclose(tw_test_rad.py, tw_ref_rad.py, rtol=0, atol=1e-14)
|
|
3069
2991
|
xo.assert_allclose(tw_test_rad.kin_px, tw_ref_rad.kin_px, rtol=0, atol=1e-14)
|
|
3070
2992
|
xo.assert_allclose(tw_test_rad.kin_py, tw_ref_rad.kin_py, rtol=0, atol=1e-14)
|
|
3071
|
-
xo.assert_allclose(tw_test_rad.delta, tw_ref_rad.delta, rtol=0, atol=1e-14)
|
|
2993
|
+
xo.assert_allclose(tw_test_rad.delta, tw_ref_rad.delta, rtol=0, atol=1e-14)
|
|
2994
|
+
|
|
2995
|
+
def test_api_rbend():
|
|
2996
|
+
bend1 = xt.RBend()
|
|
2997
|
+
bend1.angle = 0.1
|
|
2998
|
+
bend1.length_straight= 1.0
|
|
2999
|
+
|
|
3000
|
+
bend2 = xt.RBend()
|
|
3001
|
+
bend2.length_straight= 1.0
|
|
3002
|
+
bend2.angle = 0.1
|
|
3003
|
+
|
|
3004
|
+
bend3 = xt.RBend(angle=0.1, length_straight=1.0)
|
|
3005
|
+
|
|
3006
|
+
bend1d = xt.RBend.from_dict(bend1.to_dict())
|
|
3007
|
+
bend2d = xt.RBend.from_dict(bend2.to_dict())
|
|
3008
|
+
bend3d = xt.RBend.from_dict(bend3.to_dict())
|
|
3009
|
+
|
|
3010
|
+
for bb in [bend1, bend2, bend3, bend1d, bend2d, bend3d]:
|
|
3011
|
+
assert bb.h == 0.1 / bb.length
|
|
3012
|
+
assert bb.k0 == 'from_h'
|
|
3013
|
+
assert bb.k0_from_h == True
|
|
3014
|
+
assert bb.length_straight == 1.0
|
|
3015
|
+
assert bb.length > 1.0
|
|
3016
|
+
assert bb.angle == 0.1
|
|
3017
|
+
|
|
3018
|
+
bend1.k0 = 0.2
|
|
3019
|
+
assert bend1.k0 == 0.2
|
|
3020
|
+
assert bend1.h == 0.1 / bend1.length
|
|
3021
|
+
assert bend1.k0_from_h == False
|
|
3022
|
+
|
|
3023
|
+
bend2.k0_from_h = False
|
|
3024
|
+
assert bend2.k0 == 0.
|
|
3025
|
+
assert bend2.h == 0.1 / bend2.length
|
|
3026
|
+
assert bend2.k0_from_h == False
|
|
3027
|
+
|
|
3028
|
+
def test_api_bend():
|
|
3029
|
+
|
|
3030
|
+
bend1 = xt.Bend()
|
|
3031
|
+
bend1.angle = 0.1
|
|
3032
|
+
bend1.length = 1.0
|
|
3033
|
+
|
|
3034
|
+
bend2 = xt.Bend()
|
|
3035
|
+
bend2.length = 1.0
|
|
3036
|
+
bend2.angle = 0.1
|
|
3037
|
+
|
|
3038
|
+
bend3 = xt.Bend(angle=0.1, length=1.0)
|
|
3039
|
+
|
|
3040
|
+
bend1d = xt.Bend.from_dict(bend1.to_dict())
|
|
3041
|
+
bend2d = xt.Bend.from_dict(bend2.to_dict())
|
|
3042
|
+
bend3d = xt.Bend.from_dict(bend3.to_dict())
|
|
3043
|
+
|
|
3044
|
+
for bb in [bend1, bend2, bend3, bend1d, bend2d, bend3d]:
|
|
3045
|
+
assert bb.h == 0.1
|
|
3046
|
+
assert bb.k0 == 'from_h'
|
|
3047
|
+
assert bb.k0_from_h == True
|
|
3048
|
+
assert bb.length == 1.0
|
|
3049
|
+
assert bb.angle == 0.1
|
|
3050
|
+
|
|
3051
|
+
bend1.k0 = 0.2
|
|
3052
|
+
assert bend1.k0 == 0.2
|
|
3053
|
+
assert bend1.h == 0.1
|
|
3054
|
+
assert bend1.k0_from_h == False
|
|
3055
|
+
|
|
3056
|
+
bend2.k0_from_h = False
|
|
3057
|
+
assert bend2.k0 == 0.
|
|
3058
|
+
assert bend2.h == 0.1
|
|
3059
|
+
assert bend2.k0_from_h == False
|
|
@@ -276,7 +276,7 @@ def test_assemble_ring():
|
|
|
276
276
|
'l.halfcell': 38,
|
|
277
277
|
})
|
|
278
278
|
|
|
279
|
-
env.new('mb', xt.Bend, length='l.mb', k0='k0.mb',
|
|
279
|
+
env.new('mb', xt.Bend, length='l.mb', k0='k0.mb', angle='k0.mb * l.mb')
|
|
280
280
|
env.new('mq', xt.Quadrupole, length='l.mq')
|
|
281
281
|
env.new('ms', xt.Sextupole, length='l.ms')
|
|
282
282
|
env.new('corrector', xt.Multipole, knl=[0], length=0.1)
|
|
@@ -706,7 +706,7 @@ def test_assemble_ring_builders():
|
|
|
706
706
|
'l.halfcell': 38,
|
|
707
707
|
})
|
|
708
708
|
|
|
709
|
-
env.new('mb', xt.Bend, length='l.mb', k0='k0.mb',
|
|
709
|
+
env.new('mb', xt.Bend, length='l.mb', k0='k0.mb', angle='k0.mb * l.mb')
|
|
710
710
|
env.new('mq', xt.Quadrupole, length='l.mq')
|
|
711
711
|
env.new('ms', xt.Sextupole, length='l.ms')
|
|
712
712
|
env.new('corrector', xt.Multipole, knl=[0], length=0.1)
|
|
@@ -1132,7 +1132,7 @@ def test_assemble_ring_repeated_elements():
|
|
|
1132
1132
|
'l.halfcell': 38,
|
|
1133
1133
|
})
|
|
1134
1134
|
|
|
1135
|
-
env.new('mb', xt.Bend, length='l.mb', k0='k0.mb',
|
|
1135
|
+
env.new('mb', xt.Bend, length='l.mb', k0='k0.mb', angle='k0.mb * l.mb')
|
|
1136
1136
|
env.new('mq', xt.Quadrupole, length='l.mq')
|
|
1137
1137
|
env.new('ms', xt.Sextupole, length='l.ms')
|
|
1138
1138
|
env.new('corrector', xt.Multipole, knl=[0], length=0.1)
|
|
@@ -1527,12 +1527,12 @@ def test_element_views(container_type):
|
|
|
1527
1527
|
assert ee.get('c') == 12
|
|
1528
1528
|
|
|
1529
1529
|
env.new('mb', 'Bend', extra={'kmax': '6*a'},
|
|
1530
|
-
k1='3*a',
|
|
1530
|
+
k1='3*a', angle=1e-3 * 4*ee.ref['a'], knl=[0, '5*a', 6*ee.ref['a']])
|
|
1531
1531
|
assert isinstance(ee['mb'].k1, float)
|
|
1532
|
-
assert isinstance(ee['mb'].
|
|
1532
|
+
assert isinstance(ee['mb'].angle, float)
|
|
1533
1533
|
assert isinstance(ee['mb'].knl[0], float)
|
|
1534
1534
|
assert ee['mb'].k1 == 9
|
|
1535
|
-
assert ee['mb'].
|
|
1535
|
+
assert ee['mb'].angle == 12e-3
|
|
1536
1536
|
assert ee['mb'].knl[0] == 0
|
|
1537
1537
|
assert ee['mb'].knl[1] == 15
|
|
1538
1538
|
assert ee['mb'].knl[2] == 18
|
|
@@ -1543,17 +1543,17 @@ def test_element_views(container_type):
|
|
|
1543
1543
|
assert ee['b2'] == 12
|
|
1544
1544
|
assert ee['c'] == 16
|
|
1545
1545
|
assert ee['mb'].k1 == 12
|
|
1546
|
-
assert ee['mb'].
|
|
1546
|
+
assert ee['mb'].angle == 16e-3
|
|
1547
1547
|
assert ee['mb'].knl[0] == 0
|
|
1548
1548
|
assert ee['mb'].knl[1] == 20
|
|
1549
1549
|
assert ee['mb'].knl[2] == 24
|
|
1550
1550
|
|
|
1551
1551
|
ee['mb'].k1 = '30*a'
|
|
1552
|
-
ee['mb'].
|
|
1552
|
+
ee['mb'].angle = 1e-3* 40 * ee.ref['a']
|
|
1553
1553
|
ee['mb'].knl[1] = '50*a'
|
|
1554
1554
|
ee['mb'].knl[2] = 60 * ee.ref['a']
|
|
1555
1555
|
assert ee['mb'].k1 == 120
|
|
1556
|
-
assert ee['mb'].
|
|
1556
|
+
assert ee['mb'].angle == 160e-3
|
|
1557
1557
|
assert ee['mb'].knl[0] == 0
|
|
1558
1558
|
assert ee['mb'].knl[1] == 200
|
|
1559
1559
|
assert ee['mb'].knl[2] == 240
|
|
@@ -1563,13 +1563,13 @@ def test_element_views(container_type):
|
|
|
1563
1563
|
assert isinstance(ee['mb'].knl[0], float)
|
|
1564
1564
|
|
|
1565
1565
|
assert ee.ref['mb'].k1._value == 120
|
|
1566
|
-
assert ee.ref['mb'].
|
|
1566
|
+
assert ee.ref['mb'].angle._value == 160e-3
|
|
1567
1567
|
assert ee.ref['mb'].knl[0]._value == 0
|
|
1568
1568
|
assert ee.ref['mb'].knl[1]._value == 200
|
|
1569
1569
|
assert ee.ref['mb'].knl[2]._value == 240
|
|
1570
1570
|
|
|
1571
1571
|
assert ee.get('mb').k1 == 120
|
|
1572
|
-
assert ee.get('mb').
|
|
1572
|
+
assert ee.get('mb').angle == 160e-3
|
|
1573
1573
|
assert ee.get('mb').knl[0] == 0
|
|
1574
1574
|
assert ee.get('mb').knl[1] == 200
|
|
1575
1575
|
assert ee.get('mb').knl[2] == 240
|
|
@@ -1783,7 +1783,7 @@ def test_inpection_methods(container_type):
|
|
|
1783
1783
|
|
|
1784
1784
|
line = env.new_line([
|
|
1785
1785
|
env.new('bb', xt.Bend, k0='2 * b', length=3+env.vars['a'] + env.vars['b'],
|
|
1786
|
-
|
|
1786
|
+
angle=0.1, ksl=[0, '3*b']),
|
|
1787
1787
|
])
|
|
1788
1788
|
|
|
1789
1789
|
ee = {'env': env, 'line': line}[container_type]
|
|
@@ -829,7 +829,7 @@ def test_line_attr():
|
|
|
829
829
|
elements=[
|
|
830
830
|
xt.Drift(length=1),
|
|
831
831
|
xt.Multipole(knl=[2, 3, 4], hxl=8),
|
|
832
|
-
xt.Bend(k0=5,
|
|
832
|
+
xt.Bend(k0=5, angle=0.5 * 6, length=6, knl=[7, 8, 9]),
|
|
833
833
|
xt.Drift(length=10),
|
|
834
834
|
xt.Quadrupole(k1=11, length=12),
|
|
835
835
|
]
|